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 LDM, STM, LDRD, and STRD instructions used. Have you ever gotten this issue? Could you give me some guidelines to solve this problem?
LDM
STM
LDRD
STRD
Thank you all.
Please open a Support Ticket and attach your project to allow a replication:
https://www2.keil.com/support/silver?P=&V=&S=