Hello,
I am trying to get an SD card working. I am using KDS3.0/KSDK1.2.0 with Processor Expert and MQX. The hardware uses a 1bit bus and it looks like the maximum clock frequency should be below 10 MHz.
I tried to use SDCARD_DRV_Init() to initialize the card without success. When I look at the code I see that in SDCARD_DRV_InitSd() the clock is hard coded to 25 MHz and for some reason my host thinks it supports a 4 bit bus (see picture below). The SD card component uses the fsl_sdhc component and in KSDK1.1.0 it was possible to configure the bus witdh but this PExpert item has disappeared in KSDK1.2.0. But anyway, even if I auto initialise fsl_sdhc in Cpu.c it seems that the configurations I make there are completely ignored and overwritten when SDCARD_DRV_Init() is called. For example, I have set the bus clock to 2 MHz but as said the clock is hard coded to 25 MHz in SDCARD_DRV_InitSd().
Can anyone give some hints how to properly configure the SD card driver? The KSDK Reference Manual does not give much useful information here.
Regards
Matthias
Hello matthias,
please, can you attach whole project?
Many thanks,
Best Regards,
Iva
Hello Iva,
thanks for your reply. The SD card functionality is part of a larger project that I cannot give access to. I got the SD card working now by bypassing Processor Expert and the KSDK SD card drivers, and using MQX with MFS following the example KSDK_1.2.0\middleware\filesystem\mfs\examples\sdcard\Shell_Task.c. However, if you know of any example that is using Processor Expert and MQX/MFS you can let me know.
Regards
Matthias
Hello matthias,
I´m very sorry for my late response.
Unfortunately, at the moment there is no the example.But if I/someone else create this example in future, I will let you know.
Have a great day!
Iva