- Notifications
You must be signed in to change notification settings - Fork1k
Fix HAL not properly initialized on F105x series#1310
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fpistm left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
fpistm commentedFeb 25, 2021
Hi@ttimasdf This way you will get feedback from expert and this will allow to correct in the original repo. |
ttimasdf commentedFeb 25, 2021
Sure. All I know was that this part of the code belongs to HAL library, didn't realize the project is also on Github |
jrahlf commentedMar 1, 2021
Why would you call |
ttimasdf commentedMar 2, 2021
Anddo a search in official repository you could find that they do it de facto on most of the other boards.. |
Summary
This PR fixes the necessary initialization procedures which should be run before user code is called.
premain()function inmain.cpp is essential for the HAL library to initize properly, more specifically it calledHAL_Initwhich setup the systick interrupt handler which is necessary for writing a hello world.....The issue#869 has already mentioned this bug but didn't find a solution to it. After some trials and errors and comparasion between assemblies for different products, the patch here is likely solving it.
If possible, is there's any chance we talk about this a bit further because I don't know why this workaround works in fact...
Validation
Demostration:
Detail step-by-step is To-Be-Filled. The following code is a modified blinking LED use loop based
manual_delay()and HAL provideddelay()altogether. The originaldelay()would stuck if HAL_Init is not called beforehand, the same as described in#869.Code formatting
Closing issues
Fixes#869