This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hardfault unaligned access when writing to SD card using file system component

Hello everyone,

I got the issue about hardfault unaligned access when writing to micro SD card on STM32F746VG (using HAL library, MCI driver and File system component). The hardfault occured after a period of time since the program starts running. I fetched the File System Demo Example and edited the app_main:

The hardfault unaligned access was caused by SDMMC_IRQHandler function (i'm not sure). I configured the MPU as the example did. I also checked the UNALIGN_TRP bit in CCR is cleared. When the hardfault occurs, i found the instruction which caused the hardfault but there is no LDMSTMLDRD, and STRD instructions used. Have you ever gotten this issue? Could you give me some guidelines to solve this problem?

Thank you all.