Functions | |
__STATIC_INLINE void | AONWUCMcuPowerDownConfig (uint32_t ui32ClkSrc) |
Configure the power down clock for the MCU domain. More... | |
__STATIC_INLINE void | AONWUCMcuPowerOffConfig (uint32_t ui32Mode) |
Configure the power down mode for the MCU domain. More... | |
__STATIC_INLINE void | AONWUCMcuWakeUpConfig (uint32_t ui32WakeUp) |
Configure the wake-up procedure for the MCU domain. More... | |
__STATIC_INLINE void | AONWUCMcuSRamConfig (uint32_t ui32Retention) |
Configure the retention on the block RAM in the MCU domain. More... | |
void | AONWUCAuxClockConfigSet (uint32_t ui32ClkSrc, uint32_t ui32ClkDiv) |
Set the clock source for the AUX domain. More... | |
__STATIC_INLINE uint32_t | AONWUCAuxClockConfigGet (void) |
Return the clock configuration for the AUX domain. More... | |
__STATIC_INLINE void | AONWUCAuxPowerDownConfig (uint32_t ui32ClkSrc) |
Configure the power down mode for the AUX domain. More... | |
__STATIC_INLINE void | AONWUCAuxPowerOffConfig (uint32_t ui32Mode) |
Configure the power off mode for the AUX domain. More... | |
__STATIC_INLINE void | AONWUCAuxWakeUpConfig (uint32_t ui32WakeUp) |
Configure the wake-up procedure for the AUX domain. More... | |
void | AONWUCAuxSRamConfig (uint32_t ui32Retention) |
Configure the retention on the AUX SRAM. More... | |
void | AONWUCAuxWakeupEvent (uint32_t ui32Mode) |
Control the wake up procedure of the AUX domain. More... | |
void | AONWUCAuxReset (void) |
Reset the AUX domain. More... | |
__STATIC_INLINE void | AONWUCAuxImageValid (void) |
Tells the AUX controller that the image in memory is valid. More... | |
__STATIC_INLINE void | AONWUCAuxImageInvalid (void) |
Tells the AUX controller that the image in memory is invalid. More... | |
__STATIC_INLINE uint32_t | AONWUCPowerStatus (void) |
Get the power status of the device. More... | |
__STATIC_INLINE void | AONWUCShutDownEnable (void) |
Enable shut-down of the device. More... | |
__STATIC_INLINE void | AONWUCDomainPowerDownEnable (void) |
Enable power down mode on AUX and MCU domain. More... | |
__STATIC_INLINE void | AONWUCDomainPowerDownDisable (void) |
Use this function to disable power down mode of the MCU and AUX domain. More... | |
__STATIC_INLINE void | AONWUCMcuResetClear (uint32_t ui32Status) |
Use this function to clear specific status bits. More... | |
__STATIC_INLINE uint32_t | AONWUCMcuResetStatus (void) |
Return the reset status. More... | |
void | AONWUCRechargeCtrlConfigSet (bool bAdaptEnable, uint32_t ui32AdaptRate, uint32_t ui32Period, uint32_t ui32MaxPeriod) |
Configure the recharge controller. More... | |
__STATIC_INLINE uint32_t | AONWUCRechargeCtrlConfigGet (void) |
Get the current configuration of the recharge controller. More... | |
void | AONWUCOscConfig (uint32_t ui32Period) |
Configure the interval for oscillator amplitude calibration. More... | |
__STATIC_INLINE void | AONWUCJtagPowerOff (void) |
Request power off of the JTAG domain. More... | |
__STATIC_INLINE uint32_t AONWUCAuxClockConfigGet | ( | void | ) |
Return the clock configuration for the AUX domain.
The AUX domain does not have a local clock divider, so the AON WUC contains a dedicated clock divider for AUX domain. Use this function to get the setting of the clock divider.
void AONWUCAuxClockConfigSet | ( | uint32_t | ui32ClkSrc, |
uint32_t | ui32ClkDiv | ||
) |
Set the clock source for the AUX domain.
This function is used to control which one of the system clocks that is fed into the AUX domain and what the value of the AUX clock divider is. Since the AUX domain has no internal clock divider, the AON WUC contains a dedicated clock divider for the AUX domain.
ui32ClkSrc | is the clock source for the AUX domain. |
ui32ClkDiv | is the setting of the AUX clock divider. |
__STATIC_INLINE void AONWUCAuxImageInvalid | ( | void | ) |
__STATIC_INLINE void AONWUCAuxImageValid | ( | void | ) |
__STATIC_INLINE void AONWUCAuxPowerDownConfig | ( | uint32_t | ui32ClkSrc | ) |
Configure the power down mode for the AUX domain.
Use this function to control which one of the clock sources that is fed into the MCU domain when it is in Power Down mode. When the Power is back in active mode the clock source will autmatically switch to AONWUC_CLOCK_SRC_HF.
Each clock is fed 'as is' into the AUX domain, since the AUX domain contains internal clock dividers controllable through the PRCM.
ui32ClkSrc | is the clock source for the AUX domain when in power down. |
Definition at line 480 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
__STATIC_INLINE void AONWUCAuxPowerOffConfig | ( | uint32_t | ui32Mode | ) |
Configure the power off mode for the AUX domain.
The parameter ui32Mode
determines the power down mode of the AUX Voltage Domain. When the AON WUC receives a request to power off the AUX domain it can choose to power off completely or use a virtual power-off. In a virtual power-off, reset is asserted and the clock is stopped but the power to the domain is kept on.
ui32Mode | defines the power down mode of the AUX domain. |
void AONWUCAuxReset | ( | void | ) |
Reset the AUX domain.
Use this function to reset the entire AUX domain. The write to the AON_WUC module must pass an 32 kHz clock boundary. By reading the AON_RTC_O_SYNC register after each write, it is guarateed that the AON interface will be in sync and that both the assert and the de-assert of the reset signal to AUX will propagate.
void AONWUCAuxSRamConfig | ( | uint32_t | ui32Retention | ) |
Configure the retention on the AUX SRAM.
The AUX SRAM contains only one block which supports retention. The retention on the SRAM can be turned on and off. Use this function to enable/disable the retention on the entire RAM.
TBD : Is this done in the bootcode?
Configure the retention on the AUX SRAM.
__STATIC_INLINE void AONWUCAuxWakeUpConfig | ( | uint32_t | ui32WakeUp | ) |
Configure the wake-up procedure for the AUX domain.
The AUX domain can wake up using two different procedures. Either it wakes up immediately following the triggering event or wake-up is forced to happen a fixed number (TBD) of 32 KHz clocks following the triggering event. The last can be used to compensate for any variable delays caused by other activities going on at the time of wakeup (such as a recharge event, etc.).
ui32WakeUp | determines the timing of the AUX wake up procedure. |
void AONWUCAuxWakeupEvent | ( | uint32_t | ui32Mode | ) |
Control the wake up procedure of the AUX domain.
The AUX domain can be woken in two different modes. In both modes power is turned on. In one mode a software event is generated for the AUX controller and it is allowed to start processing. The second mode will just force power on the AUX controller. If CM3 requires exclusive access to the AUX domain resources, it is adviced to ensure that the image in the AUX controller memory is declared invalid. This can be achieved by calling AONWUCAuxImageInvalid().
ui32Mode | is the wake up mode for the AUX domain. |
Definition at line 158 of file aon_wuc.c.
Referenced by OSCInterfaceDisable(), OSCInterfaceEnable(), and SysCtrlPowerEverything().
__STATIC_INLINE void AONWUCDomainPowerDownDisable | ( | void | ) |
__STATIC_INLINE void AONWUCDomainPowerDownEnable | ( | void | ) |
Enable power down mode on AUX and MCU domain.
Use this function to enable powerdown on the AUX and MCU domain.
Definition at line 760 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
__STATIC_INLINE void AONWUCJtagPowerOff | ( | void | ) |
Request power off of the JTAG domain.
The JTAG domain is automatically powered up on if a debugger is connected. If a debugger is not connected this function can be used to power off the JTAG domain.
Definition at line 981 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
__STATIC_INLINE void AONWUCMcuPowerDownConfig | ( | uint32_t | ui32ClkSrc | ) |
Configure the power down clock for the MCU domain.
Use this function to control which one of the clock sources that is fed into the MCU domain when the system is in standby mode. When the power is back in Active mode the clock source will autmatically switch to AONWUC_CLOCK_SRC_HF.
Each clock is fed 'as is' into the MCU domain, since the MCU domain contains internal clock dividers controllable through the PRCM.
ui32ClkSrc | is the clock source for the MCU domain when in power down. Three values are available as clock source: |
Definition at line 254 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
__STATIC_INLINE void AONWUCMcuPowerOffConfig | ( | uint32_t | ui32Mode | ) |
Configure the power down mode for the MCU domain.
The parameter ui32Mode
determines the power down mode of the MCU Voltage Domain. When the AON WUC receives a request to power off the MCU domain it can choose to power off completely or use a virtual power-off. In a virtual power-off, reset is asserted and the clock is stopped but the power to the domain is kept on.
ui32Mode | defines the power down mode of the MCU domain. Allowed values for setting the virtual power-off are: |
Definition at line 294 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
__STATIC_INLINE void AONWUCMcuResetClear | ( | uint32_t | ui32Status | ) |
Use this function to clear specific status bits.
Use this function to clear the bits that are set in the AON WUC status register. This register requires a write 1 to clear.
AON Wake Up Controller TAP can request a total/full Flash erase. If so, the corresponding status bits will be set in the status register and can be read using AONWUCMcuResetStatus() or cleared using this function. The reset source and type give information about what and how the latest reset was performed. Access to these bits are indentical to the flash erase bits.
ui32Status | defines in a one-hot encoding which bits to clear in the status register. Use OR'ed combinations of the following: |
__STATIC_INLINE uint32_t AONWUCMcuResetStatus | ( | void | ) |
Return the reset status.
This function returns the value of the AON_WUC_O_CTL1 register.
__STATIC_INLINE void AONWUCMcuSRamConfig | ( | uint32_t | ui32Retention | ) |
Configure the retention on the block RAM in the MCU domain.
MCU SRAM is partitioned into 4 banks of 1k x 32 each. The SRAM supports retention on all 4 blocks. The retention on the SRAM can be turned on and off. Use this function to enable the retention on the individual blocks.
If a block is not represented in the parameter ui32Retention
then the the retention will be disabled for that block.
ui32Retention | defines which RAM blocks to enable/disable retention on. To enable retention on individual parts of the RAM use a bitwise OR'ed combination of: |
Definition at line 376 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
__STATIC_INLINE void AONWUCMcuWakeUpConfig | ( | uint32_t | ui32WakeUp | ) |
Configure the wake-up procedure for the MCU domain.
The MCU domain can wake up using two different procedures. Either it wakes up immediately following the triggering event or wake-up is forced to happen a fixed number (TBD) of 32 KHz clocks following the triggering event. The last can be used to compensate for any variable delays caused by other activities going on at the time of wakeup (such as a recharge event, etc.).
ui32WakeUp | determines the timing of the MCU wake up procedure. |
Definition at line 331 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
void AONWUCOscConfig | ( | uint32_t | ui32Period | ) |
Configure the interval for oscillator amplitude calibration.
Use this function to set the number of 32 kHz clocks between oscillator amplitude calibrations.
The value of the interval is defined by the formular:
Period = ({ulMantissa,5'b1111} << ui32Exponent)
ui32Period | is the number of 32 kHz clock cycles in each interval. |
__STATIC_INLINE uint32_t AONWUCPowerStatus | ( | void | ) |
Get the power status of the device.
The Always On (AON) domain is the only part of the device which is truly "ALWAYS ON". The power status for the other device can always be read from this status register.
Possible power modes for the different parts of the device are:
Definition at line 707 of file aon_wuc.h.
Referenced by OSCInterfaceEnable(), PowerCtrlStateSet(), and SysCtrlPowerEverything().
__STATIC_INLINE uint32_t AONWUCRechargeCtrlConfigGet | ( | void | ) |
Get the current configuration of the recharge controller.
This function returns the value of the register AON_WUC_O_RECHARGECFG.
void AONWUCRechargeCtrlConfigSet | ( | bool | bAdaptEnable, |
uint32_t | ui32AdaptRate, | ||
uint32_t | ui32Period, | ||
uint32_t | ui32MaxPeriod | ||
) |
Configure the recharge controller.
The parameter bAdaptEnable
is used to enable or disable the adaptive algorithm for the recharge controller. The adaptive algorithm for the recharge controller is defined as
New_Period = Period * (1 + (AdaptRate / 1024) ) AdaptRate ----------- = ( 2^(-C1) + 2^(-C2) ) 1024
Where C1 is between 1 and 10 and C2 is between 2 and 10. The ui32AdaptRate
must be a number between 2 and 768 (RC_RATE_MIN and RC_RATE_MAX) resulting in an adaptive rate between 0.2% and 75%.
The ui32Period
is the number of 32 KHz clocks between two recharges. The length of the interval is defined by the formular:
Period = ({ulMantissa,5'b1111} << ui32Exponent)
bAdaptEnable | enables the adaption algorithm for the controller. |
ui32AdaptRate | determines the adjustment value for the adoption algorithm. |
ui32Period | determines the number of clock cycles between each activation of the recharge controller. |
ui32MaxPeriod | determines the maximum number of clock cycles between each activation of the recharge controller. |
Definition at line 221 of file aon_wuc.c.
Referenced by PowerCtrlStateSet().
__STATIC_INLINE void AONWUCShutDownEnable | ( | void | ) |
Enable shut-down of the device.
Use this function to enable shut-down of the device. This will force all I/O values to be latched - possibly enabling I/O wakeup - then all internal power supplies are turned off, effectively putting the device into shut-down mode.
Definition at line 732 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define AONWUC_AUX_ALLOW_SLEEP 0x00000000 |
Definition at line 159 of file aon_wuc.h.
Referenced by AONWUCAuxWakeupEvent(), and OSCInterfaceDisable().
#define AONWUC_AUX_POWER_ON 0x00000020 |
Definition at line 178 of file aon_wuc.h.
Referenced by OSCInterfaceEnable(), PowerCtrlStateSet(), and SysCtrlPowerEverything().
#define AONWUC_AUX_WAKEUP 0x00000001 |
Definition at line 158 of file aon_wuc.h.
Referenced by AONWUCAuxWakeupEvent(), OSCInterfaceEnable(), and SysCtrlPowerEverything().
#define AONWUC_AUX_WAKEUP_SWEVT 0x00000002 |
Definition at line 157 of file aon_wuc.h.
Referenced by AONWUCAuxWakeupEvent().
#define AONWUC_CLOCK_SRC_HF 0x00000003 |
Definition at line 99 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AONWUC_CLOCK_SRC_LF 0x00000001 |
Definition at line 103 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet(), AONWUCAuxPowerDownConfig(), AONWUCMcuPowerDownConfig(), and PowerCtrlStateSet().
#define AONWUC_CLOCK_SRC_MF 0x00000002 |
Definition at line 101 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet(), AONWUCAuxPowerDownConfig(), and AONWUCMcuPowerDownConfig().
#define AONWUC_FULL_FLASH_ERASE 0x00000100 |
Definition at line 219 of file aon_wuc.h.
Referenced by AONWUCMcuResetClear().
#define AONWUC_MCU_RESET_SRC 0x00000002 |
Definition at line 221 of file aon_wuc.h.
Referenced by AONWUCMcuResetClear().
#define AONWUC_MCU_RESET_TYPE 0x00000001 |
Definition at line 223 of file aon_wuc.h.
Referenced by AONWUCMcuResetClear().
#define AONWUC_NO_CLOCK 0x00000000 |
Definition at line 105 of file aon_wuc.h.
Referenced by AONWUCAuxPowerDownConfig(), and AONWUCMcuPowerDownConfig().
#define AONWUC_TOTAL_FLASH_ERASE 0x00000200 |
Definition at line 216 of file aon_wuc.h.
Referenced by AONWUCMcuResetClear().
#define AUX_CLOCK_DIV_128 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV128 ) |
Definition at line 119 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_CLOCK_DIV_16 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV16 ) |
Definition at line 116 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_CLOCK_DIV_2 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV2 ) |
Definition at line 113 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_CLOCK_DIV_256 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV256 ) |
Definition at line 120 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_CLOCK_DIV_32 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV32 ) |
Definition at line 117 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_CLOCK_DIV_4 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV4 ) |
Definition at line 114 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_CLOCK_DIV_64 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV64 ) |
Definition at line 118 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_CLOCK_DIV_8 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV8 ) |
Definition at line 115 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_CLOCK_DIV_M ( AON_WUC_AUXCLK_SCLK_HF_DIV_M ) |
#define AUX_CLOCK_DIV_UNUSED ( AON_WUC_AUXCLK_SCLK_HF_DIV_M + ( 1 << AON_WUC_AUXCLK_SCLK_HF_DIV_S )) |
Definition at line 121 of file aon_wuc.h.
Referenced by AONWUCAuxClockConfigSet().
#define AUX_FIXED_WAKE_UP 0x00010000 |
Definition at line 136 of file aon_wuc.h.
Referenced by AONWUCAuxWakeUpConfig().
#define AUX_IMM_WAKE_UP 0x00000000 |
Definition at line 135 of file aon_wuc.h.
Referenced by AONWUCAuxWakeUpConfig().
#define AUX_VIRT_PWOFF_DISABLE 0x00000000 |
Definition at line 133 of file aon_wuc.h.
Referenced by AONWUCAuxPowerOffConfig().
#define AUX_VIRT_PWOFF_ENABLE 0x00020000 |
Definition at line 134 of file aon_wuc.h.
Referenced by AONWUCAuxPowerOffConfig().
#define MCU_FIXED_WAKE_UP 0x00010000 |
Definition at line 132 of file aon_wuc.h.
Referenced by AONWUCMcuWakeUpConfig().
#define MCU_IMM_WAKE_UP 0x00000000 |
Definition at line 131 of file aon_wuc.h.
Referenced by AONWUCMcuWakeUpConfig(), and PowerCtrlStateSet().
#define MCU_RAM0_RETENTION 0x00000001 |
Definition at line 144 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define MCU_RAM1_RETENTION 0x00000002 |
Definition at line 145 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define MCU_RAM2_RETENTION 0x00000004 |
Definition at line 146 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define MCU_RAM3_RETENTION 0x00000008 |
Definition at line 147 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define MCU_RAM_BLOCK_RETENTION 0x0000000F |
Definition at line 148 of file aon_wuc.h.
Referenced by AONWUCMcuSRamConfig().
#define MCU_VIRT_PWOFF_DISABLE 0x00000000 |
Definition at line 129 of file aon_wuc.h.
Referenced by AONWUCMcuPowerOffConfig(), and PowerCtrlStateSet().
#define MCU_VIRT_PWOFF_ENABLE 0x00020000 |
Definition at line 130 of file aon_wuc.h.
Referenced by AONWUCMcuPowerOffConfig().
#define RC_RATE_MAX 768 |
Definition at line 210 of file aon_wuc.h.
Referenced by AONWUCRechargeCtrlConfigSet().
#define RC_RATE_MIN 2 |
Definition at line 212 of file aon_wuc.h.
Referenced by AONWUCRechargeCtrlConfigSet().