111 #ifndef ti_drivers_power_PowerCC27XX_ 112 #define ti_drivers_power_PowerCC27XX_ 118 #include <ti/devices/DeviceFamily.h> 119 #include DeviceFamily_constructPath(inc/hw_pmctl.h) 120 #include DeviceFamily_constructPath(inc/hw_clkctl.h) 121 #include DeviceFamily_constructPath(inc/hw_lrfddbell.h) 122 #include DeviceFamily_constructPath(inc/hw_memmap.h) 123 #include DeviceFamily_constructPath(inc/hw_types.h) 124 #include DeviceFamily_constructPath(driverlib/pmctl.h) 131 #define PowerCC27XX_RESUMETIMESTANDBY (400U) 134 #define PowerCC27XX_TOTALTIMESTANDBY (500U) 137 #define PowerCC27XX_WAKEDELAYSTANDBY (150U) 140 #define PowerCC27XX_HFXT_THRESHOLD_TEMP_DEFAULT (-40) 149 #define PowerCC27XX_PERIPH_GROUP_M (0xFF00U) 150 #define PowerCC27XX_PERIPH_GROUP_CLKCTL0 (0x0000U) 151 #define PowerCC27XX_PERIPH_GROUP_CLKCTL1 (0x0100U) 152 #define PowerCC27XX_PERIPH_GROUP_LRFD (0x0200U) 153 #define PowerCC27XX_PERIPH_BIT_INDEX_M (0x00FFU) 158 typedef uint16_t PowerLPF3_Resource;
164 #define PowerLPF3_PERIPH_GPIO (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_GPIO_S) 167 #define PowerLPF3_PERIPH_UART0 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_UART0_S) 170 #define PowerLPF3_PERIPH_UART1 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_UART1_S) 173 #define PowerLPF3_PERIPH_I2C0 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_I2C0_S) 176 #define PowerLPF3_PERIPH_SPI0 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_SPI0_S) 179 #define PowerLPF3_PERIPH_SPI1 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_SPI1_S) 182 #define PowerLPF3_PERIPH_ADC0 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_ADC0_S) 185 #define PowerLPF3_PERIPH_AES (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LAES_S) 188 #define PowerLPF3_PERIPH_DMA (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_DMA_S) 191 #define PowerLPF3_PERIPH_I2S (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_I2S_S) 194 #define PowerLPF3_PERIPH_LGPT0 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LGPT0_S) 197 #define PowerLPF3_PERIPH_LGPT1 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LGPT1_S) 200 #define PowerLPF3_PERIPH_LGPT2 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LGPT2_S) 203 #define PowerLPF3_PERIPH_LGPT3 (PowerCC27XX_PERIPH_GROUP_CLKCTL0 | CLKCTL_DESCEX0_LGPT3_S) 206 #define PowerLPF3_PERIPH_HSM (PowerCC27XX_PERIPH_GROUP_CLKCTL1 | CLKCTL_DESCEX1_HSM_S) 209 #define PowerLPF3_PERIPH_APU (PowerCC27XX_PERIPH_GROUP_CLKCTL1 | CLKCTL_DESCEX1_APU_S) 212 #define PowerLPF3_PERIPH_MCAN (PowerCC27XX_PERIPH_GROUP_CLKCTL1 | CLKCTL_DESCEX1_MCAN_S) 215 #define PowerLPF3_PERIPH_LFRD_TRC (PowerCC27XX_PERIPH_GROUP_LRFD | LRFDDBELL_CLKCTL_TRC_S) 218 #define PowerLPF3_PERIPH_LFRD_S2RRAM (PowerCC27XX_PERIPH_GROUP_LRFD | LRFDDBELL_CLKCTL_S2RRAM_S) 226 #define PowerCC27XX_NUMRESOURCES_CLKCTL0 (31U) 227 #define PowerCC27XX_NUMRESOURCES_CLKCTL1 (7U) 228 #define PowerCC27XX_NUMRESOURCES_LRFD (12U) 232 #define PowerLPF3_STANDBY (0x1U) 242 #define PowerLPF3_DISALLOW_SHUTDOWN (0U) 245 #define PowerLPF3_DISALLOW_STANDBY (1U) 248 #define PowerLPF3_DISALLOW_IDLE (2U) 251 #define PowerLPF3_NEED_FLASH_IN_IDLE (3U) 254 #define PowerLPF3_DISALLOW_SWTCXO (4U) 257 #define PowerCC27XX_NUMCONSTRAINTS (5U) 268 #define PowerLPF3_ENTERING_STANDBY ((uint_fast16_t)((uint_fast16_t)1U << 0)) 271 #define PowerLPF3_ENTERING_SHUTDOWN ((uint_fast16_t)((uint_fast16_t)1U << 1)) 274 #define PowerLPF3_AWAKE_STANDBY ((uint_fast16_t)((uint_fast16_t)1U << 2)) 279 #define PowerLPF3_HFXT_AVAILABLE ((uint_fast16_t)((uint_fast16_t)1U << 3)) 284 #define PowerLPF3_LFCLK_SWITCHED ((uint_fast16_t)((uint_fast16_t)1U << 4)) 287 #define PowerCC27XX_NUMEVENTS (5U) bool PowerLPF3_isLfincFilterAllowingStandby(void)
Checks if the LFINC filter is ready to go to standby or not.
Definition: PowerCC27XX.h:363
Definition: PowerCC27XX.h:367
Definition: PowerCC27XX.h:397
Definition: PowerCC27XX.h:385
void PowerLPF3_initHFXTCompensation(int32_t P0, int32_t P1, int32_t P2, int32_t P3, uint8_t shift, bool fcfgInsertion)
Initialize HFXT temperature compensation coefficients.
Clock interface for the RTOS Porting Interface.
void(* Power_PolicyInitFxn)(void)
Power policy initialization function pointer.
Definition: Power.h:401
PowerLPF3_StartInitialHfxtAmpCompFxn startInitialHfxtAmpCompFxn
Pointer to the function to start the initial HFXT amplitude compensation.
Definition: PowerCC27XX.h:352
Definition: PowerCC27XX.h:379
uint32_t systemWakeupIntervalUsec
The expected interval in us between system wakeups.
Definition: PowerCC27XX.h:426
Definition: PowerCC27XX.h:398
void PowerLPF3_stopAFOSC(void)
Stop the AFOSC.
void PowerLPF3_selectEXTLF(void)
Select EXTLF as LFCLK source.
Definition: PowerCC27XX.h:377
int_fast16_t PowerLPF3_sleep(uint32_t nextEventTimeUs)
Transition the device into standby and configure RTC to wakeup the device ahead of a specified time...
void PowerCC27XX_standbyPolicy(void)
The STANDBY Power Policy.
Definition: PowerCC27XX.h:369
Definition: PowerCC27XX.h:383
Definition: PowerCC27XX.h:373
void(* Power_PolicyFxn)(void)
Power policy function pointer.
Definition: Power.h:406
PowerLPF3_ResetReason
Reasons the device has booted or rebooted.
Definition: PowerCC27XX.h:358
void PowerLPF3_startInitialHfxtAmpComp(void)
Start initial compensation of the HFXT amplitude.
Power_PolicyFxn policyFxn
The Power Policy function.
Definition: PowerCC27XX.h:336
Global configuration structure.
Definition: PowerCC27XX.h:299
PowerLPF3_LfoscCompensationPpmRequirement ppmRequirement
The PPM requirements.
Definition: PowerCC27XX.h:429
void PowerLPF3_adjustHfxtAmp(int_fast8_t adjustment)
Adjust the HFXT amplitude.
void PowerLPF3_enableHFXTCompensation(int16_t tempThreshold, int16_t tempDelta)
Enable HFXT temperature compensation.
PowerLPF3_ResetReason PowerLPF3_getResetReason(void)
Returns the reason for the most recent reset or wakeup.
void PowerCC27XX_schedulerDisable(void)
void PowerLPF3_selectLFXT(void)
Select LFXT as LFCLK source.
PowerLPF3_AfoscFreq
The possible frequencies to configure the AFOSC to.
Definition: PowerCC27XX.h:395
Power_PolicyInitFxn policyInitFxn
The Power Policy's initialization function.
Definition: PowerCC27XX.h:307
Definition: PowerCC27XX.h:365
Definition: PowerCC27XX.h:381
uint16_t maxAllowedJitterUsec
The maximum additional jitter allowed per wakeup beyond the ppm requirement in us.
Definition: PowerCC27XX.h:432
Definition: PowerCC27XX.h:361
Definition: PowerCC27XX.h:387
Definition: PowerCC27XX.h:399
void PowerLPF3_setLfoscCompensationProfile(const PowerLPF3_LfoscCompensationProfile *profile)
Set LFOSC Compensation Profile.
500 PPM
Definition: PowerCC27XX.h:408
void PowerLPF3_disableLfoscCompensation(void)
Disable LFOSC Compensation.
void PowerLPF3_selectLFOSC(void)
Select LFOSC as LFCLK source.
uint32_t PowerLPF3_getHFXTCompensationRatio(void)
Get the current HFXT compensation ratio.
void(* PowerLPF3_StartInitialHfxtAmpCompFxn)(void)
Function pointer to PowerLPF3_startInitialHfxtAmpComp() or NULL.
Definition: PowerCC27XX.h:296
int_fast8_t PowerLPF3_getHfxtAmpAdjustment(void)
Check if HFXT amplitude needs to be adjusted.
LFOSC Compensation Profile structure.
Definition: PowerCC27XX.h:420
void PowerLPF3_releaseLatches(void)
Unlatch all IOs.
Definition: PowerCC27XX.h:371
Definition: PowerCC27XX.h:375
void PowerLPF3_disableHFXTCompensation(void)
Disable HFXT temperature compensation.
PowerLPF3_LfoscCompensationPpmRequirement
Possible LFOSC PPM requirements to be used by the LFOSC compensation.
Definition: PowerCC27XX.h:405
void PowerLPF3_initLfoscCompensation(void)
Initialize LFOSC Compensation.
void PowerLPF3_forceHFXTCompensationUpdate(void)
Force HFXT temperature compensation update.
uint16_t temperatureGradientMilliCelsiusPerSec
The absolute value of the worst case expected temperature gradient in mC/s.
Definition: PowerCC27XX.h:437
Hardware Interrupt module for the RTOS Porting Interface.
void PowerCC27XX_doWFI(void)
The wait for interrupt (WFI) policy.
void PowerCC27XX_schedulerRestore(void)
void PowerLPF3_enableLfoscCompensation(void)
Enable LFOSC Compensation.
int_fast16_t PowerLPF3_startAFOSC(PowerLPF3_AfoscFreq frequency)
Start the AFOSC.