Skip to content

Commit ccff46d

Browse files
authored
Merge pull request #6070 from ithinuel/remove-magic
remove magic calibration value for HSI in ST's targets
2 parents 84f42f6 + d1a0ff9 commit ccff46d

File tree

32 files changed

+32
-32
lines changed

32 files changed

+32
-32
lines changed

targets/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/device/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ uint8_t SetSysClock_PLL_HSI(void)
195195

196196
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
197197
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
198-
RCC_OscInitStruct.HSICalibrationValue = 16;
198+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
199199
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
200200
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
201201
RCC_OscInitStruct.PLL.PLLM = 16;

targets/TARGET_STM/TARGET_STM32F4/TARGET_MTB_MTS_DRAGONFLY/device/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ uint8_t SetSysClock_PLL_HSI(void)
207207
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
208208
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
209209
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
210-
RCC_OscInitStruct.HSICalibrationValue = 16;
210+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
211211
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
212212
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
213213
//RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16)

targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_DRAGONFLY_F411RE/device/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ uint8_t SetSysClock_PLL_HSI(void)
207207
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
208208
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
209209
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
210-
RCC_OscInitStruct.HSICalibrationValue = 16;
210+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
211211
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
212212
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
213213
//RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16)

targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_MDOT_F411RE/device/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ uint8_t SetSysClock_PLL_HSI(void)
211211
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
212212
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
213213
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
214-
RCC_OscInitStruct.HSICalibrationValue = 16;
214+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
215215
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
216216
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
217217
RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16)

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xC/TARGET_DISCO_F401VC/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ uint8_t SetSysClock_PLL_HSI(void)
203203
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
204204
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
205205
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
206-
RCC_OscInitStruct.HSICalibrationValue = 16;
206+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
207207
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
208208
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
209209
RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16)

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xE/TARGET_NUCLEO_F401RE/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ uint8_t SetSysClock_PLL_HSI(void)
210210
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
211211
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
212212
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
213-
RCC_OscInitStruct.HSICalibrationValue = 16;
213+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
214214
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
215215
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
216216
RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16)

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xG/TARGET_ARCH_MAX/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ uint8_t SetSysClock_PLL_HSI(void)
204204
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
205205
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
206206
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
207-
RCC_OscInitStruct.HSICalibrationValue = 16;
207+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
208208
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
209209
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
210210
RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16)

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F407xG/TARGET_DISCO_F407VG/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ uint8_t SetSysClock_PLL_HSI(void)
209209
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
210210
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
211211
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
212-
RCC_OscInitStruct.HSICalibrationValue = 16;
212+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
213213
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
214214
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
215215
RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16)

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F410xB/TARGET_NUCLEO_F410RB/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ uint8_t SetSysClock_PLL_HSI(void)
209209
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
210210
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
211211
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
212-
RCC_OscInitStruct.HSICalibrationValue = 16;
212+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
213213
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
214214
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
215215
RCC_OscInitStruct.PLL.PLLM = 8;

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F411xE/TARGET_ELMO_F411RE/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ uint8_t SetSysClock_PLL_HSI(void)
213213
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE;
214214
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
215215
RCC_OscInitStruct.HSEState = RCC_HSE_OFF;
216-
RCC_OscInitStruct.HSICalibrationValue = 16;
216+
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
217217
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
218218
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
219219
//RCC_OscInitStruct.PLL.PLLM = 16; // VCO input clock = 1 MHz (16 MHz / 16)

0 commit comments

Comments
 (0)