CC26xx Driver Library
[pwr_ctrl.h] Power Control

Functions

void PowerCtrlSourceSet (uint32_t ui32PowerConfig)
 Set (Request) the main power source. More...
 
static uint32_t PowerCtrlSourceGet (void)
 Get the main power source. More...
 
static uint32_t PowerCtrlResetSourceGet (void)
 OBSOLETE: Get the last known reset source of the system. More...
 
static void PowerCtrlPadSleepEnable (void)
 Enables pad sleep in order to latch device outputs before shutdown. More...
 
static void PowerCtrlPadSleepDisable (void)
 Disables pad sleep in order to unlatch device outputs after wakeup from shutdown. More...
 

Detailed Description

Function Documentation

static void PowerCtrlPadSleepDisable ( void  )
inlinestatic

Disables pad sleep in order to unlatch device outputs after wakeup from shutdown.

This function must be called by the application after the device wakes up from shutdown.

See SysCtrlShutdown() for more information about how to enter shutdown and how to wake up from shutdown.

Returns
None
See also
PowerCtrlPadSleepEnable()

Referenced by SysCtrlShutdownWithAbort().

265 {
267  HWREG(AON_RTC_BASE + AON_RTC_O_SYNC);
268 }
static void PowerCtrlPadSleepEnable ( void  )
inlinestatic

Enables pad sleep in order to latch device outputs before shutdown.

See SysCtrlShutdown() for more information about how to enter shutdown and how to wake up from shutdown.

Returns
None
See also
PowerCtrlPadSleepDisable()

Referenced by SysCtrlShutdownWithAbort().

243 {
245  HWREG(AON_RTC_BASE + AON_RTC_O_SYNC);
246 }
static uint32_t PowerCtrlResetSourceGet ( void  )
inlinestatic

OBSOLETE: Get the last known reset source of the system.

Deprecated:
This function will be removed in a future release. Use SysCtrlResetSourceGet() instead.

This function returns reset source but does not cover if waking up from shutdown. This function can be seen as a subset of function SysCtrlResetSourceGet() and will be removed in a future release.

Returns
Returns one of the known reset values. The possible reset sources are:
See also
SysCtrlResetSourceGet()
222 {
223  // Get the reset source.
224  return (( HWREG( AON_PMCTL_BASE + AON_PMCTL_O_RESETCTL ) &
227 }
static uint32_t PowerCtrlSourceGet ( void  )
inlinestatic

Get the main power source.

Use this function to retrieve the current active power source.

When the System CPU is active it can never be powered by uLDO as this is too weak a power source.

Note
Using the DCDC power supply requires an external inductor.
Returns
Returns the main power source.
180 {
181  uint32_t ui32PowerConfig;
182 
183  // Return the current power source
184  ui32PowerConfig = HWREG(AON_PMCTL_BASE + AON_PMCTL_O_PWRCTL);
185  if(ui32PowerConfig & AON_PMCTL_PWRCTL_DCDC_ACTIVE)
186  {
187  return (PWRCTRL_PWRSRC_DCDC);
188  }
189  else
190  {
191  return (PWRCTRL_PWRSRC_GLDO);
192  }
193 }
#define PWRCTRL_PWRSRC_GLDO
Definition: pwr_ctrl.h:115
#define PWRCTRL_PWRSRC_DCDC
Definition: pwr_ctrl.h:114
void PowerCtrlSourceSet ( uint32_t  ui32PowerConfig)

Set (Request) the main power source.

Note
The system will never allow a switch to the PWRCTRL_PWRSRC_ULDO when in active mode. This is only allowed when the system is in lower power mode where no code is executing and no peripherals are active. Assuming that there is an external capacitor available for the PWRCTRL_PWRSRC_DCDC the system can dynamically switch back and forth between the two when in active mode.
The system will automatically switch to the GLDO / DCDC when waking up from a low power mode.
Parameters
ui32PowerConfigis a bitmask indicating the target power source.
Returns
None
60 {
61  // Check the arguments.
62  ASSERT((ui32PowerConfig == PWRCTRL_PWRSRC_DCDC) ||
63  (ui32PowerConfig == PWRCTRL_PWRSRC_GLDO) ||
64  (ui32PowerConfig == PWRCTRL_PWRSRC_ULDO));
65 
66  // Configure the power.
67  if(ui32PowerConfig == PWRCTRL_PWRSRC_DCDC) {
70  }
71  else if (ui32PowerConfig == PWRCTRL_PWRSRC_GLDO)
72  {
75  }
76  else
77  {
79  }
80 }
#define PWRCTRL_PWRSRC_ULDO
Definition: pwr_ctrl.h:116
static void PRCMMcuUldoConfigure(uint32_t ui32Enable)
Assert or de-assert a request for the uLDO.
Definition: prcm.h:331
#define ASSERT(expr)
Definition: debug.h:73
#define PWRCTRL_PWRSRC_GLDO
Definition: pwr_ctrl.h:115
#define PWRCTRL_PWRSRC_DCDC
Definition: pwr_ctrl.h:114

Here is the call graph for this function:

Macro Definition Documentation

#define PWRCTRL_ACTIVE   0x00000001
#define PWRCTRL_IOSEG2_DISABLE   0x00000100
#define PWRCTRL_IOSEG2_ENABLE   0x00000400
#define PWRCTRL_IOSEG3_DISABLE   0x00000200
#define PWRCTRL_IOSEG3_ENABLE   0x00000800
#define PWRCTRL_POWER_DOWN   0x00000004
#define PWRCTRL_PWRSRC_DCDC   0x00000001
#define PWRCTRL_PWRSRC_GLDO   0x00000000
#define PWRCTRL_PWRSRC_ULDO   0x00000002

Referenced by PowerCtrlSourceSet().

#define PWRCTRL_RST_CLK_LOSS   0x00000005
#define PWRCTRL_RST_PIN   0x00000001
#define PWRCTRL_RST_POWER_ON   0x00000000
#define PWRCTRL_RST_SW_PIN   0x00000006
#define PWRCTRL_RST_VDD_BOD   0x00000003
#define PWRCTRL_RST_VDDR_BOD   0x00000004
#define PWRCTRL_RST_VDDS_BOD   0x00000002
#define PWRCTRL_RST_WARM   0x00000007
#define PWRCTRL_SHUTDOWN   0x00000008
#define PWRCTRL_STANDBY   0x00000002