mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Move HAL_Init call for F3/F4/F7/H7.
* HAL_Delay() was being used before HAL_Init() was called. * Brings it in-line with ST examples which follow this call order: CubeMX generated code goes startup_xxx.s (asm) -> SystemInit(), then main(), HAL_Init(), SystemClock_Config() Boot-tested on: * SPRacingF4NEO * SPRacingF7DUAL * SPRacingH7ZERO
This commit is contained in:
parent
3695b123d9
commit
9054cd45bf
5 changed files with 30 additions and 20 deletions
|
@ -259,26 +259,6 @@ void sdCardAndFSInit()
|
|||
|
||||
void init(void)
|
||||
{
|
||||
#ifdef USE_HAL_DRIVER
|
||||
HAL_Init();
|
||||
#endif
|
||||
|
||||
#if defined(STM32F7)
|
||||
/* Enable I-Cache */
|
||||
if (INSTRUCTION_CACHE_ENABLE) {
|
||||
SCB_EnableICache();
|
||||
}
|
||||
|
||||
/* Enable D-Cache */
|
||||
if (DATA_CACHE_ENABLE) {
|
||||
SCB_EnableDCache();
|
||||
}
|
||||
|
||||
if (PREFETCH_ENABLE) {
|
||||
LL_FLASH_EnablePrefetch();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_PORT_COUNT
|
||||
printfSerialInit();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue