48 #ifndef __SETUP_ROM_H__
49 #define __SETUP_ROM_H__
63 #include <inc/hw_types.h>
81 #define SetupAfterColdResetWakeupFromShutDownCfg1 NOROM_SetupAfterColdResetWakeupFromShutDownCfg1
82 #define SetupAfterColdResetWakeupFromShutDownCfg2 NOROM_SetupAfterColdResetWakeupFromShutDownCfg2
83 #define SetupAfterColdResetWakeupFromShutDownCfg3 NOROM_SetupAfterColdResetWakeupFromShutDownCfg3
84 #define SetupGetTrimForAdcShModeEn NOROM_SetupGetTrimForAdcShModeEn
85 #define SetupGetTrimForAdcShVbufEn NOROM_SetupGetTrimForAdcShVbufEn
86 #define SetupGetTrimForAmpcompCtrl NOROM_SetupGetTrimForAmpcompCtrl
87 #define SetupGetTrimForAmpcompTh1 NOROM_SetupGetTrimForAmpcompTh1
88 #define SetupGetTrimForAmpcompTh2 NOROM_SetupGetTrimForAmpcompTh2
89 #define SetupGetTrimForAnabypassValue1 NOROM_SetupGetTrimForAnabypassValue1
90 #define SetupGetTrimForDblrLoopFilterResetVoltage NOROM_SetupGetTrimForDblrLoopFilterResetVoltage
91 #define SetupGetTrimForRadcExtCfg NOROM_SetupGetTrimForRadcExtCfg
92 #define SetupGetTrimForRcOscLfIBiasTrim NOROM_SetupGetTrimForRcOscLfIBiasTrim
93 #define SetupGetTrimForRcOscLfRtuneCtuneTrim NOROM_SetupGetTrimForRcOscLfRtuneCtuneTrim
94 #define SetupGetTrimForXoscHfCtl NOROM_SetupGetTrimForXoscHfCtl
95 #define SetupGetTrimForXoscHfFastStart NOROM_SetupGetTrimForXoscHfFastStart
96 #define SetupGetTrimForXoscHfIbiastherm NOROM_SetupGetTrimForXoscHfIbiastherm
97 #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio NOROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
98 #define SetupSetCacheModeAccordingToCcfgSetting NOROM_SetupSetCacheModeAccordingToCcfgSetting
99 #define SetupSetAonRtcSubSecInc NOROM_SetupSetAonRtcSubSecInc
100 #define SetupSetVddrLevel NOROM_SetupSetVddrLevel
232 __STATIC_INLINE int32_t
239 int32_t i32SignedVddrVal = ui32VddrTrimVal;
240 if ( i32SignedVddrVal > 0x15 ) {
241 i32SignedVddrVal -= 0x20;
243 return ( i32SignedVddrVal );
279 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
281 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1
282 #undef SetupAfterColdResetWakeupFromShutDownCfg1
283 #define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1
285 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2
286 #undef SetupAfterColdResetWakeupFromShutDownCfg2
287 #define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2
289 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3
290 #undef SetupAfterColdResetWakeupFromShutDownCfg3
291 #define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3
293 #ifdef ROM_SetupGetTrimForAdcShModeEn
294 #undef SetupGetTrimForAdcShModeEn
295 #define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn
297 #ifdef ROM_SetupGetTrimForAdcShVbufEn
298 #undef SetupGetTrimForAdcShVbufEn
299 #define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn
301 #ifdef ROM_SetupGetTrimForAmpcompCtrl
302 #undef SetupGetTrimForAmpcompCtrl
303 #define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl
305 #ifdef ROM_SetupGetTrimForAmpcompTh1
306 #undef SetupGetTrimForAmpcompTh1
307 #define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1
309 #ifdef ROM_SetupGetTrimForAmpcompTh2
310 #undef SetupGetTrimForAmpcompTh2
311 #define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2
313 #ifdef ROM_SetupGetTrimForAnabypassValue1
314 #undef SetupGetTrimForAnabypassValue1
315 #define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1
317 #ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage
318 #undef SetupGetTrimForDblrLoopFilterResetVoltage
319 #define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage
321 #ifdef ROM_SetupGetTrimForRadcExtCfg
322 #undef SetupGetTrimForRadcExtCfg
323 #define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg
325 #ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim
326 #undef SetupGetTrimForRcOscLfIBiasTrim
327 #define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim
329 #ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim
330 #undef SetupGetTrimForRcOscLfRtuneCtuneTrim
331 #define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim
333 #ifdef ROM_SetupGetTrimForXoscHfCtl
334 #undef SetupGetTrimForXoscHfCtl
335 #define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl
337 #ifdef ROM_SetupGetTrimForXoscHfFastStart
338 #undef SetupGetTrimForXoscHfFastStart
339 #define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart
341 #ifdef ROM_SetupGetTrimForXoscHfIbiastherm
342 #undef SetupGetTrimForXoscHfIbiastherm
343 #define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm
345 #ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
346 #undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
347 #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
349 #ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting
350 #undef SetupSetCacheModeAccordingToCcfgSetting
351 #define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting
353 #ifdef ROM_SetupSetAonRtcSubSecInc
354 #undef SetupSetAonRtcSubSecInc
355 #define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc
357 #ifdef ROM_SetupSetVddrLevel
358 #undef SetupSetVddrLevel
359 #define SetupSetVddrLevel ROM_SetupSetVddrLevel
372 #endif // __SETUP_ROM_H__
uint32_t SetupGetTrimForAmpcompTh1(void)
Returns the trim value to be used for the AMPCOMP_TH1 register in OSC_DIG.
uint32_t SetupGetTrimForRcOscLfRtuneCtuneTrim(void)
Returns the trim value to be used for the RCOSCLF_RTUNE_TRIM and the RCOSCLF_CTUNE_TRIM bit fields in...
uint32_t SetupGetTrimForAmpcompTh2(void)
Returns the trim value to be used for the AMPCOMP_TH2 register in OSC_DIG.
uint32_t SetupGetTrimForDblrLoopFilterResetVoltage(uint32_t ui32Fcfg1Revision)
Returns the trim value from FCFG1 to be used as DBLR_LOOP_FILTER_RESET_VOLTAGE setting.
void SetupAfterColdResetWakeupFromShutDownCfg3(uint32_t ccfg_ModeConfReg)
Third part of configuration required when waking up from shutdown.
uint32_t SetupGetTrimForAdcShVbufEn(uint32_t ui32Fcfg1Revision)
Returns the trim value from FCFG1 to be used as ADC_SH_VBUF_EN setting.
uint32_t SetupGetTrimForRadcExtCfg(uint32_t ui32Fcfg1Revision)
Returns the trim value to be used for the RADCEXTCFG register in OSC_DIG.
void SetupSetAonRtcSubSecInc(uint32_t subSecInc)
Doing the tricky stuff needed to enter new RTCSUBSECINC value.
uint32_t SetupGetTrimForRcOscLfIBiasTrim(uint32_t ui32Fcfg1Revision)
Returns the FCFG1 OSC_CONF_ATESTLF_RCOSCLF_IBIAS_TRIM.
void SetupAfterColdResetWakeupFromShutDownCfg1(uint32_t ccfg_ModeConfReg)
First part of configuration required when waking up from shutdown.
uint32_t SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio(uint32_t ui32Fcfg1Revision)
Returns XOSCLF_REGULATOR_TRIM and XOSCLF_CMIRRWR_RATIO as one packet spanning bits [5:0] in the retur...
uint32_t SetupGetTrimForAnabypassValue1(uint32_t ccfg_ModeConfReg)
Returns the trim value to be used for the ANABYPASS_VALUE1 register in OSC_DIG.
void SetupSetCacheModeAccordingToCcfgSetting(void)
Set correct VIMS_MODE according to CCFG setting (CACHE or GPRAM)
uint32_t SetupGetTrimForAdcShModeEn(uint32_t ui32Fcfg1Revision)
Returns the trim value from FCFG1 to be used as ADC_SH_MODE_EN setting.
uint32_t SetupGetTrimForAmpcompCtrl(uint32_t ui32Fcfg1Revision)
Returns the trim value to be used for the AMPCOMP_CTRL register in OSC_DIG.
void SetupSetVddrLevel(uint32_t ccfg_ModeConfReg)
Set VDDR boost mode.
uint32_t SetupGetTrimForXoscHfFastStart(void)
Returns the trim value to be used as OSC_DIG:CTL1.XOSC_HF_FAST_START.
void SetupAfterColdResetWakeupFromShutDownCfg2(uint32_t ui32Fcfg1Revision, uint32_t ccfg_ModeConfReg)
Second part of configuration required when waking up from shutdown.
uint32_t SetupGetTrimForXoscHfCtl(uint32_t ui32Fcfg1Revision)
Returns the trim value to be used for the XOSCHFCTL register in OSC_DIG.
uint32_t SetupGetTrimForXoscHfIbiastherm(void)
Returns the trim value to be used for the XOSC_HF_IBIASTHERM bit field in the ANABYPASS_VALUE2 regist...
static int32_t SetupSignExtendVddrTrimValue(uint32_t ui32VddrTrimVal)
Sign extend the VDDR_TRIM setting (special format ranging from -10 to +21)