Functions | |
void | SysCtrlPowerEverything (void) |
Power up everything. More... | |
void | SysCtrlStandby (void) |
Force the system into standby mode. More... | |
void | SysCtrlPowerdown (void) |
Force the system into power down. More... | |
void | SysCtrlShutdown (void) |
Force the system into shutdown. More... | |
uint32_t | SysCtrlClockGet (void) |
Get the CPU core clock frequency. More... | |
uint32_t | SysCtrlPeripheralClockGet (uint32_t ui32Peripheral, uint32_t ui32BusMode) |
Get the clock for a peripheral. More... | |
__STATIC_INLINE void | SysCtrlAonSync (void) |
Sync all accesses to the AON register interface. More... | |
__STATIC_INLINE void | SysCtrlAonUpdate (void) |
Update all interfaces to AON. More... | |
void | SysCtrlSetRechargeBeforePowerDown (XoscPowerMode_t xoscPowerMode) |
Set Recharge values before entering Power Down. More... | |
void | SysCtrlAdjustRechargeAfterPowerDown (void) |
Adjust Recharge calculations to be used next. More... | |
void | SysCtrl_DCDC_VoltageConditionalControl (void) |
Turns DCDC on or off depending of what’s considered to be optimal usage. More... | |
uint32_t | SysCtrlResetSourceGet (void) |
Returns last reset source (including "wakeup from shutdown") More... | |
void SysCtrl_DCDC_VoltageConditionalControl | ( | void | ) |
Turns DCDC on or off depending of what’s considered to be optimal usage.
This function controls the DCDC only if both the following CCFG settings are TRUE: 1) DCDC is configured to be used 2) Alternative DCDC settings are defined and enabled. The DCDC is configured in accordance to the CCFG settings when turned on. This function should be called periodically.
Definition at line 658 of file sys_ctrl.c.
void SysCtrlAdjustRechargeAfterPowerDown | ( | void | ) |
Adjust Recharge calculations to be used next.
This function shall be called just after returning from Power Down.
Reads the results from the adaptive recharge controller and current chip temperature. This is used as additional information when calculating optimal recharge controller settings next time (When SysCtrlSetRechargeBeforePowerDown() is called next time).
Definition at line 609 of file sys_ctrl.c.
__STATIC_INLINE void SysCtrlAonSync | ( | void | ) |
Sync all accesses to the AON register interface.
When this function returns, all writes to the AON register interface is guaranteed to have progressed to hardware.
Definition at line 248 of file sys_ctrl.h.
__STATIC_INLINE void SysCtrlAonUpdate | ( | void | ) |
Update all interfaces to AON.
When this function returns, at least 1 clock cycle has progressed on the AON domain, so that any outstanding updates to and from the AON interface is guaranteed to be in sync.
Definition at line 273 of file sys_ctrl.h.
uint32_t SysCtrlClockGet | ( | void | ) |
Get the CPU core clock frequency.
Use this function to retreive the current clock frequency for the CPU.
The CPU can run from 48 MHz and down to 750kHz. The frequency is defined by the combined division factor of the SYSBUS and the CPU clock divider.
Definition at line 338 of file sys_ctrl.c.
uint32_t SysCtrlPeripheralClockGet | ( | uint32_t | ui32Peripheral, |
uint32_t | ui32BusMode | ||
) |
Get the clock for a peripheral.
Use this function for retrieving the current clock frequency for a specific MCU domain peripheral. The clock source for many of the peripheral changes if the System Bus is gated. The ui32Mode
parameter specifies for which state of the System Bus the peripheral clock should be calculated.
ui32Peripheral | identifies the peripheral for which to return the clock frequency. |
ui32BusMode | is the mode of the System Bus. |
Definition at line 364 of file sys_ctrl.c.
void SysCtrlPowerdown | ( | void | ) |
Force the system into power down.
Force the system into power down.
Definition at line 255 of file sys_ctrl.c.
void SysCtrlPowerEverything | ( | void | ) |
Power up everything.
Definition at line 121 of file sys_ctrl.c.
uint32_t SysCtrlResetSourceGet | ( | void | ) |
Returns last reset source (including "wakeup from shutdown")
Definition at line 711 of file sys_ctrl.c.
void SysCtrlSetRechargeBeforePowerDown | ( | XoscPowerMode_t | xoscPowerMode | ) |
Set Recharge values before entering Power Down.
This function shall be called just before entering Power Down. It calculates an optimal and safe recharge setting of the adaptive recharge controller. The results of previous setting are also taken into account.
xoscPowerMode | (typically running in XoscInHighPowerMode all the time). |
Definition at line 452 of file sys_ctrl.c.
void SysCtrlShutdown | ( | void | ) |
Force the system into shutdown.
Force the system into shutdown.
Definition at line 296 of file sys_ctrl.c.
void SysCtrlStandby | ( | void | ) |
Force the system into standby mode.
Force the system into standby mode.
Definition at line 225 of file sys_ctrl.c.
#define CPU_DEEP_SLEEP 0x00000002 |
Definition at line 130 of file sys_ctrl.h.
#define CPU_RUN 0x00000000 |
Definition at line 128 of file sys_ctrl.h.
#define CPU_SLEEP 0x00000001 |
Definition at line 129 of file sys_ctrl.h.
#define RSTSRC_CLK_LOSS (( AON_SYSCTL_RESETCTL_RESET_SRC_CLK_LOSS >> AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
Definition at line 375 of file sys_ctrl.h.
#define RSTSRC_PIN_RESET (( AON_SYSCTL_RESETCTL_RESET_SRC_PIN_RESET >> AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
Definition at line 371 of file sys_ctrl.h.
#define RSTSRC_PWR_ON (( AON_SYSCTL_RESETCTL_RESET_SRC_PWR_ON >> AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
Definition at line 370 of file sys_ctrl.h.
#define RSTSRC_SYSRESET (( AON_SYSCTL_RESETCTL_RESET_SRC_SYSRESET >> AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
Definition at line 376 of file sys_ctrl.h.
#define RSTSRC_VDD_LOSS (( AON_SYSCTL_RESETCTL_RESET_SRC_VDD_LOSS >> AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
Definition at line 373 of file sys_ctrl.h.
#define RSTSRC_VDDR_LOSS (( AON_SYSCTL_RESETCTL_RESET_SRC_VDDR_LOSS >> AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
Definition at line 374 of file sys_ctrl.h.
#define RSTSRC_VDDS_LOSS (( AON_SYSCTL_RESETCTL_RESET_SRC_VDDS_LOSS >> AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
Definition at line 372 of file sys_ctrl.h.
#define RSTSRC_WAKEUP_FROM_SHUTDOWN (( AON_SYSCTL_RESETCTL_RESET_SRC_M >> AON_SYSCTL_RESETCTL_RESET_SRC_S ) + 1 ) |
Definition at line 378 of file sys_ctrl.h.
Referenced by SysCtrlResetSourceGet().
#define RSTSRC_WARMRESET (( AON_SYSCTL_RESETCTL_RESET_SRC_WARMRESET >> AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
Definition at line 377 of file sys_ctrl.h.
#define SYSCTRL_SYSBUS_OFF 0x00000000 |
Definition at line 121 of file sys_ctrl.h.
Referenced by SysCtrlPeripheralClockGet().
#define SYSCTRL_SYSBUS_ON 0x00000001 |
Definition at line 120 of file sys_ctrl.h.
Referenced by SysCtrlPeripheralClockGet().
enum XoscPowerMode_t |
Enumeration describing possible input options to SysCtrlSetRechargeBeforePowerDown().
Inform the SysCtrlSetRechargeBeforePowerDown() function whether the XOSC is in High or Low power mode. This is typically set by calling the function OSCXHfPowerModeSet().
Enumerator | |
---|---|
XoscInHighPowerMode |
When xosc_hf is in HIGH_POWER_XOSC. |
XoscInLowPowerMode |
When xosc_hf is in LOW_POWER_XOSC. |
Definition at line 294 of file sys_ctrl.h.