84 #ifndef ti_drivers_power_PowerCC23X0_ 85 #define ti_drivers_power_PowerCC23X0_ 91 #include <ti/devices/DeviceFamily.h> 92 #include DeviceFamily_constructPath(inc/hw_pmctl.h) 93 #include DeviceFamily_constructPath(inc/hw_clkctl.h) 94 #include DeviceFamily_constructPath(inc/hw_lrfddbell.h) 95 #include DeviceFamily_constructPath(inc/hw_memmap.h) 96 #include DeviceFamily_constructPath(inc/hw_types.h) 97 #include DeviceFamily_constructPath(driverlib/pmctl.h) 104 #define PowerCC23X0_RESUMETIMESTANDBY 400 107 #define PowerCC23X0_TOTALTIMESTANDBY 500 110 #define PowerCC23X0_WAKEDELAYSTANDBY 185 113 #define PowerCC23X0_HFXT_THRESHOLD_TEMP_DEFAULT (-40) 122 #define PowerCC23X0_PERIPH_GROUP_M 0xFF00 123 #define PowerCC23X0_PERIPH_GROUP_CLKCTL0 0x0000 124 #define PowerCC23X0_PERIPH_GROUP_LRFD 0x0100 125 #define PowerCC23X0_PERIPH_BIT_INDEX_M 0x00FF 130 typedef uint16_t PowerLPF3_Resource;
136 #define PowerLPF3_PERIPH_GPIO (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_GPIO_S) 139 #define PowerLPF3_PERIPH_UART0 (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_UART0_S) 142 #define PowerLPF3_PERIPH_I2C0 (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_I2C0_S) 145 #define PowerLPF3_PERIPH_SPI0 (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_SPI0_S) 148 #define PowerLPF3_PERIPH_ADC0 (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_ADC0_S) 151 #define PowerLPF3_PERIPH_AES (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LAES_S) 154 #define PowerLPF3_PERIPH_DMA (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_DMA_S) 157 #define PowerLPF3_PERIPH_LGPT0 (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LGPT0_S) 160 #define PowerLPF3_PERIPH_LGPT1 (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LGPT1_S) 163 #if !defined(DeviceFamily_CC23X0R2) 165 #define PowerLPF3_PERIPH_LGPT2 (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LGPT2_S) 168 #define PowerLPF3_PERIPH_LGPT3 (PowerCC23X0_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LGPT3_S) 172 #define PowerLPF3_PERIPH_LFRD_TRC (PowerCC23X0_PERIPH_GROUP_LRFD | LRFDDBELL_CLKCTL_TRC_S) 175 #define PowerLPF3_PERIPH_LFRD_S2RRAM (PowerCC23X0_PERIPH_GROUP_LRFD | LRFDDBELL_CLKCTL_S2RRAM_S) 183 #if defined(DeviceFamily_CC23X0R2) 184 #define PowerCC23X0_NUMRESOURCES_CLKCTL0 29 185 #elif (defined(DeviceFamily_CC23X0R5) || defined(DeviceFamily_CC23X0R22)) 186 #define PowerCC23X0_NUMRESOURCES_CLKCTL0 31 188 #error "Unsupported DeviceFamily specified!" 190 #define PowerCC23X0_NUMRESOURCES_LRFD 12 193 #define PowerLPF3_STANDBY 0x1 196 #define PowerLPF3_ENABLE 1 197 #define PowerLPF3_DISABLE 0 207 #define PowerLPF3_DISALLOW_SHUTDOWN 0 210 #define PowerLPF3_DISALLOW_STANDBY 1 213 #define PowerLPF3_DISALLOW_IDLE 2 216 #define PowerLPF3_NEED_FLASH_IN_IDLE 3 219 #define PowerCC23X0_NUMCONSTRAINTS 4 230 #define PowerLPF3_ENTERING_STANDBY (1 << 0) 233 #define PowerLPF3_ENTERING_SHUTDOWN (1 << 1) 236 #define PowerLPF3_AWAKE_STANDBY (1 << 2) 241 #define PowerLPF3_HFXT_AVAILABLE (1 << 3) 246 #define PowerLPF3_LFCLK_SWITCHED (1 << 4) 249 #define PowerCC23X0_NUMEVENTS 5 371 return (PowerLPF3_ResetReason)PMCTLGetResetReason();
390 HWREG(PMCTL_BASE + PMCTL_O_SLPCTL) = PMCTL_SLPCTL_SLPN_DIS;
Definition: PowerCC23X0.h:345
void PowerCC23X0_schedulerRestore(void)
PowerLPF3_ResetReason
Reasons the device has booted or rebooted.
Definition: PowerCC23X0.h:320
void PowerLPF3_disableHFXTCompensation(void)
Disable HFXT temperature compensation.
void PowerCC23X0_doWFI(void)
The wait for interrupt (WFI) policy.
Definition: PowerCC23X0.h:343
Clock interface for the RTOS Porting Interface.
Definition: PowerCC23X0.h:333
void(* Power_PolicyInitFxn)(void)
Power policy initialization function pointer.
Definition: Power.h:401
Global configuration structure.
Definition: PowerCC23X0.h:261
void PowerLPF3_enableHFXTCompensation(int16_t tempThreshold, int16_t tempDelta)
Enable HFXT temperature compensation.
Definition: PowerCC23X0.h:337
Definition: PowerCC23X0.h:335
Definition: PowerCC23X0.h:339
void PowerLPF3_adjustHfxtAmp(int_fast8_t adjustment)
Adjust the HFXT amplitude.
int_fast8_t PowerLPF3_getHfxtAmpAdjustment(void)
Check if HFXT amplitude needs to be adjusted.
void PowerCC23X0_standbyPolicy(void)
The STANDBY Power Policy.
void(* Power_PolicyFxn)(void)
Power policy function pointer.
Definition: Power.h:406
Power_PolicyInitFxn policyInitFxn
The Power Policy's initialization function.
Definition: PowerCC23X0.h:269
void PowerLPF3_initHFXTCompensation(int32_t P0, int32_t P1, int32_t P2, int32_t P3, uint8_t shift, bool fcfgInsertion)
Initialise HFXT temperature compensation coefficients.
Power_PolicyFxn policyFxn
The Power Policy function.
Definition: PowerCC23X0.h:298
Definition: PowerCC23X0.h:327
void PowerCC23X0_schedulerDisable(void)
void PowerLPF3_selectLFXT(void)
Select LFXT as LFCLK source.
void PowerLPF3_selectLFOSC(void)
Select LFOSC as LFCLK source.
Definition: PowerCC23X0.h:323
Definition: PowerCC23X0.h:329
void PowerLPF3_startInitialHfxtAmpComp(void)
Start initial compensation of the HFXT amplitude.
void(* PowerLPF3_StartInitialHfxtAmpCompFxn)(void)
Function pointer to PowerLPF3_startInitialHfxtAmpComp() or NULL.
Definition: PowerCC23X0.h:258
Definition: PowerCC23X0.h:341
Definition: PowerCC23X0.h:331
static PowerLPF3_ResetReason PowerLPF3_getResetReason(void)
Returns the reason for the most recent reset or wakeup.
Definition: PowerCC23X0.h:369
PowerLPF3_StartInitialHfxtAmpCompFxn startInitialHfxtAmpCompFxn
Pointer to the function to start the initial HFXT amplitude compensation.
Definition: PowerCC23X0.h:314
static void PowerLPF3_releaseLatches(void)
Unlatch all IOs.
Definition: PowerCC23X0.h:388
Hardware Interrupt module for the RTOS Porting Interface.
void PowerLPF3_selectEXTLF(void)
Select EXTLF as LFCLK source.
Definition: PowerCC23X0.h:325
Definition: PowerCC23X0.h:347