Associate II
February 15, 2019
Solved
Bug in MCU STM32L4 when trying to program the flash
- February 15, 2019
- 1 reply
- 608 views
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.
