Skip to content
Commit 09fea5cc authored by Alexander Wachter's avatar Alexander Wachter Committed by Anas Nashif
Browse files

drivers: flash: stm32g4: Flush caches after erase



This commit fixes sporadic kernel panics when writing big data chunks
to the flash. (data bus errors)
Reference manual:
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 access control
register (FLASH_ACR).

Signed-off-by: default avatarAlexander Wachter <alexander.wachter@leica-geosystems.com>
parent 8c9b06ad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment