08-07-2020, 07:06 AM
I'm using Embitz with EBlink to debug a STM32G4 controller. The G4 family offers an option byte called DBANK that controls whether the flash memory is organised in one single bank with 128 bit granularity (option bit unchecked) or in dual bank mode with 64bit granularity. When the controller is configured to single bank mode, EBlink often stops with an error when updating the software. This does not happen in dual bank configuration. When I use the STM32CubeProgrammer to perform a full chip erase before programming, the effect does not show at all.
Maybe this is related to the fact that the Flash erase function in STs library (HAL_FLASHEx_Erase) requires consideration of the DBANK setting on how to pass the block number to be erased.
Maybe this is related to the fact that the Flash erase function in STs library (HAL_FLASHEx_Erase) requires consideration of the DBANK setting on how to pass the block number to be erased.