Skip to main content
carlesls2
Associate III
June 20, 2025
Solved

hardfault when reading the flash

  • June 20, 2025
  • 3 replies
  • 327 views

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

 

 

 

Best answer by Tesla DeLorean

Unwritten memory can fault.

Unaligned memory reads for doubles fault Cortex-M devices.

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

3 replies

Technical Moderator
June 20, 2025

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
carlesls2Author
Associate III
June 27, 2025

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. 

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
June 27, 2025

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