CC26xx Driver Library
[pwr_ctrl] Power Controller

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 PowerCtrlIOFreezeEnable (void)
 Close the latches in the AON IOC interface and in padring. More...
 
static void PowerCtrlIOFreezeDisable (void)
 

Detailed Description

Function Documentation

static void PowerCtrlIOFreezeDisable ( void  )
inlinestatic

Open the latches in the AON IOC interface and in padring.

Use this function to unfreeze the latches that retained on the IOs driven by the device. This function should not be called before the application has reinitialized the IO configuration that will drive the IOs to the desired level.

Returns
None
See also
PowerCtrlIOFreezeEnable()
266 {
267  // Open the IO latches at AON_IOC level and in the padring
270  HWREG(AON_RTC_BASE + AON_RTC_O_SYNC);
271 }
static void AONIOCFreezeDisable(void)
Un-freeze the IOs.
Definition: aon_ioc.h:229

Here is the call graph for this function:

static void PowerCtrlIOFreezeEnable ( void  )
inlinestatic

Close the latches in the AON IOC interface and in padring.

Use this function to unfreeze the current value retained on the IOs driven by the device. This is required if it is desired to maintain the level of any IO driven when going through a shutdown/powerdown cycle.

Returns
None
See also
PowerCtrlIOFreezeDisable()
243 {
244  // Close the IO latches at AON_IOC level and in the padring.
247  HWREG(AON_RTC_BASE + AON_RTC_O_SYNC);
248 }
static void AONIOCFreezeEnable(void)
Freeze the IOs.
Definition: aon_ioc.h:208

Here is the call graph for this function:

static uint32_t PowerCtrlResetSourceGet ( void  )
inlinestatic

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

Recommend using function SysCtrlResetSourceGet() instead of this one. 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()
221 {
222  // Get the reset source.
223  return (( HWREG( AON_SYSCTL_BASE + AON_SYSCTL_O_RESETCTL ) &
226 }
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.
181 {
182  uint32_t ui32PowerConfig;
183 
184  // Return the current power source
185  ui32PowerConfig = HWREG(AON_SYSCTL_BASE + AON_SYSCTL_O_PWRCTL);
186  if(ui32PowerConfig & AON_SYSCTL_PWRCTL_DCDC_ACTIVE)
187  {
188  return (PWRCTRL_PWRSRC_DCDC);
189  }
190  else
191  {
192  return (PWRCTRL_PWRSRC_GLDO);
193  }
194 }
#define PWRCTRL_PWRSRC_GLDO
Definition: pwr_ctrl.h:116
#define PWRCTRL_PWRSRC_DCDC
Definition: pwr_ctrl.h:115
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:117
static void PRCMMcuUldoConfigure(uint32_t ui32Enable)
Assert or de-assert a request for the uLDO.
Definition: prcm.h:354
#define ASSERT(expr)
Definition: debug.h:73
#define PWRCTRL_PWRSRC_GLDO
Definition: pwr_ctrl.h:116
#define PWRCTRL_PWRSRC_DCDC
Definition: pwr_ctrl.h:115

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