openblt: OscillatorType inconsistency fix #5280

This commit is contained in:
rusefillc 2023-05-21 09:23:19 -04:00
parent 526f245beb
commit 37d6d76a4a
3 changed files with 6 additions and 0 deletions

View File

@ -119,6 +119,7 @@ static void SystemClock_Config(void)
/* Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
// todo: see comment in main_internal_osc.c
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

View File

@ -105,6 +105,7 @@ static void SystemClock_Config(void)
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
/* Initializes the CPU, AHB and APB busses clocks. */
// todo: see comment in main_internal_osc.c
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

View File

@ -123,6 +123,10 @@ static void SystemClock_Config(void)
/* Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
* rusEFI main firmware can depend external oscillator frequency and we actually fabricate some boards
* with different oscillators over the time. Until we add similar code into OpenBLT we go with internal oscillator for such
* boards
* TODO: actually why not go with internal for _all_ boards? Maybe remove all main_external_osc.c files?
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;