Functions | |
static void | AONWUCMcuPowerDownConfig (uint32_t ui32ClkSrc) |
Configure the power down clock for the MCU domain. More... | |
static void | AONWUCMcuPowerOffConfig (uint32_t ui32Mode) |
Configure the power down mode for the MCU domain. More... | |
static void | AONWUCMcuWakeUpConfig (uint32_t ui32WakeUp) |
Configure the wake-up procedure for the MCU domain. More... | |
static void | AONWUCMcuSRamConfig (uint32_t ui32Retention) |
Configure the retention on the block RAM in the MCU domain. More... | |
static uint32_t | AONWUCAuxClockConfigGet (void) |
Return the clock configuration for the AUX domain. More... | |
static void | AONWUCAuxPowerDownConfig (uint32_t ui32ClkSrc) |
Configure the power down mode for the AUX domain. More... | |
static void | AONWUCAuxSRamConfig (uint32_t ui32Retention) |
Configure the retention on the AUX SRAM. More... | |
static void | AONWUCAuxWakeupEvent (uint32_t ui32Mode) |
Control the wake up procedure of the AUX domain. More... | |
void | AONWUCAuxReset (void) |
Reset the AUX domain. More... | |
static void | AONWUCAuxImageValid (void) |
Tells the Sensor Controller that the image in memory is valid. More... | |
static void | AONWUCAuxImageInvalid (void) |
Tells the Sensor Controller that the image in memory is invalid. More... | |
static uint32_t | AONWUCPowerStatusGet (void) |
Get the power status of the device. More... | |
static void | AONWUCShutDownEnable (void) |
Enable shut-down of the device. More... | |
static void | AONWUCDomainPowerDownEnable (void) |
Enable power down mode on AUX and MCU domain. More... | |
static void | AONWUCDomainPowerDownDisable (void) |
Use this function to disable power down mode of the MCU and AUX domain. More... | |
static void | AONWUCMcuResetClear (uint32_t ui32Status) |
Use this function to clear specific status bits. More... | |
static uint32_t | AONWUCMcuResetStatusGet (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 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 void | AONWUCJtagPowerOff (void) |
Request power off of the JTAG domain. More... | |
|
inlinestatic |
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.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
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 automatically 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 400 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
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 guaranteed 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.
|
inlinestatic |
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.
ui32Retention | either enables or disables AUX SRAM retention.
|
|
inlinestatic |
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 Sensor Controller and it is allowed to start processing. The second mode will just force power on the Sensor Controller. If System CPU requires exclusive access to the AUX domain resources, it is advised to ensure that the image in the Sensor 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 476 of file aon_wuc.h.
Referenced by OSCInterfaceDisable(), OSCInterfaceEnable(), and SysCtrlPowerEverything().
|
inlinestatic |
|
inlinestatic |
Enable power down mode on AUX and MCU domain.
Use this function to enable powerdown on the AUX and MCU domain.
Definition at line 605 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
|
inlinestatic |
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 816 of file aon_wuc.h.
Referenced by HapiTrimDeviceShutDown(), and PowerCtrlStateSet().
|
inlinestatic |
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 automatically 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. Values available as clock source: |
Definition at line 226 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
|
inlinestatic |
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 265 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
|
inlinestatic |
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 AONWUCMcuResetStatusGet() 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 identical 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: |
|
inlinestatic |
Return the reset status.
This function returns the value of the AON_WUC_O_CTL1 register.
|
inlinestatic |
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 331 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
|
inlinestatic |
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 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 294 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 formula:
Period = ({ulMantissa,5'b1111} << ui32Exponent)
ui32Period | is the number of 32 kHz clock cycles in each interval. |
|
inlinestatic |
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 556 of file aon_wuc.h.
Referenced by OSCInterfaceEnable(), PowerCtrlStateSet(), and SysCtrlPowerEverything().
|
inlinestatic |
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 formula:
Period = ({ulMantissa,5'b1111} << ui32Exponent)
bAdaptEnable | enables the adaptation 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 86 of file aon_wuc.c.
Referenced by PowerCtrlStateSet().
|
inlinestatic |
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 581 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define AONWUC_AUX_ALLOW_SLEEP 0x00000000 |
Definition at line 153 of file aon_wuc.h.
Referenced by AONWUCAuxWakeupEvent(), and OSCInterfaceDisable().
#define AONWUC_AUX_POWER_ON 0x00000020 |
Definition at line 172 of file aon_wuc.h.
Referenced by OSCInterfaceEnable(), PowerCtrlStateSet(), and SysCtrlPowerEverything().
#define AONWUC_AUX_WAKEUP 0x00000001 |
Definition at line 152 of file aon_wuc.h.
Referenced by AONWUCAuxWakeupEvent(), OSCInterfaceEnable(), and SysCtrlPowerEverything().
#define AONWUC_CLOCK_SRC_LF 0x00000001 |
Definition at line 98 of file aon_wuc.h.
Referenced by AONWUCAuxPowerDownConfig(), AONWUCMcuPowerDownConfig(), and PowerCtrlStateSet().
#define AONWUC_MCU_RESET_SRC 0x00000002 |
Definition at line 194 of file aon_wuc.h.
Referenced by AONWUCMcuResetClear().
#define AONWUC_MCU_WARM_RESET 0x00000001 |
Definition at line 196 of file aon_wuc.h.
Referenced by AONWUCMcuResetClear().
#define AONWUC_NO_CLOCK 0x00000000 |
Definition at line 100 of file aon_wuc.h.
Referenced by AONWUCAuxPowerDownConfig(), and AONWUCMcuPowerDownConfig().
#define AUX_CLOCK_DIV_128 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV128 ) |
#define AUX_CLOCK_DIV_16 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV16 ) |
#define AUX_CLOCK_DIV_2 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV2 ) |
#define AUX_CLOCK_DIV_256 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV256 ) |
#define AUX_CLOCK_DIV_32 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV32 ) |
#define AUX_CLOCK_DIV_4 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV4 ) |
#define AUX_CLOCK_DIV_64 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV64 ) |
#define AUX_CLOCK_DIV_8 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV8 ) |
#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 )) |
#define MCU_FIXED_WAKE_UP 0x00010000 |
Definition at line 127 of file aon_wuc.h.
Referenced by AONWUCMcuWakeUpConfig().
#define MCU_IMM_WAKE_UP 0x00000000 |
Definition at line 126 of file aon_wuc.h.
Referenced by AONWUCMcuWakeUpConfig(), and PowerCtrlStateSet().
#define MCU_RAM0_RETENTION 0x00000001 |
Definition at line 139 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define MCU_RAM1_RETENTION 0x00000002 |
Definition at line 140 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define MCU_RAM2_RETENTION 0x00000004 |
Definition at line 141 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define MCU_RAM3_RETENTION 0x00000008 |
Definition at line 142 of file aon_wuc.h.
Referenced by PowerCtrlStateSet().
#define MCU_RAM_BLOCK_RETENTION 0x0000000F |
Definition at line 143 of file aon_wuc.h.
Referenced by AONWUCMcuSRamConfig().
#define MCU_VIRT_PWOFF_DISABLE 0x00000000 |
Definition at line 124 of file aon_wuc.h.
Referenced by AONWUCMcuPowerOffConfig(), and PowerCtrlStateSet().
#define MCU_VIRT_PWOFF_ENABLE 0x00020000 |
Definition at line 125 of file aon_wuc.h.
Referenced by AONWUCMcuPowerOffConfig().
#define RC_RATE_MAX 768 |
Definition at line 188 of file aon_wuc.h.
Referenced by AONWUCRechargeCtrlConfigSet().
#define RC_RATE_MIN 2 |
Definition at line 190 of file aon_wuc.h.
Referenced by AONWUCRechargeCtrlConfigSet().