cancel
Showing results for 
Search instead for 
Did you mean: 

hardfault when reading the flash

carlesls2
Associate III

Hello 

I think I solved the problem but I do not know why. When I try to access the last address of a page it causes a hardfault. 

 

 

carlesls2_0-1750415314584.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Unwritten memory can fault.

Unaligned memory reads for doubles fault Cortex-M devices.

CM0(+) device will fault unaligned 16, 32 and 64 bit transactions 

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

3 REPLIES 3
Saket_Om
ST Employee

Hello @carlesls2 

Could you share more details about your issue and setup please ?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om
carlesls2
Associate III

carlesls2_0-1751014368742.png

Solved!

I do not comprehend very well  how I solve it but I far as I understand casting integer into an address is not that intuitive as casting float, double or integer among themselves. 

Unwritten memory can fault.

Unaligned memory reads for doubles fault Cortex-M devices.

CM0(+) device will fault unaligned 16, 32 and 64 bit transactions 

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