#include <stdbool.h>
#include <stdint.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_aon_wuc.h"
#include "../inc/hw_aon_rtc.h"
#include "interrupt.h"
#include "debug.h"
Macros | |
#define | AONWUC_CLOCK_SRC_HF 0x00000003 |
#define | AONWUC_CLOCK_SRC_LF 0x00000001 |
#define | AONWUC_NO_CLOCK 0x00000000 |
#define | AUX_CLOCK_DIV_2 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV2 ) |
#define | AUX_CLOCK_DIV_4 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV4 ) |
#define | AUX_CLOCK_DIV_8 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV8 ) |
#define | AUX_CLOCK_DIV_16 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV16 ) |
#define | AUX_CLOCK_DIV_32 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV32 ) |
#define | AUX_CLOCK_DIV_64 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV64 ) |
#define | AUX_CLOCK_DIV_128 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV128 ) |
#define | AUX_CLOCK_DIV_256 ( AON_WUC_AUXCLK_SCLK_HF_DIV_DIV256 ) |
#define | AUX_CLOCK_DIV_UNUSED ( AON_WUC_AUXCLK_SCLK_HF_DIV_M + ( 1 << AON_WUC_AUXCLK_SCLK_HF_DIV_S )) |
#define | AUX_CLOCK_DIV_M ( AON_WUC_AUXCLK_SCLK_HF_DIV_M ) |
#define | MCU_VIRT_PWOFF_DISABLE 0x00000000 |
#define | MCU_VIRT_PWOFF_ENABLE 0x00020000 |
#define | MCU_IMM_WAKE_UP 0x00000000 |
#define | MCU_FIXED_WAKE_UP 0x00010000 |
#define | AUX_VIRT_PWOFF_DISABLE 0x00000000 |
#define | AUX_VIRT_PWOFF_ENABLE 0x00020000 |
#define | AUX_IMM_WAKE_UP 0x00000000 |
#define | AUX_FIXED_WAKE_UP 0x00010000 |
#define | MCU_RAM0_RETENTION 0x00000001 |
#define | MCU_RAM1_RETENTION 0x00000002 |
#define | MCU_RAM2_RETENTION 0x00000004 |
#define | MCU_RAM3_RETENTION 0x00000008 |
#define | MCU_RAM_BLOCK_RETENTION 0x0000000F |
#define | MCU_AUX_RET_ENABLE 0x00000001 |
#define | AONWUC_AUX_WAKEUP 0x00000001 |
#define | AONWUC_AUX_ALLOW_SLEEP 0x00000000 |
#define | AONWUC_OSC_GBIAS_REQ 0x00400000 |
#define | AONWUC_AUX_GBIAS_REQ 0x00200000 |
#define | AONWUC_MCU_GBIAS_REQ 0x00100000 |
#define | AONWUC_OSC_BGAP_REQ 0x00040000 |
#define | AONWUC_AUX_BGAP_REQ 0x00020000 |
#define | AONWUC_MCU_BGAP_REQ 0x00010000 |
#define | AONWUC_GBIAS_ON 0x00002000 |
#define | AONWUC_BGAP_ON 0x00001000 |
#define | AONWUC_AUX_POWER_DOWN 0x00000200 |
#define | AONWUC_MCU_POWER_DOWN 0x00000100 |
#define | AONWUC_JTAG_POWER_ON 0x00000040 |
#define | AONWUC_AUX_POWER_ON 0x00000020 |
#define | AONWUC_MCU_POWER_ON 0x00000010 |
#define | AONWUC_SPLY_POWER_DOWN 0x00000001 |
#define | MCU_RAMREPAIR_DONE 0x00000001 |
#define | AUX_RAMREPAIR_DONE 0x00000002 |
#define | RC_RATE_MAX 768 |
#define | RC_RATE_MIN 2 |
#define | AONWUC_MCU_RESET_SRC 0x00000002 |
#define | AONWUC_MCU_WARM_RESET 0x00000001 |
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... | |