Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
EBlink on STM32G4 dependance on DBANK option
#1
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.
Reply
#2
Yes, the flash script  for the G4 only suppports one mode. 

If youi go to the flash script "./scripts/stmicro/flash/stm32Gx_fl.script" you see  the header

Code:
/////////////////////////////////////////////////////////////////////////////////
//
//                   STM32G0_fl flash loader
//
//  ToDo:  - option programming
//         - dual bank for G4x



Perhaps you could add dual bank flashing and share your script files so I can add it or use github.

I just made a quick implementation but I never used those Gx devices myself
Reply
#3
Dual bank should work now, from version V3.4
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)