-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32F4 FLASH API update #13802
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
STM32F4 FLASH API update #13802
Conversation
@jeromecoutant, thank you for your changes. |
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.
Can you add to the commit msg why is this change needed (what is it fixing) ? why we need critical section whyle we erase (I assume flash is directly used and it's not interrupt safe) ?
67d6abc
to
5cc31eb
Compare
Done |
@jeromecoutant , I would expect to see the same change in |
As @jeromecoutant is out this week, @moshe-shahar shall we wait to review also flashing part or make this 2 step fix (this one progresses alone and the issue won't be closed until programming is also reviewed). |
Do we need similar fixes to the other flash_api.c files? There seems to be similar implementations also for other targets. |
@jeromecoutant , for my understanding, it is only a partial fix. |
CI started The other targets will need own fixes (one possible way could be to note in the documentation what implication this has when using flash functionality - someone should review if protecting this via critical section is correct no matter what target). We should keep #13792 opened until this is answered. |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
This question was not answered. |
Set back to review stage |
I agree, patch update is on going |
I agree, only STM32WB is currently well protected. Thx |
Add critical section in - flash_erase_sector and - flash_program_page to make FLASH erase procedure interrupt safe (can occur with Ethernet)
5cc31eb
to
5cd3533
Compare
Done |
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.
Verified to fix the client issue.
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
See PR ARMmbed#13802 (for F4 board) Concerned boards are STM32F0 STM32F1 STM32F2 STM32F3 STM32F7 STM32G0 STM32G4 STM32H7 STM32L0 STM32L1 STM32L4 STM32L5
See PR ARMmbed#13802 (for F4 board) Concerned boards are STM32F0 STM32F1 STM32F2 STM32F3 STM32F7 STM32G0 STM32G4 STM32H7 STM32L0 STM32L1 STM32L4 STM32L5 Adding test of return code of HAL_FLASH_Lock() function.
See PR ARMmbed#13802 (for F4 board) Concerned boards are STM32F0 STM32F1 STM32F2 STM32F3 STM32F4 STM32F7 STM32G0 STM32G4 STM32H7 STM32L0 STM32L1 STM32L4 STM32L5 Adding test of return code of HAL_FLASH_Lock() function Adding board STM32F4 Running AStyle
See PR ARMmbed#13802 (for F4 board) Concerned boards are STM32F0 STM32F1 STM32F2 STM32F3 STM32F4 STM32F7 STM32G0 STM32G4 STM32H7 STM32L0 STM32L1 STM32L4 STM32L5 Adding test of return code of HAL_FLASH_Lock() function Adding board STM32F4 Running AStyle
See PR ARMmbed#13802 (for F4 board) Concerned boards are STM32F0 STM32F1 STM32F2 STM32F3 STM32F4 STM32F7 STM32G0 STM32G4 STM32H7 STM32L0 STM32L1 STM32L4 STM32L5 Adding test of return code of HAL_FLASH_Lock() function Adding board STM32F4 Running AStyle
Summary of changes
Fixes #13792
We need to add critical section in flash_erase_sector function
@ARMmbed/team-st-mcd
@moshe-shahar
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers