Skip to content

Commit 8067bf6

Browse files
committed
Update clock calibration structs to match latest Gecko SDK
1 parent 8b6451c commit 8067bf6

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32PG/TARGET_EFM32PG_STK3401/device_peripherals.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,25 @@
3333
#define PWM_TIMER_CLOCK cmuClock_TIMER1
3434
#define PWM_ROUTE TIMER_ROUTE_LOCATION_LOC1
3535

36+
/* Crystal Calibration */
37+
#if !defined(CMU_HFXOINIT_STK_DEFAULT)
38+
#define CMU_HFXOINIT_STK_DEFAULT \
39+
{ \
40+
true, /* Low-power mode for EFM32 */ \
41+
false, /* Disable auto-start on EM0/1 entry */ \
42+
false, /* Disable auto-select on EM0/1 entry */ \
43+
false, /* Disable auto-start and select on RAC wakeup */ \
44+
_CMU_HFXOSTARTUPCTRL_CTUNE_DEFAULT, \
45+
0x142, /* Steady-state CTUNE for STK boards without load caps */ \
46+
_CMU_HFXOSTEADYSTATECTRL_REGISH_DEFAULT, \
47+
0x20, /* Matching errata fix in CHIP_Init() */ \
48+
0x7, /* Recommended steady-state osc core bias current */ \
49+
0x6, /* Recommended peak detection threshold */ \
50+
_CMU_HFXOTIMEOUTCTRL_SHUNTOPTTIMEOUT_DEFAULT, \
51+
0xA, /* Recommended peak detection timeout */ \
52+
0x4, /* Recommended steady timeout */ \
53+
_CMU_HFXOTIMEOUTCTRL_STARTUPTIMEOUT_DEFAULT, \
54+
cmuOscMode_Crystal, \
55+
}
56+
#endif
3657
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG1/TARGET_EFR32MG1_BRD4150/device_peripherals.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@
4444
_CMU_HFXOSTARTUPCTRL_CTUNE_DEFAULT, \
4545
0x142, /* Steady-state CTUNE for WSTK boards without load caps */ \
4646
_CMU_HFXOSTEADYSTATECTRL_REGISH_DEFAULT, \
47-
_CMU_HFXOSTARTUPCTRL_IBTRIMXOCORE_DEFAULT, \
48-
0x7, /* Recommended steady-state XO core bias current */ \
47+
0x20, /* Matching errata fix in CHIP_Init() */ \
48+
0x7, /* Recommended steady-state osc core bias current */ \
4949
0x6, /* Recommended peak detection threshold */ \
5050
_CMU_HFXOTIMEOUTCTRL_SHUNTOPTTIMEOUT_DEFAULT, \
5151
0xA, /* Recommended peak detection timeout */ \
52-
_CMU_HFXOTIMEOUTCTRL_STEADYTIMEOUT_DEFAULT, \
52+
0x4, /* Recommended steady timeout */ \
5353
_CMU_HFXOTIMEOUTCTRL_STARTUPTIMEOUT_DEFAULT, \
54+
cmuOscMode_Crystal, \
5455
}
5556
#endif
5657
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG1/TARGET_THUNDERBOARD_SENSE/device_peripherals.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
false, /* Disable auto-select on EM0/1 entry */ \
4343
false, /* Disable auto-start and select on RAC wakeup */ \
4444
_CMU_HFXOSTARTUPCTRL_CTUNE_DEFAULT, \
45-
0x142, /* Steady-state CTUNE for WSTK boards without load caps */ \
45+
0x142, /* Steady-state CTUNE for TBSENSE boards without load caps */ \
4646
_CMU_HFXOSTEADYSTATECTRL_REGISH_DEFAULT, \
4747
_CMU_HFXOSTARTUPCTRL_IBTRIMXOCORE_DEFAULT, \
4848
0x7, /* Recommended steady-state XO core bias current */ \
@@ -51,6 +51,7 @@
5151
0xA, /* Recommended peak detection timeout */ \
5252
_CMU_HFXOTIMEOUTCTRL_STEADYTIMEOUT_DEFAULT, \
5353
_CMU_HFXOTIMEOUTCTRL_STARTUPTIMEOUT_DEFAULT, \
54+
cmuOscMode_Crystal, \
5455
}
5556
#endif
5657
#endif

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG12/TARGET_THUNDERBOARD_SENSE_12/device_peripherals.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
false, /* Disable auto-select on EM0/1 entry */ \
4343
false, /* Disable auto-start and select on RAC wakeup */ \
4444
_CMU_HFXOSTARTUPCTRL_CTUNE_DEFAULT, \
45-
0x142, /* Steady-state CTUNE for WSTK boards without load caps */ \
45+
0x142, /* Steady-state CTUNE for TBSENSE boards without load caps */ \
4646
_CMU_HFXOSTEADYSTATECTRL_REGISH_DEFAULT, \
4747
_CMU_HFXOSTARTUPCTRL_IBTRIMXOCORE_DEFAULT, \
4848
0x7, /* Recommended steady-state XO core bias current */ \
@@ -51,6 +51,7 @@
5151
0xA, /* Recommended peak detection timeout */ \
5252
_CMU_HFXOTIMEOUTCTRL_STEADYTIMEOUT_DEFAULT, \
5353
_CMU_HFXOTIMEOUTCTRL_STARTUPTIMEOUT_DEFAULT, \
54+
cmuOscMode_Crystal, \
5455
}
5556
#endif
5657
#endif

0 commit comments

Comments
 (0)