Driver for the SUPC (Supply Controller).
This driver provides access to the main features of the Supply Controller.
Functions | |
void | supc_backup_sram_off (Supc *p_supc) |
SRAM Off In Backup Mode. More... | |
void | supc_backup_sram_on (Supc *p_supc) |
SRAM On In Backup Mode. More... | |
void | supc_disable_backup_power_on_reset (Supc *p_supc) |
Disable Backup Area Power-On Reset. More... | |
void | supc_disable_brownout_detector (Supc *p_supc) |
Disable the core brownout detector. More... | |
void | supc_disable_brownout_reset (Supc *p_supc) |
Disable the assertion of core reset signal when a brownout detection occurs. More... | |
void | supc_disable_monitor_interrupt (Supc *p_supc) |
Disable the assertion of SUPC interrupt signal when a supply monitor detection occurs. More... | |
void | supc_disable_monitor_reset (Supc *p_supc) |
Disable the assertion of core reset signal when a supply monitor detection occurs. More... | |
void | supc_disable_voltage_regulator (Supc *p_supc) |
Disable the internal voltage regulator to supply VDDCORE with an external supply. More... | |
void | supc_enable_backup_mode (Supc *p_supc) |
Switch off the voltage regulator to put the device in backup mode. More... | |
void | supc_enable_backup_power_on_reset (Supc *p_supc) |
Enable Backup Area Power-On Reset. More... | |
void | supc_enable_brownout_detector (Supc *p_supc) |
Enable the core brownout detector. More... | |
void | supc_enable_brownout_reset (Supc *p_supc) |
Enable the assertion of core reset signal when a brownout detection occurs. More... | |
void | supc_enable_monitor_interrupt (Supc *p_supc) |
Enable the assertion of SUPC interrupt signal when a supply monitor detection occurs. More... | |
void | supc_enable_monitor_reset (Supc *p_supc) |
Enable the assertion of the core reset signal when a supply monitor detection occurs. More... | |
void | supc_enable_voltage_regulator (Supc *p_supc) |
Enable the internal voltage regulator. More... | |
enum slcdc_power_mode | supc_get_slcd_power_mode (Supc *p_supc) |
Get SLCD power mode. More... | |
uint32_t | supc_get_status (Supc *p_supc) |
Get supply controller status. More... | |
void | supc_set_monitor_sampling_period (Supc *p_supc, uint32_t ul_period) |
Set Supply monitor sampling period. More... | |
void | supc_set_monitor_threshold (Supc *p_supc, uint32_t ul_threshold) |
Set Supply monitor threshold. More... | |
void | supc_set_regulator_trim_factory (Supc *p_supc) |
Set the internal voltage regulator to use factory trim value. More... | |
void | supc_set_regulator_trim_user (Supc *p_supc, uint32_t value) |
Set the internal voltage regulator trim value. More... | |
void | supc_set_slcd_power_mode (Supc *p_supc, enum slcdc_power_mode mode) |
Set SLCD power mode. More... | |
void | supc_set_slcd_vol (Supc *p_supc, uint32_t vol) |
Set LCD Voltage Regulator Output. More... | |
void | supc_set_wakeup_inputs (Supc *p_supc, uint32_t ul_inputs, uint32_t ul_transition) |
Set system controller wake up inputs. More... | |
void | supc_set_wakeup_mode (Supc *p_supc, uint32_t ul_mode) |
Set system controller wake up mode. More... | |
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. More... | |
void supc_backup_sram_off | ( | Supc * | p_supc | ) |
SRAM Off In Backup Mode.
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_backup_sram_on | ( | Supc * | p_supc | ) |
void supc_disable_backup_power_on_reset | ( | Supc * | p_supc | ) |
Disable Backup Area Power-On Reset.
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_disable_brownout_detector | ( | Supc * | p_supc | ) |
Disable the core brownout detector.
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
Referenced by init_chip().
void supc_disable_brownout_reset | ( | Supc * | p_supc | ) |
Disable the assertion of core reset signal when a brownout detection occurs.
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.
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.
p_supc | Pointer to a SUPC instance. |
void supc_disable_voltage_regulator | ( | Supc * | p_supc | ) |
Disable the internal voltage regulator to supply VDDCORE with an external supply.
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_enable_backup_mode | ( | Supc * | p_supc | ) |
Switch off the voltage regulator to put the device in backup mode.
p_supc | Pointer to a SUPC instance. |
References SUPC_CR_KEY_PASSWD, and UNUSED.
void supc_enable_backup_power_on_reset | ( | Supc * | p_supc | ) |
Enable Backup Area Power-On Reset.
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_enable_brownout_detector | ( | Supc * | p_supc | ) |
Enable the core brownout detector.
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.
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.
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.
p_supc | Pointer to a SUPC instance. |
void supc_enable_voltage_regulator | ( | Supc * | p_supc | ) |
Enable the internal voltage regulator.
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
enum slcdc_power_mode supc_get_slcd_power_mode | ( | Supc * | p_supc | ) |
Get SLCD power mode.
p_supc | Pointer to a SUPC instance. |
Referenced by supc_set_slcd_power_mode().
uint32_t supc_get_status | ( | Supc * | p_supc | ) |
Get supply controller status.
p_supc | Pointer to a SUPC instance. |
Referenced by supc_set_slcd_power_mode().
void supc_set_monitor_sampling_period | ( | Supc * | p_supc, |
uint32_t | ul_period | ||
) |
Set Supply monitor sampling period.
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.
p_supc | Pointer to a SUPC instance. |
ul_threshold | Supply monitor threshold (between 1.9V and 3.4V). |
void supc_set_regulator_trim_factory | ( | Supc * | p_supc | ) |
Set the internal voltage regulator to use factory trim value.
p_supc | Pointer to a SUPC instance. |
References SUPC_MR_KEY_PASSWD.
void supc_set_regulator_trim_user | ( | Supc * | p_supc, |
uint32_t | value | ||
) |
Set the internal voltage regulator trim value.
p_supc | Pointer to a SUPC instance. |
value | the trim value. |
References SUPC_MR_KEY_PASSWD.
void supc_set_slcd_power_mode | ( | Supc * | p_supc, |
enum slcdc_power_mode | mode | ||
) |
Set SLCD power mode.
p_supc | Pointer to a SUPC instance. |
mode | The mode of SLCDC. |
References SLCDC_POWER_MODE_LCDOFF, SLCDC_POWER_MODE_LCDON_EXTVR, SLCDC_POWER_MODE_LCDON_INVR, supc_get_slcd_power_mode(), supc_get_status(), and SUPC_MR_KEY_PASSWD.
void supc_set_slcd_vol | ( | Supc * | p_supc, |
uint32_t | vol | ||
) |
Set LCD Voltage Regulator Output.
p_supc | Pointer to a SUPC instance. |
vol | The voltage of Regulator Output. |
References SUPC_MR_KEY_PASSWD.
void supc_set_wakeup_inputs | ( | Supc * | p_supc, |
uint32_t | ul_inputs, | ||
uint32_t | ul_transition | ||
) |
Set system controller wake up inputs.
p_supc | Pointer to a SUPC instance. |
ul_inputs | Bitmask of wake-up inputs that can force wake up of the core power supply. |
ul_transition | Bitmask of level transition of the wake-up inputs. 1 means a high-to-low level transition forces the wake up of core power supply. 0 means a low-to-high level transition forces the wake up of core power supply. |
void supc_set_wakeup_mode | ( | Supc * | p_supc, |
uint32_t | ul_mode | ||
) |
Set system controller wake up mode.
p_supc | Pointer to a SUPC instance. |
ul_mode | Bitmask of wake up mode (please refer to datasheet for more details). |
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.
ul_bypass | 0 for Xtal, 1 for bypass. |
References SUPC_CR_KEY_PASSWD, and SUPC_MR_KEY_PASSWD.