Driver for the SUPC (Supply Controller).
This driver provides access to the main features of the Supply Controller.
void supc_disable_brownout_detector |
( |
Supc * |
p_supc | ) |
|
Disable the core brownout detector.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_disable_brownout_reset |
( |
Supc * |
p_supc | ) |
|
Disable the assertion of core reset signal when a brownout detection occurs.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_disable_monitor_interrupt |
( |
Supc * |
p_supc | ) |
|
Disable the assertion of SUPC interrupt signal when a supply monitor detection occurs.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
void supc_disable_monitor_reset |
( |
Supc * |
p_supc | ) |
|
Disable the assertion of core reset signal when a supply monitor detection occurs.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
void supc_enable_brownout_detector |
( |
Supc * |
p_supc | ) |
|
Enable the core brownout detector.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_enable_brownout_reset |
( |
Supc * |
p_supc | ) |
|
Enable the assertion of core reset signal when a brownout detection occurs.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_enable_monitor_interrupt |
( |
Supc * |
p_supc | ) |
|
Enable the assertion of SUPC interrupt signal when a supply monitor detection occurs.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
void supc_enable_monitor_reset |
( |
Supc * |
p_supc | ) |
|
Enable the assertion of the core reset signal when a supply monitor detection occurs.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
uint32_t supc_get_status |
( |
Supc * |
p_supc | ) |
|
Get supply controller status.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
- Returns
- The status of supply controller.
void supc_set_monitor_sampling_period |
( |
Supc * |
p_supc, |
|
|
uint32_t |
ul_period |
|
) |
| |
Set Supply monitor sampling period.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
ul_period | Supply monitor sampling period. |
void supc_set_monitor_threshold |
( |
Supc * |
p_supc, |
|
|
uint32_t |
ul_threshold |
|
) |
| |
Set Supply monitor threshold.
- Parameters
-
p_supc | Pointer to a SUPC instance. |
ul_threshold | Supply monitor threshold (between 1.9V and 3.4V). |
void supc_switch_sclk_to_32kxtal |
( |
Supc * |
p_supc, |
|
|
uint32_t |
ul_bypass |
|
) |
| |
Switch slow clock source selection to external 32k (Xtal or Bypass) oscillator.
This function disables the PLLs.
- Note
- Switching sclk back to 32krc is only possible by shutting down the VDDIO power supply.
- Parameters
-
ul_bypass | 0 for Xtal, 1 for bypass. |
References SUPC_CR_KEY_PASSWD, and SUPC_MR_KEY_PASSWD.