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.

More questions in this forum
There are no posts to show. This could be because there are no posts in this forum or due to a filter.