CC26xx Driver Library |

- Main Page
- Related Pages
- CC26xx APIs
- Register Descriptions
- Online Resources

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
[pwrctrl] Power Controller

## Functions
void | PowerCtrlStateSet (uint32_t ui32Powerstate)
| Force the system into low power modes. More...
void | PowerCtrlSourceSet (uint32_t ui32PowerConfig)
| Set (Request) the main power source. More...
__STATIC_INLINE uint32_t | PowerCtrlSourceGet (void)
| Get the main power source. More...
__STATIC_INLINE void | PowerCtrlIoConfigSet (uint32_t ui32IoConfig)
| Configure the IO ring. More...
__STATIC_INLINE uint32_t | PowerCtrlResetSourceGet (void)
| Get the last known reset source of the system. More...
__STATIC_INLINE void | PowerCtrlIOFreezeEnable (void)
| Close the latches in the AON IOC interface and in padring. More...
__STATIC_INLINE void | PowerCtrlIOFreezeDisable (void)

## Detailed Description

## Function Documentation

__STATIC_INLINE void PowerCtrlIoConfigSet | ( | uint32_t | ui32IoConfig | ) |

Configure the IO ring.

Parameters

  ui32IoConfig | is a bitmask indicating the IO configuration. It must be a bitwise OR of the values: PWRCTRL_IOSEG3_ENABLE PWRCTRL_IOSEG2_ENABLE PWRCTRL_IOSEG3_DISABLE PWRCTRL_IOSEG2_DISABLE

Returns
  None

Definition at line 246 of file pwr_ctrl.h.

__STATIC_INLINE void PowerCtrlIOFreezeDisable | ( | void |  | ) |

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()

Definition at line 327 of file pwr_ctrl.h.

__STATIC_INLINE void PowerCtrlIOFreezeEnable | ( | void |  | ) |

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()

Definition at line 302 of file pwr_ctrl.h.

Referenced by PowerCtrlStateSet().

__STATIC_INLINE uint32_t PowerCtrlResetSourceGet | ( | void |  | ) |

Get the last known reset source of the system.

Returns
  Returns one of the known reset values. The possible reset sources are:
  - PWRCTRL_RST_POWER_ON
  - PWRCTRL_RST_PIN
  - PWRCTRL_RST_VDDS_BOD
  - PWRCTRL_RST_VDD_BOD
  - PWRCTRL_RST_VDDR_BOD
  - PWRCTRL_RST_CLK_LOSS
  - PWRCTRL_RST_SW_PIN
  - PWRCTRL_RST_WARM

Definition at line 279 of file pwr_ctrl.h.

__STATIC_INLINE uint32_t PowerCtrlSourceGet | ( | void |  | ) |

Get the main power source.

Use this function to retrieve the current active power source.

When the CM3 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.
  - PWRCTRL_PWRSRC_DCDC
  - PWRCTRL_PWRSRC_GLDO

Definition at line 213 of file pwr_ctrl.h.

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

  ui32PowerConfig | is a bitmask indicating the target power source. PWRCTRL_PWRSRC_DCDC PWRCTRL_PWRSRC_GLDO PWRCTRL_PWRSRC_ULDO

Returns
  None

Definition at line 260 of file pwr_ctrl.c.

Referenced by PowerCtrlStateSet().

void PowerCtrlStateSet | ( | uint32_t | ui32Powerstate | ) |

Force the system into low power modes.

The device has 4 main power states where PWRCTRL_ACTIVE is the default state. If the CPU is running the system is considered to be in the active state. The three other states are:

- PWRCTRL_STANDBY
- PWRCTRL_POWER_DOWN
- PWRCTRL_SHUTDOWN

Note
  This code does not guarantee free operation of the AUX controller. It is only guaranteed to flip the switches to force the desired low power mode on the device.
  It is solely the programmers responsibility to properly configure an interrupt that will enable the device to wakeup before configuring the power mode. If not properly implemented the behaviour is undefined.

Parameters

  ui32Powerstate | defines the next power state for the system. PWRCTRL_ACTIVE (default) PWRCTRL_STANDBY PWRCTRL_POWER_DOWN PWRCTRL_SHUTDOWN

Returns
  None

Force the system into low power modes.

Definition at line 60 of file pwr_ctrl.c.

Referenced by SysCtrlPowerdown(), SysCtrlShutdown(), and SysCtrlStandby().

## Macro Definition Documentation

#define PWRCTRL_ACTIVE 0x00000001

Definition at line 104 of file pwr_ctrl.h.

#define PWRCTRL_IOSEG2_DISABLE 0x00000100

Definition at line 117 of file pwr_ctrl.h.

Referenced by PowerCtrlIoConfigSet().

#define PWRCTRL_IOSEG2_ENABLE 0x00000400

Definition at line 115 of file pwr_ctrl.h.

Referenced by PowerCtrlIoConfigSet().

#define PWRCTRL_IOSEG3_DISABLE 0x00000200

Definition at line 116 of file pwr_ctrl.h.

Referenced by PowerCtrlIoConfigSet().

#define PWRCTRL_IOSEG3_ENABLE 0x00000800

Definition at line 114 of file pwr_ctrl.h.

Referenced by PowerCtrlIoConfigSet().

#define PWRCTRL_POWER_DOWN 0x00000004

Definition at line 106 of file pwr_ctrl.h.

Referenced by PowerCtrlStateSet(), and SysCtrlPowerdown().

#define PWRCTRL_PWRSRC_DCDC 0x00000001

Definition at line 118 of file pwr_ctrl.h.

Referenced by PowerCtrlSourceGet(), and PowerCtrlSourceSet().

#define PWRCTRL_PWRSRC_GLDO 0x00000000

Definition at line 119 of file pwr_ctrl.h.

Referenced by PowerCtrlSourceGet(), and PowerCtrlSourceSet().

#define PWRCTRL_PWRSRC_ULDO 0x00000002

Definition at line 120 of file pwr_ctrl.h.

Referenced by PowerCtrlSourceSet(), and PowerCtrlStateSet().

#define PWRCTRL_RST_CLK_LOSS 0x00000005

Definition at line 132 of file pwr_ctrl.h.

#define PWRCTRL_RST_PIN 0x00000001

Definition at line 128 of file pwr_ctrl.h.

#define PWRCTRL_RST_POWER_ON 0x00000000

Definition at line 127 of file pwr_ctrl.h.

#define PWRCTRL_RST_SW_PIN 0x00000006

Definition at line 133 of file pwr_ctrl.h.

#define PWRCTRL_RST_VDD_BOD 0x00000003

Definition at line 130 of file pwr_ctrl.h.

#define PWRCTRL_RST_VDDR_BOD 0x00000004

Definition at line 131 of file pwr_ctrl.h.

#define PWRCTRL_RST_VDDS_BOD 0x00000002

Definition at line 129 of file pwr_ctrl.h.

#define PWRCTRL_RST_WARM 0x00000007

Definition at line 134 of file pwr_ctrl.h.

#define PWRCTRL_SHUTDOWN 0x00000008

Definition at line 107 of file pwr_ctrl.h.

Referenced by PowerCtrlStateSet(), and SysCtrlShutdown().

#define PWRCTRL_STANDBY 0x00000002

Definition at line 105 of file pwr_ctrl.h.

Referenced by PowerCtrlStateSet(), and SysCtrlStandby().