CC26xx Driver Library
[aon_wuc] AON Wake Up Controller

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...
 

Detailed Description

Function Documentation

static uint32_t AONWUCAuxClockConfigGet ( void  )
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.

Returns
Return the clock configuration. Enumerated return values are:

Definition at line 371 of file aon_wuc.h.

static void AONWUCAuxImageInvalid ( void  )
inlinestatic

Tells the Sensor Controller that the image in memory is invalid.

Use this function to tell the sensor controller that the image in memory is invalid. Sensor Controller might wake up, but it will stay idle.

Returns
None

Definition at line 531 of file aon_wuc.h.

static void AONWUCAuxImageValid ( void  )
inlinestatic

Tells the Sensor Controller that the image in memory is valid.

Use this function to tell the sensor controller that the image in memory is valid, and it is allowed to start executing the program.

Returns
None

Definition at line 514 of file aon_wuc.h.

static void AONWUCAuxPowerDownConfig ( uint32_t  ui32ClkSrc)
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.

Parameters
ui32ClkSrcis the clock source for the AUX domain when in power down.
Returns
None

Definition at line 400 of file aon_wuc.h.

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.

Note
This requires two writes and two reads on a 32 kHz clock boundary.
Returns
None

Definition at line 63 of file aon_wuc.c.

static void AONWUCAuxSRamConfig ( uint32_t  ui32Retention)
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.

Parameters
ui32Retentioneither enables or disables AUX SRAM retention.
  • 0 : Disable retention.
  • 1 : Enable retention.
Note
Retention on the SRAM is not enabled by default. If retention is turned off then the SRAM is powered off when it would otherwise be put in retention mode.
Returns
None

Definition at line 441 of file aon_wuc.h.

static void AONWUCAuxWakeupEvent ( uint32_t  ui32Mode)
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().

Note
Any writes to the AON interface must pass a 32 kHz clock boundary, and is therefore relatively slow. To ensure that a given write is complete the value of the register can be read back after write.
When accessing the AUX domain from the System CPU, it is advised always to have set the AUX in at least AONWUC_AUX_WAKEUP. This overwrites any instruction from the Sensor Controller and ensures that the AUX domain is on so it won't leave the System CPU hanging.
Parameters
ui32Modeis the wake up mode for the AUX domain.
Returns
None

Definition at line 476 of file aon_wuc.h.

Referenced by SysCtrlPowerEverything().

static void AONWUCDomainPowerDownDisable ( void  )
inlinestatic

Use this function to disable power down mode of the MCU and AUX domain.

Disabling powerdown on the MCU and/or AUX will put the domains in a virtual power down when requesting to be powered down. Logic is the same but power is kept on.

Returns
None.

Definition at line 627 of file aon_wuc.h.

static void AONWUCDomainPowerDownEnable ( void  )
inlinestatic

Enable power down mode on AUX and MCU domain.

Use this function to enable powerdown on the AUX and MCU domain.

Note
The powerdown command is ignored if the JTAG interface has been activated.
Returns
None

Definition at line 605 of file aon_wuc.h.

static void AONWUCJtagPowerOff ( void  )
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.

Note
Achieving the lowest power modes (shutdown/powerdown) requires the JTAG domain to be turned off. In general the JTAG domain should never be powered in production code.
Returns
None

Definition at line 816 of file aon_wuc.h.

Referenced by TrimAfterColdResetWakeupFromShutDown().

static void AONWUCMcuPowerDownConfig ( uint32_t  ui32ClkSrc)
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.

Parameters
ui32ClkSrcis the clock source for the MCU domain when in power down. Values available as clock source:
Returns
None

Definition at line 226 of file aon_wuc.h.

static void AONWUCMcuPowerOffConfig ( uint32_t  ui32Mode)
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.

Parameters
ui32Modedefines the power down mode of the MCU domain. Allowed values for setting the virtual power-off are:
Returns
None

Definition at line 265 of file aon_wuc.h.

static void AONWUCMcuResetClear ( uint32_t  ui32Status)
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.

Parameters
ui32Statusdefines in a one-hot encoding which bits to clear in the status register. Use OR'ed combinations of the following:
Returns
None

Definition at line 656 of file aon_wuc.h.

