4 years, 7 months ago.

FRDM-K64F SDFileSystem doesn't seem to work.

The SDFileSystem does not want to initialise with the latest revisions of mbed-dev ().

I added some debug and it seems to be an issue with the SPI. The first byte goes out, but the SPI locks up on the second byte.

This seems to be in an interaction between spi_api.c and fsl_dspi_hal.c, during spi_master_write() function.

I have tried multiple SD card examples with only one success. The example program "2545_SD_Card" does function as long as the libraries are not updated.

include the mbed library with this snippet

#include "mbed.h"
#include "SDFileSystem.h"
SDFileSystem sd(PTE3, PTE1, PTE2, PTE4, "sd"); // MOSI, MISO, SCK, CS
Serial pc(USBTX, USBRX);

int main()

    printf("Starts here...\r\n");


    printf("Does not make it here...\r\n");

    while (true) {

int mReadable()
    return pc.readable();
int mGetCh()
    return pc.getc();
int mPutCh(int a)
    return pc.putc(a);
int mPutS(const char * s)
    return pc.puts(s);

Be the first to answer this question.