Skip to main content
Graduate II
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

 

 

 

    This topic has been closed for replies.
    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 ?

    carlesls2Author
    Graduate II
    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. 

    Graduate II
    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