Skip to main content
patrick visser
Visitor II
December 8, 2021
Question

STM32CubeProgrammer API erase/readout error

  • December 8, 2021
  • 0 replies
  • 785 views

I am trying to use the STM32CubeProgrammer API to program and read a STM32G491.

so that we can use it in our programming solution. (We write a CRC of the application so that a bootloader can validate it. )

The problem is that the readout of memory does not always work correctly.

I am running the Example1 project with the API.

(On a nucleo-g491RE demo board)

This does a read after a sector erase.

this results in the same data readout as before the sector erase.

Reading 32-bit memory content
 Size : 64 Bytes
 Address: : 0x08000000
 
0x08000000 : BBBBAAAA FFFFFFFF FFFFFFFF FFFFFFFF
0x08000010 : FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0x08000020 : FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0x08000030 : FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
 
Flash sector erase ...
 
Existing specified sectors are erased successfully
Protected sectors are not erased
UPLOADING ...
 Size : 64 Bytes
 Address : 0x8000000
Read progress:
██████████████████████████████████████████████████ 100%
Data read successfully
Time elapsed during the read operation is: 00:00:00.007
 
 
Reading 32-bit memory content
 Size : 64 Bytes
 Address: : 0x08000000
 
0x08000000 : BBBBAAAA FFFFFFFF FFFFFFFF FFFFFFFF
0x08000010 : FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0x08000020 : FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF
0x08000030 : FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF

When I read the data with the STM32CubeProgrammer application after this it does read as erased.

So what can I do to get a accurate readout of the memory.

This topic has been closed for replies.