cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32 - using sd card with SDIO or SPI

Vintage Viking
Associate
Posted on April 26, 2018 at 14:52

Hi guys, Im new to stm32 and i have a trouble using sd card with

https://www.waveshare.com/wiki/Micro_SD_Storage_Board

. I use CubeMX to generate code, and Workbench to edit it. I tried to use my sd card with SPI or SDIO without any success. I have nucleo f446re board, and few cards tested. Using SDIO and fatfs i didnt get result FR_OK with my initial function. Can someone share a working code? My whole code is in attachments. Thanks in advance.

Edit:

After running another code with 2 different micro sd cards i got FR_DISK_ERR.

2 REPLIES 2
electronic tobi
Associate II

Did your code use dma ? I think the current cubemx only works with dma

DMA is should always be used for SDIO/SDMMC, the polled modes have significant vulnerability to interrupt and bus loading.

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