static uint32_t AONWUCMcuResetStatusGet ( void  )
inlinestatic

Return the reset status.

This function returns the value of the AON_WUC_O_CTL1 register.

Returns
Returns the status from the AON WUC.

Definition at line 680 of file aon_wuc.h.

static void AONWUCMcuSRamConfig ( uint32_t  ui32Retention)
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.

Note
Retention on the SRAM is not enabled by default. If retention is turned off on all RAM blocks then the SRAM is powered off when it would otherwise be put in retention mode.
Parameters
ui32Retentiondefines which RAM blocks to enable/disable retention on. To enable retention on individual parts of the RAM use a bitwise OR'ed combination of:
Returns
None

Definition at line 331 of file aon_wuc.h.

static void AONWUCMcuWakeUpConfig ( uint32_t  ui32WakeUp)
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.).

Parameters
ui32WakeUpdetermines the timing of the MCU wake up procedure.
Returns
None

Definition at line 294 of file aon_wuc.h.

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)
Note
When this counter expires an oscillator amplitude calibration is triggered immediately in Active mode. When this counter expires in Powerdown mode an internal flag is set that causes GBIAS to turn on together with BGAP when the next recharge occurs, at the same time triggering the oscillator amplitude calibration as well as a recharge of the uLDO reference voltage.
The oscillator amplitude calibration is performed at the same time as the recharge for the uLDO reference voltage. So the maximum period between each recharge operation should not exceed the number of clock cycles for the amplitude calibration.
Parameters
ui32Periodis the number of 32 kHz clock cycles in each interval.
Returns
None

Definition at line 210 of file aon_wuc.c.

static uint32_t AONWUCPowerStatusGet ( void  )
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:

Returns
Returns the current power status of the device as a bitwise OR'ed combination of these values:

Definition at line 556 of file aon_wuc.h.

Referenced by SysCtrlPowerEverything().

static uint32_t AONWUCRechargeCtrlConfigGet ( void  )
inlinestatic

Get the current configuration of the recharge controller.

This function returns the value of the register AON_WUC_O_RECHARGECFG.

Returns
Returns the current configuration of the recharge controller.

Definition at line 756 of file aon_wuc.h.

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)
Note
The maximum number of recharge cycles is required when enabling the adaptive recharge algorithm.
The maximum period between two recharges should never exceed the period between two oscillator amplitude calibrations which is configured using AONWUCOscConfig().
Parameters
bAdaptEnableenables the adaptation algorithm for the controller.
ui32AdaptRatedetermines the adjustment value for the adoption algorithm.
ui32Perioddetermines the number of clock cycles between each activation of the recharge controller.
ui32MaxPerioddetermines the maximum number of clock cycles between each activation of the recharge controller.
Returns
None

Definition at line 86 of file aon_wuc.c.

static void AONWUCShutDownEnable ( void  )
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.

Note
No action will take place before the System CPU is put to deep sleep.
The shut-down command is ignored if the JTAG interface has been activated.
Returns
None

Definition at line 581 of file aon_wuc.h.

Macro Definition Documentation

#define AONWUC_AUX_ALLOW_SLEEP   0x00000000

Definition at line 153 of file aon_wuc.h.

Referenced by AONWUCAuxWakeupEvent().

#define AONWUC_AUX_BGAP_REQ   0x00020000

Definition at line 165 of file aon_wuc.h.

#define AONWUC_AUX_GBIAS_REQ   0x00200000

Definition at line 162 of file aon_wuc.h.

#define AONWUC_AUX_POWER_DOWN   0x00000200

Definition at line 169 of file aon_wuc.h.

#define AONWUC_AUX_POWER_ON   0x00000020

Definition at line 172 of file aon_wuc.h.

Referenced by SysCtrlPowerEverything().

#define AONWUC_AUX_WAKEUP   0x00000001

Definition at line 152 of file aon_wuc.h.

Referenced by AONWUCAuxWakeupEvent(), and SysCtrlPowerEverything().

#define AONWUC_BGAP_ON   0x00001000

Definition at line 168 of file aon_wuc.h.

#define AONWUC_CLOCK_SRC_HF   0x00000003

Definition at line 96 of file aon_wuc.h.

