AnsweredAssumed Answered

FRDM-K64F--FileSystem(FatFs) on microSD through 4bit mode(SDHC)

Question asked by Marios Pelekis on Jun 4, 2015



I am trying to make a TFT device system ,communicating with a microSD card through 4bit mode, so I need to use the internal SDHC module.

Additionally, I need a high level software layer to control the Chan’s FileSystem .I have already use Chan’s FatFs code in 8 bit controllers so I want  to continue work with this.


My installed staff:

-KDS 3.0.0 IDE

-KSDK 1.2v

-PE Components(FAT_FileSystem, FatFsMemSDHC, Timeout)-Everything is downloaded from Freescale Forum Links

-Without Operating system


So I create a new Kinetis project with PE enable and without KSDK. While I have properly configured the microcontroller, I add directly the FAT_Filesystem PE component.

After this step, other components ask to be added (FatFsMemSDHC,Timeout,GPIO).

Then, after I have configured all components as I want, generate the code.



At the FatFsMemSDHC component I have chosen a CARD_DETECT_PIN  selection with pull-up  enabled(pull-up cannot be disabled).

If we look at the Hardware of the FRDM_K64F we can check that the CARD_DETECT_PIN is positive logic(active high) which means that I am not able to detect the card inserted in any way.

In other Evaluation board of Freescale(TWR-K60 for example), the card detect pin of the SD socket is negative logic and that’s why the default code that PE generates, enable the pull-up on the Pin.

I found a way to solve this if I delete the pull-up generated code (attached on image 5).

Except this, the Initialization of FATM1 seems not completed correctly so I cannot run FatFs functions(f_mount ,f_open, etc.)

I have attached every step of the above as well as the whole project  in order to see what I am speaking for.


Finally ,let me know if there is any possibility that FatFs can work on a Kinetis without OS while manage the low level SDHC drivers(4bit mode).

Untill now seems that it is possible in that way.Am I in the wrong way or I can solve the problem with some small changes to the existing project.




Original Attachment has been moved to: TestK64FatFs.rar