-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bootloader jump to application #1653
Bootloader jump to application #1653
Conversation
When USART Bootloader jumps to application, PLL is used as System Clock. It prevents to reconfigure PLL. It is necessary to switch back to default Clock (reset value) before any further PLL configuration. Signed-off-by: Alexandre Bourdiol <[email protected]>
To me it looks like many system_xxx.c files are changed. Wouldn't it be better to set "-DUSER_VECT_TAB_ADDRESS" once in the plattform.txt file, for example here: Arduino_Core_STM32/platform.txt Line 31 in de25178
I see that the PLL is also changed, so I guess that additional change for the VTOR doesn't matter than and the plattform.txt change is not required. Anyhow, thanks for adding this. It will simplify work for USART users :-) |
In fact, this was change by the STM32CubeFW to introduce the |
fedacdb
to
0152f37
Compare
Both changes are required to guarantee proper application run, after UART Bootloader. |
When USART Bootloader jumps to application, it doesn't restore VTOR (Bootloader Vector Table is used). It is thus necessary to configure it unconditionally. By the way get ride of USER_VECT_TAB_ADDRESS Signed-off-by: Alexandre Bourdiol <[email protected]>
0152f37
to
0288818
Compare
Summary
After UART Bootloader to jump to application, 2 issues prevent application to run properly:
Bootloader changes VTOR register and did not restore it when jumping to application
It is necessary that application set VTOR unconditionally
Bootloader set PLL as SystemClock and keep it when jumping to application
This prevent any further configuration of the PLL.
It is necessary change SystemClock source, for example revert to default SystemClock (HSI or MSI) before any further PLL configuration.
Fixes #1637