CC26xx Driver Library
[sys_ctrl.h] System Control

Functions

void SysCtrlIdle (uint32_t vimsPdMode)
 Force the system into idle mode. More...
 
void SysCtrlShutdownWithAbort (void)
 Try to enter shutdown but abort if wakeup event happened before shutdown. More...
 
void SysCtrlShutdown (void)
 Enable shutdown of the device. More...
 
void SysCtrlStandby (bool retainCache, uint32_t vimsPdMode, uint32_t rechargeMode)
 Force the system into standby mode. More...
 
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...
 
#define RSTSRC_PWR_ON   (( AON_PMCTL_RESETCTL_RESET_SRC_PWR_ON ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))
 
#define RSTSRC_PIN_RESET   (( AON_PMCTL_RESETCTL_RESET_SRC_PIN_RESET ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))
 
#define RSTSRC_VDDS_LOSS   (( AON_PMCTL_RESETCTL_RESET_SRC_VDDS_LOSS ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))
 
#define RSTSRC_VDDR_LOSS   (( AON_PMCTL_RESETCTL_RESET_SRC_VDDR_LOSS ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))
 
#define RSTSRC_CLK_LOSS   (( AON_PMCTL_RESETCTL_RESET_SRC_CLK_LOSS ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))
 
#define RSTSRC_SYSRESET   (( AON_PMCTL_RESETCTL_RESET_SRC_SYSRESET ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))
 
#define RSTSRC_WARMRESET   (( AON_PMCTL_RESETCTL_RESET_SRC_WARMRESET ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))
 
#define RSTSRC_WAKEUP_FROM_SHUTDOWN   ((( AON_PMCTL_RESETCTL_RESET_SRC_M ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S )) + 1 )
 
#define RSTSRC_WAKEUP_FROM_TCK_NOISE   ((( AON_PMCTL_RESETCTL_RESET_SRC_M ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S )) + 2 )
 

Detailed Description

Function Documentation

§ SysCtrl_DCDC_VoltageConditionalControl()

void SysCtrl_DCDC_VoltageConditionalControl ( void  )

Turns DCDC on or off depending of what is considered to be optimal usage.

This function controls the DCDC only if both the following CCFG settings are true:

  • DCDC is configured to be used.
  • Alternative DCDC settings are defined and enabled.

The DCDC is configured in accordance to the CCFG settings when turned on.

This function should be called periodically.

Returns
None

Referenced by SysCtrlAonUpdate().

320 {
321  uint32_t batThreshold ; // Fractional format with 8 fractional bits.
322  uint32_t aonBatmonBat ; // Fractional format with 8 fractional bits.
323  uint32_t ccfg_ModeConfReg ; // Holds a copy of the CCFG_O_MODE_CONF register.
324  uint32_t aonPmctlPwrctl ; // Reflect whats read/written to the AON_PMCTL_O_PWRCTL register.
325 
326  // We could potentially call this function before any battery voltage measurement
327  // is made/available. In that case we must make sure that we do not turn off the DCDC.
328  // This can be done by doing nothing as long as the battery voltage is 0 (Since the
329  // reset value of the battery voltage register is 0).
330  aonBatmonBat = HWREG( AON_BATMON_BASE + AON_BATMON_O_BAT );
331  if ( aonBatmonBat != 0 ) {
332  // Check if Voltage Conditional Control is enabled
333  // It is enabled if all the following are true:
334  // - DCDC in use (either in active or recharge mode), (in use if one of the corresponding CCFG bits are zero).
335  // - Alternative DCDC settings are enabled ( DIS_ALT_DCDC_SETTING == 0 )
336  // - Not in external regulator mode ( EXT_REG_MODE == 0 )
337  ccfg_ModeConfReg = HWREG( CCFG_BASE + CCFG_O_MODE_CONF );
338 
339  if (((( ccfg_ModeConfReg & CCFG_MODE_CONF_DCDC_RECHARGE_M ) == 0 ) ||
340  (( ccfg_ModeConfReg & CCFG_MODE_CONF_DCDC_ACTIVE_M ) == 0 ) ) &&
343  {
344  aonPmctlPwrctl = HWREG( AON_PMCTL_BASE + AON_PMCTL_O_PWRCTL );
345  batThreshold = (((( HWREG( CCFG_BASE + CCFG_O_MODE_CONF_1 ) &
347  CCFG_MODE_CONF_1_ALT_DCDC_VMIN_S ) + 28 ) << 4 );
348 
349  if ( aonPmctlPwrctl & ( AON_PMCTL_PWRCTL_DCDC_EN_M | AON_PMCTL_PWRCTL_DCDC_ACTIVE_M )) {
350  // DCDC is ON, check if it should be switched off
351  if ( aonBatmonBat < batThreshold ) {
353 
354  HWREG( AON_PMCTL_BASE + AON_PMCTL_O_PWRCTL ) = aonPmctlPwrctl;
355  }
356  } else {
357  // DCDC is OFF, check if it should be switched on
358  if ( aonBatmonBat > batThreshold ) {
359  if (( ccfg_ModeConfReg & CCFG_MODE_CONF_DCDC_RECHARGE_M ) == 0 ) aonPmctlPwrctl |= AON_PMCTL_PWRCTL_DCDC_EN_M ;
360  if (( ccfg_ModeConfReg & CCFG_MODE_CONF_DCDC_ACTIVE_M ) == 0 ) aonPmctlPwrctl |= AON_PMCTL_PWRCTL_DCDC_ACTIVE_M ;
361 
362  HWREG( AON_PMCTL_BASE + AON_PMCTL_O_PWRCTL ) = aonPmctlPwrctl;
363  }
364  }
365  }
366  }
367 }

§ SysCtrlAdjustRechargeAfterPowerDown()

void SysCtrlAdjustRechargeAfterPowerDown ( uint32_t  vddrRechargeMargin)

Adjust Recharge calculations to be used next.

Nothing to be done but keeping this function for platform compatibility.

Returns
None

Referenced by SysCtrlAonUpdate().

308 {
309  // Nothing to be done but keeping this function for platform compatibility.
310 }

§ SysCtrlAonSync()

static void SysCtrlAonSync ( void  )
inlinestatic

Sync all accesses to the AON register interface.

When this function returns, all writes to the AON register interface are guaranteed to have propagated to hardware. The function will return immediately if no AON writes are pending; otherwise, it will wait for the next AON clock before returning.

Returns
None
See also
SysCtrlAonUpdate()

Referenced by SetupAfterColdResetWakeupFromShutDownCfg3(), SysCtrlIdle(), and SysCtrlStandby().

339 {
340  // Sync the AON interface
341  HWREG(AON_RTC_BASE + AON_RTC_O_SYNC);
342 }

§ SysCtrlAonUpdate()

static void SysCtrlAonUpdate ( void  )
inlinestatic

Update all interfaces to AON.

When this function returns, at least 1 clock cycle has progressed on the AON domain, so that any outstanding updates to and from the AON interface is guaranteed to be in sync.

Note
This function should primarily be used after wakeup from sleep modes, as it will guarantee that all shadow registers on the AON interface are updated before reading any AON registers from the MCU domain. If a write has been done to the AON interface it is sufficient to call the SysCtrlAonSync().
Returns
None
See also
SysCtrlAonSync()

Referenced by SysCtrlShutdownWithAbort().

364 {
365  // Force a clock cycle on the AON interface to guarantee all registers are
366  // in sync.
367  HWREG(AON_RTC_BASE + AON_RTC_O_SYNC) = 1;
368  HWREG(AON_RTC_BASE + AON_RTC_O_SYNC);
369 }
Here is the call graph for this function:

§ SysCtrlClockGet()

static uint32_t SysCtrlClockGet ( void  )
inlinestatic

Get the CPU core clock frequency.

Use this function to get the current clock frequency for the CPU.

The CPU can run from 48 MHz and down to 750kHz. The frequency is defined by the combined division factor of the SYSBUS and the CPU clock divider.

Returns
Returns the current CPU core clock frequency.
318 {
319  // Return fixed clock speed
320  return( GET_MCU_CLOCK );
321 }

§ SysCtrlClockLossResetDisable()

static void SysCtrlClockLossResetDisable ( void  )
inlinestatic

Disables reset due to OSC clock loss event.

Note
This function shall typically not be called because the clock loss reset functionality is controlled by the boot code (a factory configuration defines whether it is set or not).
Returns
None
See also
SysCtrlClockLossResetEnable()
514 {
515  // Clear clock loss enable bit in AON_SYSCTRL
517 }

§ SysCtrlClockLossResetEnable()

static void SysCtrlClockLossResetEnable ( void  )
inlinestatic

Enables reset if OSC clock loss event is asserted.

Clock loss circuit in analog domain must be enabled as well in order to actually enable for a clock loss reset to occur OSCClockLossEventEnable().

Note
This function shall typically not be called because the clock loss reset functionality is controlled by the boot code (a factory configuration defines whether it is set or not).
Returns
None
See also
SysCtrlClockLossResetDisable(), OSCClockLossEventEnable()
494 {
495  // Set clock loss enable bit in AON_SYSCTRL
497 }

§ SysCtrlIdle()

void SysCtrlIdle ( uint32_t  vimsPdMode)

Force the system into idle mode.

This function forces the system into IDLE mode by configuring the requested VIMS mode, enabling cache retention and powering off the CPU power domain.

Parameters
vimsPdModeselects the requested VIMS power domain mode The parameter must be one of the following:
Returns
None
83 {
84  // Configure the VIMS mode
85  HWREG(PRCM_BASE + PRCM_O_PDCTL1VIMS) = vimsPdMode;
86 
87  // Always keep cache retention ON in IDLE
89 
90  // Turn off the CPU power domain, will take effect when PRCMDeepSleep() executes
92 
93  // Ensure any possible outstanding AON writes complete
95 
96  // Invoke deep sleep to go to IDLE
97  PRCMDeepSleep();
98 }
static void SysCtrlAonSync(void)
Sync all accesses to the AON register interface.
Definition: sys_ctrl.h:338
void PRCMDeepSleep(void)
Put the processor into deep-sleep mode.
Definition: prcm.c:680
static void PRCMCacheRetentionEnable(void)
Enable CACHE RAM retention.
Definition: prcm.h:1144
#define PRCM_DOMAIN_CPU
Definition: prcm.h:152
void PRCMPowerDomainOff(uint32_t ui32Domains)
Turn off a specific power domain.
Definition: prcm.c:461
Here is the call graph for this function:

§ SysCtrlResetSourceGet()

uint32_t SysCtrlResetSourceGet ( void  )

Returns the reset source (including "wakeup from shutdown").

In case of RSTSRC_WAKEUP_FROM_SHUTDOWN the application is responsible for unlatching the outputs (disable pad sleep). See PowerCtrlPadSleepDisable() for more information.

Returns
Returns the reset source.
377 {
378  uint32_t aonPmctlResetCtl = HWREG( AON_PMCTL_BASE + AON_PMCTL_O_RESETCTL );
379 
380  if ( aonPmctlResetCtl & AON_PMCTL_RESETCTL_WU_FROM_SD_M ) {
381  if ( aonPmctlResetCtl & AON_PMCTL_RESETCTL_GPIO_WU_FROM_SD_M ) {
382  return ( RSTSRC_WAKEUP_FROM_SHUTDOWN );
383  } else {
384  return ( RSTSRC_WAKEUP_FROM_TCK_NOISE );
385  }
386  } else {
387  return (( aonPmctlResetCtl & AON_PMCTL_RESETCTL_RESET_SRC_M ) >> AON_PMCTL_RESETCTL_RESET_SRC_S );
388  }
389 }
#define RSTSRC_WAKEUP_FROM_TCK_NOISE
Definition: sys_ctrl.h:430
#define RSTSRC_WAKEUP_FROM_SHUTDOWN
Definition: sys_ctrl.h:429

§ SysCtrlSetRechargeBeforePowerDown()

void SysCtrlSetRechargeBeforePowerDown ( uint32_t  xoscPowerMode)

Set Recharge values before entering Power Down.

This function shall be called just before entering Power Down. This function typically does nothing (default setting), but if temperature compensated recharge level are enabled (by setting CCFG_MODE_CONF_VDDR_TRIM_SLEEP_TC = 0) it adds temperature compensation to the recharge level.

Parameters
xoscPowerMode(typically running in XOSC_IN_HIGH_POWER_MODE all the time).
Returns
None

Referenced by SysCtrlAonUpdate(), and SysCtrlStandby().

255 {
256  uint32_t ccfg_ModeConfReg ;
257 
258  // If external regulator mode we shall:
259  // - Set static recharge timing in AON_PMCTL_RECHARGECFG (MODE_STATIC)
260  // - Set recharge period to approximately 500 mS (perM=31, perE=5 => 0xFD)
263  return;
264  }
265 
266  // read the MODE_CONF register in CCFG
267  ccfg_ModeConfReg = HWREG( CCFG_BASE + CCFG_O_MODE_CONF );
268  // Do temperature compensation if enabled
269  if (( ccfg_ModeConfReg & CCFG_MODE_CONF_VDDR_TRIM_SLEEP_TC ) == 0 ) {
270  int32_t vddrSleepDelta ;
271  int32_t curTemp ;
272  int32_t tcDelta ;
273  int32_t vddrSleepTrim ;
274 
275  // Get VDDR_TRIM_SLEEP_DELTA + 1 (sign extended) ==> vddrSleepDelta = -7..+8
276  vddrSleepDelta = (((int32_t)( ccfg_ModeConfReg << ( 32 - CCFG_MODE_CONF_VDDR_TRIM_SLEEP_DELTA_W - CCFG_MODE_CONF_VDDR_TRIM_SLEEP_DELTA_S )))
277  >> ( 32 - CCFG_MODE_CONF_VDDR_TRIM_SLEEP_DELTA_W )) + 1 ;
278  curTemp = AONBatMonTemperatureGetDegC();
279  tcDelta = ( 62 - curTemp ) >> 3;
280  if ( tcDelta > 7 ) {
281  tcDelta = 7 ;
282  }
283  if ( tcDelta > vddrSleepDelta ) {
284  vddrSleepDelta = tcDelta ;
285  }
288 
289  vddrSleepTrim -= vddrSleepDelta ;
290  if ( vddrSleepTrim > 15 ) vddrSleepTrim = 15 ;
291  if ( vddrSleepTrim < 1 ) vddrSleepTrim = 1 ;
292  // Write adjusted value using MASKED write (MASK8)
295  // Make a dummy read in order to make sure the write above is done before going into standby
297  }
298 }
int32_t AONBatMonTemperatureGetDegC(void)
Get the current temperature measurement as a signed value in Deg Celsius.
Definition: aon_batmon.c:60
Here is the call graph for this function:

§ SysCtrlShutdown()

void SysCtrlShutdown ( void  )

Enable shutdown of the device.

This function puts the device in shutdown state. The device automatically latches all outputs (pads in sleep) before it turns off all internal power supplies.

JTAG must be disconnected and JTAG power domain must be off before device can enter shutdown. This function waits until the device satisfies all shutdown conditions before it enters shutdown.

Note
The application must unlatch the outputs when the device wakes up from shutdown. It is recommended that any outputs that need to be restored after a wakeup from shutdown are restored before outputs are unlatched in order to avoid glitches.

See PowerCtrlPadSleepDisable() for information about how to unlatch outputs (disable pad sleep) after wakeup from shutdown.

Note
Wakeup events are only detected after the device enters shutdown.

See IOCIOShutdownSet() for information about how to enable wakeup from shutdown.

See SysCtrlResetSourceGet() for information about how to detect wakeup from shutdown.

It is recommended to disable interrupts before calling this function. Shutdown happens immediately when the device satisfies all shutdown conditions thus interrupt routines triggered after this function is called might be aborted.

Returns
This function does not return.

Referenced by SysCtrlShutdownWithAbort().

144 {
145  // Request shutdown mode
147 
148  // Make sure System CPU does not continue beyond this point.
149  // Shutdown happens when all shutdown conditions are met.
150  while(1);
151 }

§ SysCtrlShutdownWithAbort()

void SysCtrlShutdownWithAbort ( void  )

Try to enter shutdown but abort if wakeup event happened before shutdown.

This function puts the device in shutdown state if no wakeup events are detected before shutdown.

Compared to the basic SysCtrlShutdown() function this function makes sure that wakeup events that happen before actual shutdown are also detected. This function either enters shutdown with a guaranteed wakeup detection or returns to the caller function due to a pre-shutdown wakeup event.

See SysCtrlShutdown() for basic information about how to configure the device before shutdown and how to wakeup from shutdown.

This function uses IO edge detection in addition to the mandatory wakeup configuration. Additional requirements to the application for this function are:

  • Before :
    • When the application configures an IO for wakeup (see IOCIOShutdownSet()) the application must also configure the same IO for edge detection (see IOCIOIntSet()).
    • Edge detection must use the same polarity as the wakeup configuration.
    • Application must enable peripheral power domain (see PRCMPowerDomainOn()) and enable GPIO module in the peripheral power domain (see PRCMPeripheralRunEnable()).
  • After :
    • An edge, with same polarity as a wakeup event, was detected on a wakeup enabled IO before shutdown, and the shutdown was aborted. The application must clear the event generated by the edge detect (see GPIO_clearEventDio()) and decide what happens next.

Useful functions related to shutdown:

It is recommended to disable interrupts before calling this function because:

  • Pads are in sleep mode while this function runs.
  • An interrupt routine might be terminated if it is triggered after the decision to enter shutdown.
Returns
None
106 {
107  uint32_t wu_detect_vector = 0;
108  uint32_t io_num = 0;
109 
110  // For all IO CFG registers check if wakeup detect is enabled
111  for(io_num = 0; io_num < 32; io_num++)
112  {
113  // Read MSB from WU_CFG bit field
114  if( HWREG(IOC_BASE + IOC_O_IOCFG0 + (io_num * 4) ) & (1 << (IOC_IOCFG0_WU_CFG_S + IOC_IOCFG0_WU_CFG_W - 1)) )
115  {
116  wu_detect_vector |= (1 << io_num);
117  }
118  }
119 
120  // Wakeup events are detected when pads are in sleep mode
122 
123  // Make sure all potential events have propagated before checking event flags
126 
127  // If no edge detect flags for wakeup enabled IOs are set then shut down the device
128  if( GPIO_getEventMultiDio(wu_detect_vector) == 0 )
129  {
130  SysCtrlShutdown();
131  }
132  else
133  {
135  }
136 }
static void SysCtrlAonUpdate(void)
Update all interfaces to AON.
Definition: sys_ctrl.h:363
static void PowerCtrlPadSleepDisable(void)
Disables pad sleep in order to unlatch device outputs after wakeup from shutdown. ...
Definition: pwr_ctrl.h:264
void SysCtrlShutdown(void)
Enable shutdown of the device.
Definition: sys_ctrl.c:143
static void PowerCtrlPadSleepEnable(void)
Enables pad sleep in order to latch device outputs before shutdown.
Definition: pwr_ctrl.h:242
static uint32_t GPIO_getEventMultiDio(uint32_t dioMask)
Gets the event status of the specified DIOs.
Definition: gpio.h:570
Here is the call graph for this function:

§ SysCtrlStandby()

void SysCtrlStandby ( bool  retainCache,
uint32_t  vimsPdMode,
uint32_t  rechargeMode 
)

Force the system into standby mode.

This function forces all power domains (RFCORE, SERIAL, PERIPHERAL) off. The VIMS and CPU power domains are turned off by the HW when the PRCMDeepSleep() function is called. The IOs are latched (frozen) before the power domains are turned off to avoid glitches. The VIMS retention (cache) and VIMS module are turned off if requested. The deep-sleep clock for the crypto and DMA modules are turned off, as they must be off in order to enter standby. This function assumes that the LF clock has already been switched to and that the LF clock qualifiers must have been disabled/bypassed.

In internal regulator mode the adaptive recharge functionality is enabled with fixed parameter values. In external regulator mode the recharge functionality is disabled.

Note
This function is optimized to execute with TI-RTOS. There might be application specific prerequisites you would want to do before entering standby which deviate from this specific implementation.
Parameters
retainCacheselects if VIMS cache shall be retained or not.
  • false : VIMS cache is not retained
  • true : VIMS cache is retained
vimsPdModeselects the VIMS power domain mode. The parameter must be one of the following:
rechargeModespecifies the requested recharge mode. The parameter must be one of the following:
Returns
None
159 {
160  uint32_t modeVIMS;
161 
162  // In external regulator mode:
163  // Set static recharge timing to approximately 500 milliseconds
164  // Else:
165  // Handle compensation for improving RCOSC_LF stability at low temperatures
166  // as configured in CCFG
168 
169  // Freeze the IOs on the boundary between MCU and AON
171 
172  // Ensure any possible outstanding AON writes complete before turning off the power domains
173  SysCtrlAonSync();
174 
175  // Request power off of domains in the MCU voltage domain
177 
178  // Ensure that no clocks are forced on in any modes for Crypto, DMA and I2S
181 
182  // Gate running deep sleep clocks for Crypto, DMA and I2S
186 
187  // Load the new clock settings
188  PRCMLoadSet();
189 
190  // Configure the VIMS power domain mode
191  HWREG(PRCM_BASE + PRCM_O_PDCTL1VIMS) = vimsPdMode;
192 
193  // Request uLDO during standby
195 
196  // In external regulator mode:
197  // - Setting the AON_PMCTL_O_RECHARGECFG register is already handled above.
198  // (in function SysCtrlSetRechargeBeforePowerDown() )
199  // Else:
200  // - Set the AON_PMCTL_O_RECHARGECFG register as described below.
202  {
203  // In internal regulator mode the recharge functionality is set up with
204  // adaptive recharge mode and fixed parameter values
205  if(rechargeMode == SYSCTRL_PREFERRED_RECHARGE_MODE)
206  {
207  // Enable the Recharge Comparator
209  }
210  else
211  {
212  // Set requested recharge mode
213  HWREG(AON_PMCTL_BASE + AON_PMCTL_O_RECHARGECFG) = rechargeMode;
214  }
215  }
216 
217  // Ensure all writes have taken effect
218  SysCtrlAonSync();
219 
220  // Ensure UDMA, Crypto and I2C clocks are turned off
221  while (!PRCMLoadGet()) {;}
222 
223  // Ensure power domains have been turned off.
224  // CPU power domain will power down when PRCMDeepSleep() executes.
226 
227  // Turn off cache retention if requested
228  if (retainCache == false) {
229 
230  // Get the current VIMS mode
231  do {
232  modeVIMS = VIMSModeGet(VIMS_BASE);
233  } while (modeVIMS == VIMS_MODE_CHANGING);
234 
235  // If in a cache mode, turn VIMS off
236  if (modeVIMS == VIMS_MODE_ENABLED) {
238  }
239 
240  // Disable retention of cache RAM
242  }
243 
244  // Invoke deep sleep to go to STANDBY
245  PRCMDeepSleep();
246 }
static void SysCtrlAonSync(void)
Sync all accesses to the AON register interface.
Definition: sys_ctrl.h:338
void VIMSModeSet(uint32_t ui32Base, uint32_t ui32Mode)
Set the operational mode of the VIMS.
Definition: vims.c:92
#define XOSC_IN_HIGH_POWER_MODE
Definition: sys_ctrl.h:134
static void AONIOCFreezeEnable(void)
Freeze the IOs.
Definition: aon_ioc.h:208
#define PRCM_PERIPH_I2S
Definition: prcm.h:209
#define VIMS_MODE_ENABLED
Definition: vims.h:98
#define PRCM_DOMAIN_PERIPH
Definition: prcm.h:142
static bool PRCMLoadGet(void)
Check if any of the load sensitive register has been updated.
Definition: prcm.h:606
static void PRCMMcuUldoConfigure(uint32_t ui32Enable)
Assert or de-assert a request for the uLDO.
Definition: prcm.h:332
static void PRCMCacheRetentionDisable(void)
Disable CACHE RAM retention.
Definition: prcm.h:1159
uint32_t VIMSModeGet(uint32_t ui32Base)
Get the current operational mode of the VIMS.
Definition: vims.c:117
#define SYSCTRL_PREFERRED_RECHARGE_MODE
Definition: sys_ctrl.h:151
#define PRCM_PERIPH_CRYPTO
Definition: prcm.h:204
#define PRCM_PERIPH_UDMA
Definition: prcm.h:207
void SysCtrlSetRechargeBeforePowerDown(uint32_t xoscPowerMode)
Set Recharge values before entering Power Down.
Definition: sys_ctrl.c:254
#define VIMS_MODE_CHANGING
Definition: vims.h:95
void PRCMDeepSleep(void)
Put the processor into deep-sleep mode.
Definition: prcm.c:680
#define VIMS_MODE_OFF
Definition: vims.h:99
#define PRCM_DOMAIN_SERIAL
Definition: prcm.h:140
#define PRCM_DOMAIN_RFCORE
Definition: prcm.h:138
static void PRCMLoadSet(void)
Use this function to synchronize the load settings.
Definition: prcm.h:588
#define PRCM_DOMAIN_CPU
Definition: prcm.h:152
void PRCMPowerDomainOff(uint32_t ui32Domains)
Turn off a specific power domain.
Definition: prcm.c:461
void PRCMPeripheralDeepSleepDisable(uint32_t ui32Peripheral)
Disables a peripheral in deep-sleep mode.
Definition: prcm.c:582
uint32_t PRCMPowerDomainsAllOff(uint32_t ui32Domains)
Get the status for a specific power domain.
Definition: prcm.c:598
#define PRCM_DOMAIN_POWER_OFF
Definition: prcm.h:160
Here is the call graph for this function:

§ SysCtrlSystemReset()

static void SysCtrlSystemReset ( void  )
inlinestatic

Perform a full system reset.

Returns
The chip will reset and hence never return from this call.
464 {
465  // Disable CPU interrupts
466  CPUcpsid();
467  // Write reset register
469  // Finally, wait until the above write propagates
470  while ( 1 ) {
471  // Do nothing, just wait for the reset (and never return from here)
472  }
473 }
uint32_t CPUcpsid(void)
Disable all external interrupts.
Definition: cpu.c:68
Here is the call graph for this function:

Macro Definition Documentation

§ CPU_DEEP_SLEEP

#define CPU_DEEP_SLEEP   0x00000002

§ CPU_RUN

#define CPU_RUN   0x00000000

§ CPU_SLEEP

#define CPU_SLEEP   0x00000001

§ RSTSRC_CLK_LOSS

#define RSTSRC_CLK_LOSS   (( AON_PMCTL_RESETCTL_RESET_SRC_CLK_LOSS ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))

§ RSTSRC_PIN_RESET

#define RSTSRC_PIN_RESET   (( AON_PMCTL_RESETCTL_RESET_SRC_PIN_RESET ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))

§ RSTSRC_PWR_ON

§ RSTSRC_SYSRESET

#define RSTSRC_SYSRESET   (( AON_PMCTL_RESETCTL_RESET_SRC_SYSRESET ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))

§ RSTSRC_VDDR_LOSS

#define RSTSRC_VDDR_LOSS   (( AON_PMCTL_RESETCTL_RESET_SRC_VDDR_LOSS ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))

§ RSTSRC_VDDS_LOSS

#define RSTSRC_VDDS_LOSS   (( AON_PMCTL_RESETCTL_RESET_SRC_VDDS_LOSS ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))

§ RSTSRC_WAKEUP_FROM_SHUTDOWN

#define RSTSRC_WAKEUP_FROM_SHUTDOWN   ((( AON_PMCTL_RESETCTL_RESET_SRC_M ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S )) + 1 )

Referenced by SysCtrlResetSourceGet().

§ RSTSRC_WAKEUP_FROM_TCK_NOISE

#define RSTSRC_WAKEUP_FROM_TCK_NOISE   ((( AON_PMCTL_RESETCTL_RESET_SRC_M ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S )) + 2 )

Referenced by SysCtrlResetSourceGet().

§ RSTSRC_WARMRESET

#define RSTSRC_WARMRESET   (( AON_PMCTL_RESETCTL_RESET_SRC_WARMRESET ) >> ( AON_PMCTL_RESETCTL_RESET_SRC_S ))

§ SYSCTRL_PREFERRED_RECHARGE_MODE

#define SYSCTRL_PREFERRED_RECHARGE_MODE   0xFFFFFFFF

Referenced by SysCtrlStandby().

§ SYSCTRL_SYSBUS_OFF

#define SYSCTRL_SYSBUS_OFF   0x00000000

§ SYSCTRL_SYSBUS_ON

#define SYSCTRL_SYSBUS_ON   0x00000001

§ VIMS_NO_PWR_UP_MODE

#define VIMS_NO_PWR_UP_MODE   2

§ VIMS_ON_BUS_ON_MODE

#define VIMS_ON_BUS_ON_MODE   1

§ VIMS_ON_CPU_ON_MODE

#define VIMS_ON_CPU_ON_MODE   0

§ XOSC_IN_HIGH_POWER_MODE

#define XOSC_IN_HIGH_POWER_MODE   0

Referenced by SysCtrlStandby().

§ XOSC_IN_LOW_POWER_MODE

#define XOSC_IN_LOW_POWER_MODE   1