cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0x Read/Write to Internal Flash

lorenzo meneghello
Associate II
Posted on March 09, 2017 at 16:25

Hi,

I'm new on ST MCU, I'm trying yo understand how to read the internal flash of STM32F042K6. I want to read the Page 31 of the device, the address is 0x800FC00 but if I try to read it with a pointer the program goes in HardFault Handler.. Why? 

Thanks

4 REPLIES 4
Posted on March 09, 2017 at 17:03

Doesn't the part only have 32KB of FLASH, perhaps that's the reason?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 09, 2017 at 17:21

Yes, it has 32kB of FLASH but 0x0800FC00 I think is the last page available.0690X00000606XFQAY.png

Posted on March 09, 2017 at 17:25

0xFC00 = 63KB, try 0x7C00 = 31KB

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 10, 2017 at 09:55

You are right! I've correct the address on another file and not in this! My distraction! 

Thanks.