#define AONWUC_CLOCK_SRC_LF   0x00000001

Definition at line 98 of file aon_wuc.h.

Referenced by AONWUCAuxPowerDownConfig(), and AONWUCMcuPowerDownConfig().

#define AONWUC_GBIAS_ON   0x00002000

Definition at line 167 of file aon_wuc.h.

#define AONWUC_JTAG_POWER_ON   0x00000040

Definition at line 171 of file aon_wuc.h.

#define AONWUC_MCU_BGAP_REQ   0x00010000

Definition at line 166 of file aon_wuc.h.

#define AONWUC_MCU_GBIAS_REQ   0x00100000

Definition at line 163 of file aon_wuc.h.

#define AONWUC_MCU_POWER_DOWN   0x00000100

Definition at line 170 of file aon_wuc.h.

#define AONWUC_MCU_POWER_ON   0x00000010

Definition at line 173 of file aon_wuc.h.

#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 AONWUC_OSC_BGAP_REQ   0x00040000

Definition at line 164 of file aon_wuc.h.

#define AONWUC_OSC_GBIAS_REQ   0x00400000

Definition at line 161 of file aon_wuc.h.

#define AONWUC_SPLY_POWER_DOWN   0x00000001

Definition at line 174 of file aon_wuc.h.

#define AUX_CLOCK_DIV_128   ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV128 )

Definition at line 114 of file aon_wuc.h.

#define AUX_CLOCK_DIV_16   ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV16 )

Definition at line 111 of file aon_wuc.h.

#define AUX_CLOCK_DIV_2   ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV2 )

Definition at line 108 of file aon_wuc.h.

#define AUX_CLOCK_DIV_256   ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV256 )

Definition at line 115 of file aon_wuc.h.

#define AUX_CLOCK_DIV_32   ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV32 )

Definition at line 112 of file aon_wuc.h.

#define AUX_CLOCK_DIV_4   ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV4 )

Definition at line 109 of file aon_wuc.h.

#define AUX_CLOCK_DIV_64   ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV64 )

Definition at line 113 of file aon_wuc.h.

#define AUX_CLOCK_DIV_8   ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV8 )

Definition at line 110 of file aon_wuc.h.

#define AUX_CLOCK_DIV_M   ( AON_WUC_AUXCLK_SCLK_HF_DIV_M )

Definition at line 117 of file aon_wuc.h.

#define AUX_CLOCK_DIV_UNUSED   ( AON_WUC_AUXCLK_SCLK_HF_DIV_M + ( 1 << AON_WUC_AUXCLK_SCLK_HF_DIV_S ))

Definition at line 116 of file aon_wuc.h.

#define AUX_FIXED_WAKE_UP   0x00010000

Definition at line 131 of file aon_wuc.h.

#define AUX_IMM_WAKE_UP   0x00000000

Definition at line 130 of file aon_wuc.h.

#define AUX_RAMREPAIR_DONE   0x00000002

Definition at line 183 of file aon_wuc.h.

#define AUX_VIRT_PWOFF_DISABLE   0x00000000

Definition at line 128 of file aon_wuc.h.

#define AUX_VIRT_PWOFF_ENABLE   0x00020000

Definition at line 129 of file aon_wuc.h.

#define MCU_AUX_RET_ENABLE   0x00000001

Definition at line 144 of file aon_wuc.h.

#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().

#define MCU_RAM0_RETENTION   0x00000001

Definition at line 139 of file aon_wuc.h.

#define MCU_RAM1_RETENTION   0x00000002

Definition at line 140 of file aon_wuc.h.

#define MCU_RAM2_RETENTION   0x00000004

Definition at line 141 of file aon_wuc.h.

#define MCU_RAM3_RETENTION   0x00000008

Definition at line 142 of file aon_wuc.h.

#define MCU_RAM_BLOCK_RETENTION   0x0000000F

Definition at line 143 of file aon_wuc.h.

Referenced by AONWUCMcuSRamConfig().

#define MCU_RAMREPAIR_DONE   0x00000001

Definition at line 182 of file aon_wuc.h.

#define MCU_VIRT_PWOFF_DISABLE   0x00000000

Definition at line 124 of file aon_wuc.h.

Referenced by AONWUCMcuPowerOffConfig().

#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().