AnsweredAssumed Answered

FRDM64F & SD card using SDCH_LDD not working

Question asked by Eyal Doron on Oct 17, 2015
Latest reply on Oct 26, 2015 by Harald Landro


I've seen discussions around this, but not quite. I'm trying to read/write to an SD card in the Freedom64F card, using Processor Expert and the SDHC_LDD component. I'm using KDS 3.0.0, with no OS and no SDK. I'm following the documentation example as closely as possible, but I can't get it to work - I always get a timeout at SDHC_GetCardInfo. Looking into the code, specifically CardInfoRetrieval in SDHC.c, the last viable state is SDHC_CIR_TRANSFER_STATE.


I noticed that the board does not include a pullup resistor on the CMD line, which should be there (also possibly on D0). I changed the port pins to include pullups, but it made no difference. I also modified the example code to support active-high card detect. Card detection now works, but not the rest of the code.


I've tried Erich Styger's logger code, which uses SPI mode, and it works nicely, however its slow - both read and write take roughly the same time, ~190 kbyte/sec, which seems to be mainly driver code overhead, as it changes when I change optimization, and almost doesn't depend on SPI clock. I would really like higher read rates, and DMA/interrupts would also be nice though not essential.


Has anybody got SDHC_LDD or one of its derivatives working on this board, in full 4-bit data width and a higher data rate? Any ideas?



Eyal Doron