cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in MCU STM32L4 when trying to program the flash

Christian Neubert
Associate II

I just run across a bug when trying to program the flash.

You have to write two 32bit values for programming the flash. But if the first value is 0xFFFFFFFF it does not matter what the second value is. In the end there will always be written 0xFFFFFFFF.

If you change just one bit of the first value, everything works as indended.

The interessting thing is, if you wait for programming to be finished and then compare the values in flash and the data which should be written, they are the same. But if you do this compare some cpu cycles later they are not the same anymore?!

I tested this on an own board with a STM32L496ZE and on a nucleo board with a STM32L496ZG.

I attached the example project (for AC6 IDE) with which I tested this.

1 ACCEPTED SOLUTION

Accepted Solutions
Christian Neubert
Associate II

I just found the problem.

It is the function which checks if the programming is necessary :(

So the flash programming is working as indended.

View solution in original post

1 REPLY 1
Christian Neubert
Associate II

I just found the problem.

It is the function which checks if the programming is necessary :(

So the flash programming is working as indended.