Hi!
I’ve asked a few questions on Discord already, but despite all great advise, I have not gotten the SDMMC example to work yet. I already bought a new SD breakout board and a STLINK-V3MINIE to troubleshoot, and got some more info now. While trying to get this work, I’m documenting the steps i’m taking so that this could maybe be included in the Daisy wiki. I think many people will benefit from a ‘how to’ guide on connecting a SD card.
I’m currently testing using a SanDisk Extreme 128GB V30 U3 A2 microSD. Not sure if there are any requirements on a specific card type or max. storage. If anyone knows this, please let me know.
I’m using the SDMMC example from the DaisyExamples repository as a starting point. I’ve added a line to the example to slow down the SD card, as I’m using breadboard wires. This line is as follows;
sd_cfg.speed = daisy::SdmmcHandler::Speed::SLOW;
I’ve also added a breakpoint at the line that is as follows;
if(f_open(&SDFile, TEST_FILE_NAME, (FA_CREATE_ALWAYS) | (FA_WRITE)) == FR_OK)
When the executer is at this line, I step into and step over until I reach the line that is as follows;
if (res == FR_OK)
When I hover over “res”, I get the following statusses;
FR_DISK_ERR: probably “SD card was not found” (I get this as soon as I eject the SD card from the breakout board, so I think this is a good sign that the SD card is at least detected)
FR_NO_FILESYSTEM: according to some internet docs I believe this means “SD card was found, but appears not to be formatted correctly”. I had this with both FAT and ExFAT, formatted using Mac.
I’m formatting the SD card using a mac, and i’ve tried both ‘FAT’ and ‘ExFAT’. Both result in the “FR_NO_FILESYSTEM” errormessage.
Any guidance would be amazing, and I will continue to document my steps until I hopefully get it working
Update; now I’m unsure if the ‘slow’ configuration of sdcard is necessary. In both configurations I seem to get the “FR_NO_FILESYSTEM” error.