cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030 PGERR writing double word after programming from PEMicro Cyclone?

Nick McKendree
Associate II

I have a strange issue with a STM32G030 and Flash writes. 

I am trying to change a 64-bit (double word) value from erased 0xFFFFFFFFFFFFFFFF to 0xFFFFFFFFFFFFFF00.

I have three scenarions:

  1. Bootloader app erases and writes application image
  2. Segger J-Link and J-Flash writes application image
  3. PEMicro Cyclone erases and writes images

For Scenario #1 and #2, my application can modify the value without an error (as expected).

But if I program my MCU with a PEMicro Cyclone, my application cannot modify the value and I get a PROGERR flag. I have discussed this with PEMIcro support and they said they write whatever is in the srec to flash so we had to do a read before write make sure writing all FF's over erased flash didn't mess with the hidden ECC bits but this is still not working.

Any ideas?

I am using the ST Hal write functions.

1 REPLY 1
TDK
Guru

You can only write each double word once before needing to erase the flash page, even if you write all 0xFFs. Reading all 0xFFs doesn't tell you it wasn't written to after the erase, only that it might not have been.

If you feel a post has answered your question, please click "Accept as Solution".