cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431 Keil 5.36 Erase sectors fail

franz2
Associate III

Hi

I use STM32G431R6T6 (32k Flash) with build in Bootloader.

Boootloader use address 0x0800'0000 - 0x0800'1FFF

Application us address: 0x0800'2000 - 0x0800'7FFF

In the bootloader I can select Erase sectors (System delete only sectors which are used) So the application is not deleted.

In the application, with the option 'Erase sectors' during download Message 'Error Flash Download failed - 'Cortex M4''

If I choose option 'Erase full chip' in the application erase and programming flash is working. But in this case the bootloader is erased and so the system is not start up.

Because of these problems I cannot debug the application with Keil built in debugger.

Has anybody same problem or a solution. Thanky for replay.

Franz

2 REPLIES 2

Can't say I'm using a G4, but perhaps you can use the scatter-file, or debug script, to either pull in the boot loader object into app build, or skip the download and explicitly LOAD the two images?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
clu.2
Associate

hi, I meet the similar ​problem. And I solved the problem by change the program algorithm. You may find program algorithm source file path and check the erase sector function .

0693W00000aJSfTQAW.png0693W00000aJSfnQAG.png0693W00000aJSg7QAG.png