52 #ifndef ti_drivers_power_PowerCC26XX_ 53 #define ti_drivers_power_PowerCC26XX_ 59 #include <ti/devices/DeviceFamily.h> 68 typedef uint8_t PowerCC26XX_Resource;
72 #define PowerCC26XX_RESUMETIMESTANDBY 750 75 #define PowerCC26XX_TOTALTIMESTANDBY 1000 78 #define PowerCC26XX_WAKEDELAYSTANDBY 240 81 #define PowerCC26XX_INITIALWAITRCOSC_LF 1000 84 #define PowerCC26XX_RETRYWAITRCOSC_LF 1000 87 #define PowerCC26XX_INITIALWAITXOSC_HF 50 90 #define PowerCC26XX_RETRYWAITXOSC_HF 50 93 #define PowerCC26XX_INITIALWAITXOSC_LF 10000 96 #define PowerCC26XX_RETRYWAITXOSC_LF 5000 102 #define PowerCC26XX_PERIPH_GPT0 0 105 #define PowerCC26XX_PERIPH_GPT1 1 108 #define PowerCC26XX_PERIPH_GPT2 2 111 #define PowerCC26XX_PERIPH_GPT3 3 114 #define PowerCC26XX_PERIPH_SSI0 4 115 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4) 117 #define PowerCC26XX_PERIPH_SPI0 PowerCC26XX_PERIPH_SSI0 121 #define PowerCC26XX_PERIPH_UART0 5 124 #define PowerCC26XX_PERIPH_I2C0 6 127 #define PowerCC26XX_PERIPH_TRNG 7 130 #define PowerCC26XX_PERIPH_GPIO 8 133 #define PowerCC26XX_PERIPH_UDMA 9 136 #define PowerCC26XX_PERIPH_CRYPTO 10 139 #define PowerCC26XX_PERIPH_I2S 11 142 #define PowerCC26XX_PERIPH_RFCORE 12 145 #define PowerCC26XX_XOSC_HF 13 148 #define PowerCC26XX_DOMAIN_PERIPH 14 151 #define PowerCC26XX_DOMAIN_SERIAL 15 154 #define PowerCC26XX_DOMAIN_RFCORE 16 157 #define PowerCC26XX_DOMAIN_SYSBUS 17 160 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2 || \ 161 DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4) 164 #define PowerCC26XX_PERIPH_PKA 18 167 #define PowerCC26XX_PERIPH_UART1 19 170 #define PowerCC26XX_PERIPH_SSI1 20 171 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4) 173 #define PowerCC26XX_PERIPH_SPI1 PowerCC26XX_PERIPH_SSI1 178 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4) 181 #define PowerCC26XX_PERIPH_UART2 21 184 #define PowerCC26XX_PERIPH_UART3 22 187 #define PowerCC26XX_PERIPH_SPI2 23 189 #define PowerCC26XX_PERIPH_SSI2 PowerCC26XX_PERIPH_SPI2 192 #define PowerCC26XX_PERIPH_SPI3 24 194 #define PowerCC26XX_PERIPH_SSI3 PowerCC26XX_PERIPH_SPI3 197 #define PowerCC26XX_PERIPH_I2C1 25 201 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X0_CC26X0) 202 #define PowerCC26XX_NUMRESOURCES 19 203 #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X1_CC26X1) 204 #define PowerCC26XX_NUMRESOURCES 19 205 #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2) 206 #define PowerCC26XX_NUMRESOURCES 21 207 #elif (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4) 208 #define PowerCC26XX_NUMRESOURCES 26 214 #define PowerCC26XX_PERIPH 0x80 215 #define PowerCC26XX_SPECIAL 0x40 216 #define PowerCC26XX_DOMAIN 0x00 217 #define PowerCC26XX_PARENTMASK 0x3F 218 #define PowerCC26XX_NOPARENT 0x3F 222 #define PowerCC26XX_STANDBY 0x1 225 #define PowerCC26XX_ENABLE 1 226 #define PowerCC26XX_DISABLE 0 231 #define PowerCC26XX_RETAIN_VIMS_CACHE_IN_STANDBY 0 234 #define PowerCC26XX_DISALLOW_SHUTDOWN 1 237 #define PowerCC26XX_DISALLOW_STANDBY 2 240 #define PowerCC26XX_DISALLOW_IDLE 3 243 #define PowerCC26XX_NEED_FLASH_IN_IDLE 4 256 #define PowerCC26XX_SWITCH_XOSC_HF_MANUALLY 5 265 #define PowerCC26XX_DISALLOW_XOSC_HF_SWITCHING 6 268 #define PowerCC26XX_NUMCONSTRAINTS 7 273 #define PowerCC26XX_SD_DISALLOW PowerCC26XX_DISALLOW_SHUTDOWN 274 #define PowerCC26XX_SB_DISALLOW PowerCC26XX_DISALLOW_STANDBY 275 #define PowerCC26XX_IDLE_PD_DISALLOW PowerCC26XX_DISALLOW_IDLE 276 #define PowerCC26XX_XOSC_HF_SWITCHING_DISALLOW PowerCC26XX_DISALLOW_XOSC_HF_SWITCHING 277 #define PowerCC26XX_SB_VIMS_CACHE_RETAIN PowerCC26XX_RETAIN_VIMS_CACHE_IN_STANDBY 287 #define PowerCC26XX_ENTERING_STANDBY 0x1 290 #define PowerCC26XX_ENTERING_SHUTDOWN 0x2 293 #define PowerCC26XX_AWAKE_STANDBY 0x4 297 #define PowerCC26XX_AWAKE_STANDBY_LATE 0x8 300 #define PowerCC26XX_XOSC_HF_SWITCHED 0x10 312 #define PowerCC26XX_SCLK_LF_SWITCHED 0x20 382 #define PowerCC26XX_JTAG_PD_TURNED_ON 0x40 385 #define PowerCC26XX_NUMEVENTS 6 392 #define PowerCC26XX_SETUP_CALIBRATE 1 393 #define PowerCC26XX_INITIATE_CALIBRATE 2 394 #define PowerCC26XX_DO_CALIBRATE 3 402 uint16_t driverlibID;
403 } PowerCC26XX_ResourceRecord;
449 bool (*calibrateFxn)(
unsigned int arg);
573 #if defined(DeviceFamily_CC26X0R2) 574 bool emulatorAttached;
576 uint8_t constraintCounts[PowerCC26XX_NUMCONSTRAINTS];
578 uint8_t resourceCounts[PowerCC26XX_NUMRESOURCES];
580 unsigned int (*resourceHandlers[3])(
unsigned int arg);
731 #if (DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X1_CC26X1 || \ 732 DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X2_CC26X2 || \ 733 DeviceFamily_PARENT == DeviceFamily_PARENT_CC13X4_CC26X3_CC26X4) bool calLF
Definition: PowerCC26XX.h:566
Power manager interface for CC26X2.
void PowerCC26XX_doWFI(void)
The Wait for interrupt (WFI) policy.
int32_t nDeltaFreqNew
Definition: PowerCC26XX.h:562
bool xoscPending
Definition: PowerCC26XX.h:565
bool bRefine
Definition: PowerCC26XX.h:563
bool PowerCC26XX_calibrate(unsigned int arg)
The RC Oscillator (RCOSC) calibration function.
HwiP structure.
Definition: HwiP.h:78
uint32_t constraintMask
Definition: PowerCC26XX.h:549
bool calibrateRCOSC_LF
Boolean specifying whether the low frequency RC oscillator (RCOSC_LF) should be calibrated.
Definition: PowerCC26XX.h:528
bool enableMaxStandbyDuration
Boolean that enables limiting the duration spent in standby.
Definition: PowerCC26XX.h:506
Power_PolicyInitFxn policyInitFxn
The Power Policy's initialization function.
Definition: PowerCC26XX.h:415
ClockP structure.
Definition: ClockP.h:81
Clock interface for the RTOS Porting Interface.
void(* Power_PolicyInitFxn)(void)
Power policy initialization function pointer.
Definition: Power.h:401
uint16_t vddrRechargeMargin
Margin in SCLK_LF periods subtracted from previous longest VDDR recharge period.
Definition: PowerCC26XX.h:493
HwiP_Struct hwiStruct
Definition: PowerCC26XX.h:554
uint32_t maxStandbyDuration
Time in system ticks that specifies the maximum duration the device may spend in standby.
Definition: PowerCC26XX.h:476
bool enablePolicy
Boolean specifying if the Power Policy function is enabled.
Definition: PowerCC26XX.h:519
int32_t nCtrimFractNew
Definition: PowerCC26XX.h:559
Power_PolicyFxn policyFxn
The Power Policy function.
Definition: PowerCC26XX.h:437
bool initialized
Definition: PowerCC26XX.h:572
int32_t nRtrimNew
Definition: PowerCC26XX.h:560
int32_t nCtrimNew
Definition: PowerCC26XX.h:558
void PowerCC26XX_schedulerDisable(void)
ClockP_Handle PowerCC26XX_getClockHandle(void)
Get the handle of the Clock object used for scheduling device wakeups.
void(* Power_PolicyFxn)(void)
Power policy function pointer.
Definition: Power.h:406
uint32_t state
Definition: PowerCC26XX.h:564
bool busyCal
Definition: PowerCC26XX.h:568
void PowerCC26XX_standbyPolicy(void)
The STANDBY Power Policy.
void PowerCC26XX_switchXOSC_HF(void)
Switch the HF clock source to XOSC_HF.
bool calibrateRCOSC_HF
Boolean specifying whether the high frequency RC oscillator (RCOSC_HF) should be calibrated.
Definition: PowerCC26XX.h:537
Power_PolicyFxn policyFxn
Definition: PowerCC26XX.h:582
uint32_t PowerCC26XX_getXoscStartupTime(uint32_t timeUntilWakeupInMs)
Get the estimated HF crystal oscillator (XOSC_HF) startup delay, for a given delay from now...
int32_t nCtrimCurr
Definition: PowerCC26XX.h:556
PowerCC26XX_ModuleState.
Definition: PowerCC26XX.h:546
uint8_t calStep
Definition: PowerCC26XX.h:569
ClockP_Struct calClockStruct
Definition: PowerCC26XX.h:553
Global configuration structure.
Definition: PowerCC26XX.h:407
bool PowerCC26XX_injectCalibration(void)
Explicitly trigger RC oscillator calibration.
int32_t nCtrimFractCurr
Definition: PowerCC26XX.h:557
int32_t nDeltaFreqCurr
Definition: PowerCC26XX.h:555
bool PowerCC26XX_noCalibrate(unsigned int arg)
Function to specify when RCOSC calibration is to be disabled.
bool firstLF
Definition: PowerCC26XX.h:570
int32_t nRtrimCurr
Definition: PowerCC26XX.h:561
ClockP_Struct xoscClockObj
Definition: PowerCC26XX.h:551
ClockP_Struct clockObj
Definition: PowerCC26XX.h:550
bool enablePolicy
Definition: PowerCC26XX.h:571
Hardware Interrupt module for the RTOS Porting Interface.
ClockP_Struct lfClockObj
Definition: PowerCC26XX.h:552
void PowerCC26XX_schedulerRestore(void)
uint8_t hwiState
Definition: PowerCC26XX.h:567
List_List notifyList
Definition: PowerCC26XX.h:548
void * ClockP_Handle
Opaque client reference to an instance of a ClockP.
Definition: ClockP.h:112
bool PowerCC26XX_isStableXOSC_HF(void)
Check if the XOSC_HF is stable and ready to be switched to.