CC23x0R5DriverLibrary
[pmctl.h] Power Management Controller
Collaboration diagram for [pmctl.h] Power Management Controller:

Functions

__STATIC_INLINE uint32_t PMCTLGetResetReason (void)
 Get the reason for the system reset. More...
 
__STATIC_INLINE void PMCTLResetSystem (void)
 Issue a system reset. More...
 
__STATIC_INLINE void PMCTLSetVoltageRegulator (uint32_t regulator)
 Set the VDDR regulator. More...
 
__STATIC_INLINE uint32_t PMCTLGetVoltageRegulator (void)
 Get the current VDDR regulator. More...
 

PMCTLGetResetReason() return values

#define PMCTL_RESET_SHUTDOWN_IO   (PMCTL_RSTSTA_SDDET | PMCTL_RSTSTA_IOWUSD)
 Device woke up from shutdown due to an IO event. More...
 
#define PMCTL_RESET_SHUTDOWN_SWD   PMCTL_RSTSTA_SDDET
 Device woke up from shutdown due to an SWD event. More...
 
#define PMCTL_RESET_WATCHDOG   (PMCTL_RSTSTA_SYSSRC_WDTEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)
 Device reset because of a watchdog timeout. More...
 
#define PMCTL_RESET_SYSTEM   (PMCTL_RSTSTA_SYSSRC_SYSRSTEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)
 Device reset trggered by software writing to RSTCTL.SYSRST. More...
 
#define PMCTL_RESET_CPU   (PMCTL_RSTSTA_SYSSRC_CPURSTEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)
 Device reset triggered by CPU reset event. More...
 
#define PMCTL_RESET_LOCKUP   (PMCTL_RSTSTA_SYSSRC_LOCKUPEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)
 Device reset triggered by CPU lockup event. More...
 
#define PMCTL_RESET_SWD   (PMCTL_RSTSTA_SYSSRC_SWDRSTEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)
 Device woke up due to Serial Wire Debug event. More...
 
#define PMCTL_RESET_LFXT   (PMCTL_RSTSTA_SYSSRC_LFLOSSEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)
 Device reset due to LFXT clock loss. More...
 
#define PMCTL_RESET_TSD   (PMCTL_RSTSTA_TSDEV | PMCTL_RSTSTA_RESETSRC_PINRESET)
 Device woke up from thermal shutdown after temperature drop. More...
 
#define PMCTL_RESET_VDDR   PMCTL_RSTSTA_RESETSRC_VDDRLOSS
 Device reset due to VDDR brownout event. More...
 
#define PMCTL_RESET_VDDS   PMCTL_RSTSTA_RESETSRC_VDDSLOSS
 Device reset due to VDDS brownout event. More...
 
#define PMCTL_RESET_PIN   PMCTL_RSTSTA_RESETSRC_PINRESET
 Device reset due to pin reset. More...
 
#define PMCTL_RESET_POR   PMCTL_RSTSTA_RESETSRC_PWRON
 Device booted due to power on reset. More...
 

PMCTLSetVoltageRegulator() inputs and PMCTLGetVoltageRegulator() return values

#define PMCTL_VOLTAGE_REGULATOR_DCDC   PMCTL_VDDRCTL_SELECT_DCDC
 DCDC voltage regulator. More...
 
#define PMCTL_VOLTAGE_REGULATOR_GLDO   PMCTL_VDDRCTL_SELECT_GLDO
 GLDO voltage regulator. More...
 

Detailed Description

Macro Definition Documentation

§ PMCTL_RESET_SHUTDOWN_IO

#define PMCTL_RESET_SHUTDOWN_IO   (PMCTL_RSTSTA_SDDET | PMCTL_RSTSTA_IOWUSD)

Device woke up from shutdown due to an IO event.

§ PMCTL_RESET_SHUTDOWN_SWD

#define PMCTL_RESET_SHUTDOWN_SWD   PMCTL_RSTSTA_SDDET

Device woke up from shutdown due to an SWD event.

§ PMCTL_RESET_WATCHDOG

#define PMCTL_RESET_WATCHDOG   (PMCTL_RSTSTA_SYSSRC_WDTEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)

Device reset because of a watchdog timeout.

§ PMCTL_RESET_SYSTEM

#define PMCTL_RESET_SYSTEM   (PMCTL_RSTSTA_SYSSRC_SYSRSTEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)

Device reset trggered by software writing to RSTCTL.SYSRST.

§ PMCTL_RESET_CPU

Device reset triggered by CPU reset event.

§ PMCTL_RESET_LOCKUP

#define PMCTL_RESET_LOCKUP   (PMCTL_RSTSTA_SYSSRC_LOCKUPEV | PMCTL_RSTSTA_RESETSRC_SYSRESET)

Device reset triggered by CPU lockup event.

§ PMCTL_RESET_SWD

Device woke up due to Serial Wire Debug event.

§ PMCTL_RESET_LFXT

Device reset due to LFXT clock loss.

§ PMCTL_RESET_TSD

#define PMCTL_RESET_TSD   (PMCTL_RSTSTA_TSDEV | PMCTL_RSTSTA_RESETSRC_PINRESET)

Device woke up from thermal shutdown after temperature drop.

§ PMCTL_RESET_VDDR

#define PMCTL_RESET_VDDR   PMCTL_RSTSTA_RESETSRC_VDDRLOSS

Device reset due to VDDR brownout event.

§ PMCTL_RESET_VDDS

#define PMCTL_RESET_VDDS   PMCTL_RSTSTA_RESETSRC_VDDSLOSS

Device reset due to VDDS brownout event.

§ PMCTL_RESET_PIN

#define PMCTL_RESET_PIN   PMCTL_RSTSTA_RESETSRC_PINRESET

Device reset due to pin reset.

§ PMCTL_RESET_POR

#define PMCTL_RESET_POR   PMCTL_RSTSTA_RESETSRC_PWRON

Device booted due to power on reset.

§ PMCTL_VOLTAGE_REGULATOR_DCDC

#define PMCTL_VOLTAGE_REGULATOR_DCDC   PMCTL_VDDRCTL_SELECT_DCDC

DCDC voltage regulator.

§ PMCTL_VOLTAGE_REGULATOR_GLDO

#define PMCTL_VOLTAGE_REGULATOR_GLDO   PMCTL_VDDRCTL_SELECT_GLDO

GLDO voltage regulator.

Function Documentation

§ PMCTLGetResetReason()

__STATIC_INLINE uint32_t PMCTLGetResetReason ( void  )

Get the reason for the system reset.

This function will return the reason the device reset.

Returns
Returns the reset source.

References HWREG, PMCTL_BASE, and PMCTL_O_RSTSTA.

§ PMCTLResetSystem()

__STATIC_INLINE void PMCTLResetSystem ( void  )

Issue a system reset.

This function issues a system reset. This will cause the device to reboot. After rebooting, PMCTLGetResetReason() will return PMCTL_RESET_SYSTEM.

Returns
None

References __disable_irq(), HWREG, PMCTL_BASE, PMCTL_O_RSTCTL, and PMCTL_RSTCTL_SYSRST_SET.

§ PMCTLSetVoltageRegulator()

__STATIC_INLINE void PMCTLSetVoltageRegulator ( uint32_t  regulator)

Set the VDDR regulator.

This function sets the VDDR regulator to use in active, idle, and standby modes.

Parameters
regulatorThe voltage regulator to switch to.
Returns
None

References HWREG, PMCTL_BASE, PMCTL_O_VDDRCTL, and PMCTL_VDDRCTL_SELECT_M.

§ PMCTLGetVoltageRegulator()

__STATIC_INLINE uint32_t PMCTLGetVoltageRegulator ( void  )

Get the current VDDR regulator.

This function gets the VDDR regulator currently in use.

Returns
Current voltage regulator
  • PMCTL_VOLTAGE_REGULATOR_DCDC
  • PMCTL_VOLTAGE_REGULATOR_GLDO

References HWREG, PMCTL_BASE, PMCTL_O_VDDRCTL, and PMCTL_VDDRCTL_SELECT_M.