Skip to content

Commit 6264e0a

Browse files
committed
add defaults values
set all defaults to initial low as after a reset most STM32 eval boards use low power crystals and work with this setting
1 parent 622a452 commit 6264e0a

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

targets/TARGET_STM/mbed_overrides.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ extern void SetSysClock(void);
4343
# define LSE_DRIVE_LOAD_LEVEL MBED_CONF_TARGET_LSE_DRIVE_LOAD_LEVEL
4444
# else
4545
# if defined(RCC_LSE_HIGHDRIVE_MODE)
46-
# define LSE_DRIVE_LOAD_LEVEL RCC_LSE_HIGHDRIVE_MODE
46+
# define LSE_DRIVE_LOAD_LEVEL RCC_LSE_LOWPOWER_MODE
4747
# else
48-
# define LSE_DRIVE_LOAD_LEVEL RCC_LSEDRIVE_MEDIUMHIGH
48+
# define LSE_DRIVE_LOAD_LEVEL RCC_LSEDRIVE_LOW
4949
# endif
5050
# endif
5151

targets/targets.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,11 @@
11981198
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
11991199
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI",
12001200
"macro_name": "CLOCK_SOURCE"
1201+
},
1202+
"lse_drive_load_level": {
1203+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
1204+
"value": "RCC_LSEDRIVE_LOW",
1205+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
12011206
}
12021207
},
12031208
"macros_add": [
@@ -1407,6 +1412,11 @@
14071412
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (need HW patch) | USE_PLL_HSI",
14081413
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI",
14091414
"macro_name": "CLOCK_SOURCE"
1415+
},
1416+
"lse_drive_load_level": {
1417+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
1418+
"value": "RCC_LSEDRIVE_LOW",
1419+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
14101420
}
14111421
},
14121422
"device_has_add": [
@@ -2116,6 +2126,11 @@
21162126
"lpticker_lptim": {
21172127
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
21182128
"value": 1
2129+
},
2130+
"lse_drive_load_level": {
2131+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
2132+
"value": "RCC_LSEDRIVE_LOW",
2133+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
21192134
}
21202135
},
21212136
"overrides": {
@@ -2359,6 +2374,11 @@
23592374
"lpticker_lptim": {
23602375
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
23612376
"value": 1
2377+
},
2378+
"lse_drive_load_level": {
2379+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
2380+
"value": "RCC_LSEDRIVE_LOW",
2381+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
23622382
}
23632383
},
23642384
"extra_labels_add": [
@@ -2462,6 +2482,11 @@
24622482
"lpticker_lptim": {
24632483
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
24642484
"value": 1
2485+
},
2486+
"lse_drive_load_level": {
2487+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
2488+
"value": "RCC_LSEDRIVE_LOW",
2489+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
24652490
}
24662491
},
24672492
"extra_labels_add": [
@@ -2625,6 +2650,11 @@
26252650
"lpticker_lptim": {
26262651
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
26272652
"value": 1
2653+
},
2654+
"lse_drive_load_level": {
2655+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
2656+
"value": "RCC_LSEDRIVE_LOW",
2657+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
26282658
}
26292659
},
26302660
"components_add": [
@@ -2888,6 +2918,11 @@
28882918
"lpticker_lptim": {
28892919
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
28902920
"value": 1
2921+
},
2922+
"lse_drive_load_level": {
2923+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
2924+
"value": "RCC_LSEDRIVE_LOW",
2925+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
28912926
}
28922927
},
28932928
"macros_add": [
@@ -3121,6 +3156,11 @@
31213156
"lpticker_lptim": {
31223157
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
31233158
"value": 1
3159+
},
3160+
"lse_drive_load_level": {
3161+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
3162+
"value": "RCC_LSEDRIVE_LOW",
3163+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
31243164
}
31253165
},
31263166
"macros_add": [
@@ -3641,6 +3681,11 @@
36413681
"lpticker_lptim": {
36423682
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
36433683
"value": 1
3684+
},
3685+
"lse_drive_load_level": {
3686+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
3687+
"value": "RCC_LSEDRIVE_LOW",
3688+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
36443689
}
36453690
},
36463691
"overrides": {
@@ -3740,6 +3785,11 @@
37403785
"lpticker_lptim": {
37413786
"help": "This target supports LPTIM. Set value 1 to use LPTIM for LPTICKER, or 0 to use RTC wakeup timer",
37423787
"value": 1
3788+
},
3789+
"lse_drive_load_level": {
3790+
"help": "HSE drive load level RCC_LSEDRIVE_LOW | RCC_LSEDRIVE_MEDIUMLOW | RCC_LSEDRIVE_MEDIUMHIGH | RCC_LSEDRIVE_HIGH",
3791+
"value": "RCC_LSEDRIVE_LOW",
3792+
"macro_name": "TARGET_LSE_DRIVE_LOAD_LEVEL"
37433793
}
37443794
},
37453795
"macros_add": [

0 commit comments

Comments
 (0)