You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: When writing to flash pages beyond 128 on STM32G4 (in particular G474), Flash::erase fails silently und the Flash::program does not return an error (even though, right after programming the PROGERR Bit 3 in FLASH->SR register is set, as GDB tells me).
According to the RM0440, pp. 135, in dual bank mode (DBANK=1), the BKER bit should be set to 1 for pages after 128. Dual bank mode is default.
What really threw me off was, that I could program addresses beyond page 128 once.
I just now realized, that this this is likely because the factory values for flash would be 0x00 or 0xFF, in which case they are already erased the first time programmed.
Problem: When writing to flash pages beyond
128
on STM32G4 (in particular G474),Flash::erase
fails silently und theFlash::program
does not return an error (even though, right after programming thePROGERR
Bit 3 inFLASH->SR
register is set, as GDB tells me).This is due to the
DBANK
bit not beeing set in the flash.cppAccording to the RM0440, pp. 135, in dual bank mode (
DBANK=1
), theBKER
bit should be set to1
for pages after128
. Dual bank mode is default.What really threw me off was, that I could program addresses beyond page
128
once.I just now realized, that this this is likely because the factory values for flash would be
0x00
or0xFF
, in which case they are already erased the first time programmed.At least the G474 Flash example and #1146 are effected by this problem.
The text was updated successfully, but these errors were encountered: