2025-11-19 6:38 AM
Hi,
I'm attempting to write to an SD Card using a Riverdi STM32U5A9 display board. Since TouchGFX natively uses FreeRTOS, I'm attempting to keep it within FreeRTOS. Porting to ThreadX has caused it's own issues which I have in a separate thread. In the Configurator, there is no longer an option for FATFS, so I'm using the STM32U5 Classic MW Git Repository as recommended by the FAE. I copy over and update the templates as required, but am still getting a Hard Fault during f_mkfs while the HAL library is initializing the SDMMC. I believe that my configuration is incorrect, but the example is only for SDRAM, so I'm not entirely sure where I've gone wrong... I have it setup for 4-bit width and I've changed the clocks to be 24MHz at the SDMMC clock output. The examples within the configuration are for older MCUs and have a tab to enable the DMA. My understanding is that the STM32U5 has an Internal DMA, so it's not required to setup the DMA within the configuration.
Any help is appreciated!
Thank you!