Skip to main content
hryu.1
Associate
January 19, 2022
Solved

Problem in using flash memory of STM32H745

MCU : STM32H745

Boot : booting from user main memory(0x08000000 )of flash memory ( boot0 :low)

compiler: IAR

​

I am coding to write in address 0x08060000 of flash memory in Cortex M7 .

Cache is enabled, MPU is configured below

0693W00000JMSgUQAX.pngAfter at first writing 44444(0xad9c) , writing same value (44444) in same address , everything works well

But I have problem in writing different value(44443) in same address

​

this is state of memory after writing 44444(0xad9c)

0693W00000JMShwQAH.pngand this is state of memory after writing 44443 which is different value than before.

0693W00000JMSkRQAX.pngMemory is changed strangely .

since this, reading of the value will result in an error.

0693W00000JMSpHQAX.pngI don't understand why

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
January 19, 2022

Because the Flash lines are wide, have ECC, and cannot be written multiple times, even if just knocking down bits.

​

I​f you want to change content expect to Erase first. Consider journalling data over subsequent words.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

1 reply

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
January 19, 2022

Because the Flash lines are wide, have ECC, and cannot be written multiple times, even if just knocking down bits.

​

I​f you want to change content expect to Erase first. Consider journalling data over subsequent words.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..