BUG: CubeMX/CubeIDE ignores changes in initialization order.
Using Project Manager -> Advanced Settings -> Generated Function Calls you can change the initialization order. However this setting is ignored when writing the code.
You have to manually change the order in the .ioc file in this line:
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_DMA_Init-DMA-false-LL-true,4-MX_LPUART1_UART_Init-LPUART1-false-LL-true,5-MX_TIM20_Init-TIM20-false-LL-true,6-MX_USART3_UART_Init-USART3-false-HAL-true,7-MX_ADC1_Init-ADC1-false-LL-true,8-MX_ADC2_Init-ADC2-false-LL-true,9-MX_ADC3_Init-ADC3-false-LL-true,10-MX_ADC4_Init-ADC4-false-LL-true,11-MX_ADC5_Init-ADC5-false-HAL-trueChanging the numbers is what CubeMX is doing, but that is not enough. You have to actually reorder the items.
CubeIDE:
Version: 1.2.1
Build: 5190_20200115_1224 (UTC)
STM32CubeG4 Firmware Package V1.1.0 / 28-June-2019
