cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in using flash memory of STM32H745

hryu.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

1 REPLY 1

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
Up vote any posts that you find helpful, it shows what's working..