Skip to main content
Associate III
June 8, 2018
Question

Using FatFS R0.12c with STM32CubeMX

  • June 8, 2018
  • 2 replies
  • 1360 views

Posted on June 08, 2018 at 03:47

I followed in the instruction 

https://community.st.com/s/feed/0D50X00009bMM8bSAG

 , but it doesn't work for me. I am using the SD card with FreeRTOS with the DMA configured. Code is generated with STM32CubeMX. I am using STM32Cube FW_F4 V1.21.0, STM32F446 microcontroller. FATFS version R.12c.

BSP_SD_ReadCpltCallback() and BSP_SD_WriteCpltCallback() are not getting called.  

if i move BSP_SD_Init() and put it before MX_FATFS_Init(), BSP_SD_ReadCpltCallback() will get called once, and f_mount() will still return a disk error.

please note: my configuration worked on older build of the STM32CubeMX.

any ideas?

#stm32cube-fw_f4-v1.21.0 #stm32cube-programmer #freertos+fat #sdio-sd-driver-dma-interrupts

This topic has been closed for replies.

2 replies

cleonb322Author
Associate III
June 8, 2018
Posted on June 08, 2018 at 04:27

i also follow this

https://community.st.com/0D50X00009XkWyLSAV

forum with no luck.

Tesla DeLorean
Guru
June 8, 2018
Posted on June 08, 2018 at 04:55

I would suggest you look at the example here

STM32Cube_FW_F4_V1.21.0\Projects\STM32446E_EVAL\Applications\FatFs\FatFs_uSD_RTOS

Using it to test a custom board using an F446 should be a short walk. The HAL examples have a track record of being more robustly coded and tested than the code output by CubeMX

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
cleonb322Author
Associate III
June 8, 2018
Posted on June 08, 2018 at 17:12

Thanks, I will try that later.