63 #include <inc/hw_memmap.h>
64 #include <inc/hw_types.h>
65 #include <inc/hw_adi.h>
66 #include <inc/hw_adi_0_rf.h>
67 #include <inc/hw_adi_1_synth.h>
68 #include <inc/hw_adi_2_refsys.h>
69 #include <inc/hw_adi_3_refsys.h>
70 #include <inc/hw_adi_4_aux.h>
71 #include <inc/hw_aon_ioc.h>
72 #include <inc/hw_aon_sysctl.h>
73 #include <inc/hw_aon_wuc.h>
74 #include <inc/hw_aux_wuc.h>
75 #include <inc/hw_ccfg.h>
76 #include <inc/hw_chip_def.h>
77 #include <inc/hw_ddi.h>
78 #include <inc/hw_flash.h>
79 #include <inc/hw_fcfg1.h>
80 #include <inc/hw_ddi_0_osc.h>
81 #include <inc/hw_prcm.h>
82 #include <inc/hw_vims.h>
83 #include <inc/hw_aon_batmon.h>
84 #include <inc/hw_aon_rtc.h>
109 #if !defined(DOXYGEN)
110 #define SetupTrimDevice NOROM_SetupTrimDevice
111 #define SetupAfterColdResetWakeupFromShutDownCfg1 NOROM_SetupAfterColdResetWakeupFromShutDownCfg1
112 #define SetupAfterColdResetWakeupFromShutDownCfg2 NOROM_SetupAfterColdResetWakeupFromShutDownCfg2
113 #define SetupAfterColdResetWakeupFromShutDownCfg3 NOROM_SetupAfterColdResetWakeupFromShutDownCfg3
114 #define SetupGetTrimForAdcShModeEn NOROM_SetupGetTrimForAdcShModeEn
115 #define SetupGetTrimForAdcShVbufEn NOROM_SetupGetTrimForAdcShVbufEn
116 #define SetupGetTrimForAmpcompCtrl NOROM_SetupGetTrimForAmpcompCtrl
117 #define SetupGetTrimForAmpcompTh1 NOROM_SetupGetTrimForAmpcompTh1
118 #define SetupGetTrimForAmpcompTh2 NOROM_SetupGetTrimForAmpcompTh2
119 #define SetupGetTrimForAnabypassValue1 NOROM_SetupGetTrimForAnabypassValue1
120 #define SetupGetTrimForDblrLoopFilterResetVoltage NOROM_SetupGetTrimForDblrLoopFilterResetVoltage
121 #define SetupGetTrimForRadcExtCfg NOROM_SetupGetTrimForRadcExtCfg
122 #define SetupGetTrimForRcOscLfIBiasTrim NOROM_SetupGetTrimForRcOscLfIBiasTrim
123 #define SetupGetTrimForRcOscLfRtuneCtuneTrim NOROM_SetupGetTrimForRcOscLfRtuneCtuneTrim
124 #define SetupGetTrimForXoscHfCtl NOROM_SetupGetTrimForXoscHfCtl
125 #define SetupGetTrimForXoscHfFastStart NOROM_SetupGetTrimForXoscHfFastStart
126 #define SetupGetTrimForXoscHfIbiastherm NOROM_SetupGetTrimForXoscHfIbiastherm
127 #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio NOROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
128 #define SetupSignExtendVddrTrimValue NOROM_SetupSignExtendVddrTrimValue
129 #define SetupSetCacheModeAccordingToCcfgSetting NOROM_SetupSetCacheModeAccordingToCcfgSetting
130 #define SetupSetAonRtcSubSecInc NOROM_SetupSetAonRtcSubSecInc
131 #define SetupSetVddrLevel NOROM_SetupSetVddrLevel
311 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
313 #ifdef ROM_SetupTrimDevice
314 #undef SetupTrimDevice
315 #define SetupTrimDevice ROM_SetupTrimDevice
317 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg1
318 #undef SetupAfterColdResetWakeupFromShutDownCfg1
319 #define SetupAfterColdResetWakeupFromShutDownCfg1 ROM_SetupAfterColdResetWakeupFromShutDownCfg1
321 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg2
322 #undef SetupAfterColdResetWakeupFromShutDownCfg2
323 #define SetupAfterColdResetWakeupFromShutDownCfg2 ROM_SetupAfterColdResetWakeupFromShutDownCfg2
325 #ifdef ROM_SetupAfterColdResetWakeupFromShutDownCfg3
326 #undef SetupAfterColdResetWakeupFromShutDownCfg3
327 #define SetupAfterColdResetWakeupFromShutDownCfg3 ROM_SetupAfterColdResetWakeupFromShutDownCfg3
329 #ifdef ROM_SetupGetTrimForAdcShModeEn
330 #undef SetupGetTrimForAdcShModeEn
331 #define SetupGetTrimForAdcShModeEn ROM_SetupGetTrimForAdcShModeEn
333 #ifdef ROM_SetupGetTrimForAdcShVbufEn
334 #undef SetupGetTrimForAdcShVbufEn
335 #define SetupGetTrimForAdcShVbufEn ROM_SetupGetTrimForAdcShVbufEn
337 #ifdef ROM_SetupGetTrimForAmpcompCtrl
338 #undef SetupGetTrimForAmpcompCtrl
339 #define SetupGetTrimForAmpcompCtrl ROM_SetupGetTrimForAmpcompCtrl
341 #ifdef ROM_SetupGetTrimForAmpcompTh1
342 #undef SetupGetTrimForAmpcompTh1
343 #define SetupGetTrimForAmpcompTh1 ROM_SetupGetTrimForAmpcompTh1
345 #ifdef ROM_SetupGetTrimForAmpcompTh2
346 #undef SetupGetTrimForAmpcompTh2
347 #define SetupGetTrimForAmpcompTh2 ROM_SetupGetTrimForAmpcompTh2
349 #ifdef ROM_SetupGetTrimForAnabypassValue1
350 #undef SetupGetTrimForAnabypassValue1
351 #define SetupGetTrimForAnabypassValue1 ROM_SetupGetTrimForAnabypassValue1
353 #ifdef ROM_SetupGetTrimForDblrLoopFilterResetVoltage
354 #undef SetupGetTrimForDblrLoopFilterResetVoltage
355 #define SetupGetTrimForDblrLoopFilterResetVoltage ROM_SetupGetTrimForDblrLoopFilterResetVoltage
357 #ifdef ROM_SetupGetTrimForRadcExtCfg
358 #undef SetupGetTrimForRadcExtCfg
359 #define SetupGetTrimForRadcExtCfg ROM_SetupGetTrimForRadcExtCfg
361 #ifdef ROM_SetupGetTrimForRcOscLfIBiasTrim
362 #undef SetupGetTrimForRcOscLfIBiasTrim
363 #define SetupGetTrimForRcOscLfIBiasTrim ROM_SetupGetTrimForRcOscLfIBiasTrim
365 #ifdef ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim
366 #undef SetupGetTrimForRcOscLfRtuneCtuneTrim
367 #define SetupGetTrimForRcOscLfRtuneCtuneTrim ROM_SetupGetTrimForRcOscLfRtuneCtuneTrim
369 #ifdef ROM_SetupGetTrimForXoscHfCtl
370 #undef SetupGetTrimForXoscHfCtl
371 #define SetupGetTrimForXoscHfCtl ROM_SetupGetTrimForXoscHfCtl
373 #ifdef ROM_SetupGetTrimForXoscHfFastStart
374 #undef SetupGetTrimForXoscHfFastStart
375 #define SetupGetTrimForXoscHfFastStart ROM_SetupGetTrimForXoscHfFastStart
377 #ifdef ROM_SetupGetTrimForXoscHfIbiastherm
378 #undef SetupGetTrimForXoscHfIbiastherm
379 #define SetupGetTrimForXoscHfIbiastherm ROM_SetupGetTrimForXoscHfIbiastherm
381 #ifdef ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
382 #undef SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
383 #define SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio ROM_SetupGetTrimForXoscLfRegulatorAndCmirrwrRatio
385 #ifdef ROM_SetupSignExtendVddrTrimValue
386 #undef SetupSignExtendVddrTrimValue
387 #define SetupSignExtendVddrTrimValue ROM_SetupSignExtendVddrTrimValue
389 #ifdef ROM_SetupSetCacheModeAccordingToCcfgSetting
390 #undef SetupSetCacheModeAccordingToCcfgSetting
391 #define SetupSetCacheModeAccordingToCcfgSetting ROM_SetupSetCacheModeAccordingToCcfgSetting
393 #ifdef ROM_SetupSetAonRtcSubSecInc
394 #undef SetupSetAonRtcSubSecInc
395 #define SetupSetAonRtcSubSecInc ROM_SetupSetAonRtcSubSecInc
397 #ifdef ROM_SetupSetVddrLevel
398 #undef SetupSetVddrLevel
399 #define SetupSetVddrLevel ROM_SetupSetVddrLevel
412 #endif // __SETUP_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 SetupTrimDevice(void)
Performs the necessary trim of the device which is not done in boot code.
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...
int32_t SetupSignExtendVddrTrimValue(uint32_t ui32VddrTrimVal)
Sign extend the VDDR_TRIM setting (special format ranging from -10 to +21)
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...