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
231 __STATIC_INLINE int32_t
238 int32_t i32SignedVddrVal = ui32VddrTrimVal;
239 if ( i32SignedVddrVal > 0x15 ) {
240 i32SignedVddrVal -= 0x20;
242 return ( i32SignedVddrVal );
277 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
279 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1
280 #undef SetupAfterColdResetWakeupFromShutDownCfg1
281 #define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1
283 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2
284 #undef SetupAfterColdResetWakeupFromShutDownCfg2
285 #define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2
287 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3
288 #undef SetupAfterColdResetWakeupFromShutDownCfg3
289 #define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3
291 #ifdef ROM_SetupGetTrimForAdcShModeEn
292 #undef SetupGetTrimForAdcShModeEn
293 #define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn
295 #ifdef ROM_SetupGetTrimForAdcShVbufEn
296 #undef SetupGetTrimForAdcShVbufEn
297 #define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn
299 #ifdef ROM_SetupGetTrimForAmpcompCtrl
300 #undef SetupGetTrimForAmpcompCtrl
301 #define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl
303 #ifdef ROM_SetupGetTrimForAmpcompTh1
304 #undef SetupGetTrimForAmpcompTh1
305 #define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1
307 #ifdef ROM_SetupGetTrimForAmpcompTh2
308 #undef SetupGetTrimForAmpcompTh2
309 #define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2
311 #ifdef ROM_SetupGetTrimForAnabypassValue1
312 #undef SetupGetTrimForAnabypassValue1
313 #define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1
315 #ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage
316 #undef SetupGetTrimForDblrLoopFilterResetVoltage
317 #define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage
319 #ifdef ROM_SetupGetTrimForRadcExtCfg
320 #undef SetupGetTrimForRadcExtCfg
321 #define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg
323 #ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim
324 #undef SetupGetTrimForRcOscLfIBiasTrim
325 #define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim
327 #ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim
328 #undef SetupGetTrimForRcOscLfRtuneCtuneTrim
329 #define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim
331 #ifdef ROM_SetupGetTrimForXoscHfCtl
332 #undef SetupGetTrimForXoscHfCtl
333 #define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl
335 #ifdef ROM_SetupGetTrimForXoscHfFastStart
336 #undef SetupGetTrimForXoscHfFastStart
337 #define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart
339 #ifdef ROM_SetupGetTrimForXoscHfIbiastherm
340 #undef SetupGetTrimForXoscHfIbiastherm
341 #define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm
343 #ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
344 #undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
345 #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
347 #ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting
348 #undef SetupSetCacheModeAccordingToCcfgSetting
349 #define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting
351 #ifdef ROM_SetupSetAonRtcSubSecInc
352 #undef SetupSetAonRtcSubSecInc
353 #define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc
366 #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.
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)