-
Notifications
You must be signed in to change notification settings - Fork 3k
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
STM32 FLASH API : add critical sections #13914
Conversation
@JeanMarcR, 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.
Please correct also indentation
/* Note: If an erase operation in Flash memory also concerns data in the data or instruction cache, | ||
you have to make sure that these data are rewritten before they are accessed during code | ||
execution. If this cannot be done safely, it is recommended to flush the caches by setting the | ||
DCRST and ICRST bits in the FLASH_CR register. */ | ||
__HAL_FLASH_ART_DISABLE(); | ||
__HAL_FLASH_ART_RESET(); | ||
__HAL_FLASH_ART_RESET();q |
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.
oups....
flash_lock(); | ||
core_util_critical_section_exit(); | ||
|
||
HAL_FLASH_Lock(); |
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.
I would prefer to align code with HAL_FLASH_Unlock call:
if (HAL_FLASH_Lock() != HAL_OK) {
return -1;
}
?
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.
Good idea.
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
@JeanMarcR Travis job has failed, I think you have to rebase on top of master |
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
@jeromecoutant |
@jeromecoutant |
CI started |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
@jeromecoutant |
See PR #13802 (for F4 board)
Concerned boards are
STM32F0
STM32F1
STM32F2
STM32F3
STM32F7
STM32G0
STM32G4
STM32H7
STM32L0
STM32L1
STM32L4
STM32L5
Summary of changes
Impact of changes
Migration actions required
Documentation
Pull request type
Test results
Reviewers