HardFault_Handler while operating flash(NVM)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
I was trying to use flash to simulate eeprom and get an example from keil examples.
but the examle didn't work.
I look into the debug and find out that whenever operate with the flash address ,the program goes into HardFault_Handler.
since i didn't change anything in the examle ,i wonder why it happens and how can i solve it?
0 Likes
2 Replies
User12775
Level 5
Level 5
First solution authored First like received
You are using cortex M0, the address should be aligned at 4 byte boundary. It is the most possible cause.
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Which example are you referring to?

Regards,
Jesus
0 Likes