cancel
Showing results for 
Search instead for 
Did you mean: 

SD card interface code genereated by STM32CUbe32 (5.5.0)

HMaje.1
Associate III

i would request imen to let us know if the STM32CubeMx 5.5.0 is addressing all the issues regarding SD card interface using SDMMC ( 4 bits and DMA). Since the code generated from CubeMX 5.5.0 for nucleo-l476rg BOARD for SD card interface does not work.

if i program the same board with

STM32Cube_FW_L4_V1.15.0\Projects\STM32L476G-EVAL\Applications\FatFs\FatFs_uSD_Standalone ,

the SD card can be written as well as read.

14 REPLIES 14
HMaje.1
Associate III

HI Imen & Khouloud,

Thanks for cube32mx upgrade to 5.6.0.

I have upgraded the CUbeMX and firmware to the latest. my cubeMX version is 5.6.0.

and the firmware package is STM32Cube FW_L4 V1.15.1

I generated the project using the updated version ( IOC and SRC files as attached in ZIP file).

My program passes through f_mount and f_open successfully but return an error for f_write.

The same board with same setup, I flashed with

STM32Cube_FW_L4_V1.15.0\Projects\STM32L476G-EVAL\Applications\FatFs\FatFs_uSD_Standalone ,

and I was able to write and read in the SD card.

Please find attached the zip file containing my IOC and main.c file.

Request to please help to sort out the problem.

Hi Imen & Khouloud,

i have tried the above in various possible alternatives like enabling DMA for both TX and RX, enabling only for SDMMC, but no luck.

please le me know if can share any other project details to enable your team to find the problem ?

Thanks,

Best Regards,

Hitesh

HMaje.1
Associate III

Hi Imen,

Request to please help to solve the above issue, as for my project, data logging is prime function.

Thanks,

Best Regards,

Hitesh

Hi Imen & khouloud,

I request if you could please address my above problem of interfacing the SD card to the STM32l4.

I have upgraded the CUbeMX and firmware to the latest. my cubeMX version is 5.6.0.

and the firmware package is STM32Cube FW_L4 V1.15.1

I generated the project using the updated version ( IOC and SRC files as attached in ZIP file).

My program passes through f_mount and f_open successfully but return an error for f_write.

The same board with same setup, I flashed with

STM32Cube_FW_L4_V1.15.0\Projects\STM32L476G-EVAL\Applications\FatFs\FatFs_uSD_Standalone ,

and I was able to write and read in the SD card.

Thanks,

Best Regards,

Hitesh

Perhaps instead of depending on CubeMX, you could diff/merge functional code or determine why it breaks.

Check WEAK definitions of Handlers or Callbacks.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..