Best way to boost STM32U5 speed during libc init
[This is a follow-up to https://community.st.com/t5/stm32-mcus-embedded-software/setting-up-clocks-on-stm32u5-nucleo-board-in-startup-assembler/m-p/665708#M47209]
As discussed in the issue referenced above, we do quite a lot of work in C constructors (as part of a test system) and as a result __libc_init takes a loooong time to execute on an STM32U5 unless we can chivvy the chip into life early.
As a fix for this I put in a bl to my SystemClock_Config in my startup .s file before __libc_init is called. However, I found that the call to HAL_PWREx_ControlVoltageScaling() in my SystemClock_Config() function times out unless HAL_Init() is called first.
So I add a bl to HAL_Init before the bl to SystemClock_Config, that's fine, but HAL_Init() enables SysTick and, unfortunately, the FreeRTOS port code for CM33, as provided by https://github.com/STMicroelectronics/x-cube-freertos, occupies SysTick_Handler() and, irretrievably, calls into FreeRTOS internals which are most definitely not set up at this point, so start-up goes bang when I use FreeRTOS; the ThreadX port is better behaved but I need FreeRTOS to work and I don't want to fiddle with its internals.
QUESTION: what is the best/simplest way to get the processor running smartly before __libc_init is called?
