#include <stdbool.h>
#include <stdint.h>
#include "../inc/hw_types.h"
#include "../inc/hw_memmap.h"
#include "../inc/hw_ints.h"
#include "../inc/hw_sysctl.h"
#include "../inc/hw_prcm.h"
#include "../inc/hw_nvic.h"
#include "../inc/hw_aon_wuc.h"
#include "../inc/hw_aux_wuc.h"
#include "../inc/hw_aon_ioc.h"
#include "../inc/hw_ddi_0_osc.h"
#include "../inc/hw_rfc_pwr.h"
#include "../inc/hw_adi_3_refsys.h"
#include "../inc/hw_aon_sysctl.h"
#include "../inc/hw_aon_rtc.h"
#include "../inc/hw_fcfg1.h"
#include "interrupt.h"
#include "debug.h"
#include "pwr_ctrl.h"
#include "osc.h"
#include "prcm.h"
#include "aux_wuc.h"
#include "aon_wuc.h"
#include "adi.h"
#include "ddi.h"
#include "cpu.h"
#include "vims.h"
Macros | |
#define | SYSCTRL_SYSBUS_ON 0x00000001 |
#define | SYSCTRL_SYSBUS_OFF 0x00000000 |
#define | CPU_RUN 0x00000000 |
#define | CPU_SLEEP 0x00000001 |
#define | CPU_DEEP_SLEEP 0x00000002 |
#define | XOSC_IN_HIGH_POWER_MODE 0 |
#define | XOSC_IN_LOW_POWER_MODE 1 |
#define | RSTSRC_PWR_ON (( AON_SYSCTL_RESETCTL_RESET_SRC_PWR_ON ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
#define | RSTSRC_PIN_RESET (( AON_SYSCTL_RESETCTL_RESET_SRC_PIN_RESET ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
#define | RSTSRC_VDDS_LOSS (( AON_SYSCTL_RESETCTL_RESET_SRC_VDDS_LOSS ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
#define | RSTSRC_VDDR_LOSS (( AON_SYSCTL_RESETCTL_RESET_SRC_VDDR_LOSS ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
#define | RSTSRC_CLK_LOSS (( AON_SYSCTL_RESETCTL_RESET_SRC_CLK_LOSS ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
#define | RSTSRC_SYSRESET (( AON_SYSCTL_RESETCTL_RESET_SRC_SYSRESET ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
#define | RSTSRC_WARMRESET (( AON_SYSCTL_RESETCTL_RESET_SRC_WARMRESET ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) |
#define | RSTSRC_WAKEUP_FROM_SHUTDOWN ((( AON_SYSCTL_RESETCTL_RESET_SRC_M ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) + 1 ) |
#define | RSTSRC_WAKEUP_FROM_TCK_NOISE ((( AON_SYSCTL_RESETCTL_RESET_SRC_M ) >> ( AON_SYSCTL_RESETCTL_RESET_SRC_S )) + 2 ) |
Functions | |
static uint32_t | SysCtrlClockGet (void) |
Get the CPU core clock frequency. More... | |
static void | SysCtrlAonSync (void) |
Sync all accesses to the AON register interface. More... | |
static void | SysCtrlAonUpdate (void) |
Update all interfaces to AON. More... | |
void | SysCtrlSetRechargeBeforePowerDown (uint32_t xoscPowerMode) |
Set Recharge values before entering Power Down. More... | |
void | SysCtrlAdjustRechargeAfterPowerDown (uint32_t vddrRechargeMargin) |
Adjust Recharge calculations to be used next. More... | |
void | SysCtrl_DCDC_VoltageConditionalControl (void) |
Turns DCDC on or off depending of what is considered to be optimal usage. More... | |
uint32_t | SysCtrlResetSourceGet (void) |
Returns the reset source (including "wakeup from shutdown"). More... | |
static void | SysCtrlSystemReset (void) |
Perform a full system reset. More... | |
static void | SysCtrlClockLossResetEnable (void) |
Enables reset if OSC clock loss event is asserted. More... | |
static void | SysCtrlClockLossResetDisable (void) |
Disables reset due to OSC clock loss event. More... | |