How to add SD card support in the composite msd_cdc demo[KSDK 1.3]

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to add SD card support in the composite msd_cdc demo[KSDK 1.3]

How to add SD card support in the composite msd_cdc demo[KSDK 1.3]

So far the composite msd_cdc demo from ksdk 1.3 just supports ram disk application, to have the SD card support just as the dev_msd demo, you have to go through the following steps:

  • Add platform/composite/src/sdcard/fsl_sdhc_card.c and platform\drivers\src\sdhc\fsl_sdhc_irq.c to the project.

pastedImage_4.png

  • Add project including path: platform\composite\inc and platform\drivers\inc.
    pastedImage_15.png
  • Change usb\example\device\composite\msd_cdc\disk.c as attached file

     Change usb\example\device\composite\msd_cdc\disk.h as attached file

     Change usb\example\device\composite\msd_cdc\hardware_init.c as attached file.

pastedImage_24.png

Compile the demo and let it go, the PC would recognize the MSD and CDC device,  but might need you install the CDC driver, use the one from the folder of "C:\Freescale\KSDK_1.3.0\examples\twrk60d100m\demo_apps\usb\device\cdc\virtual_com\inf".

With SD card inserted , you may see the removable disk, and format the disk just like below:

pastedImage_17.png

Copy a ~50M file to this disk

pastedImage_18.png

eject the disk after done, and then pull and plug the device again, you may verify the copied file with fc.exe command

pastedImage_20.png

pastedImage_21.png

This solution has been tested on TWR-K60D100M with TWR-SER, both bm and mqx examples are verified ok, please kindly refer to the attached files for more details.

标签 (1)
附件
评论

`fsl_sdhc_card.c` is already connected to the project in the driver/ folder as is the `platform\driver\src` include path

无评分
版本历史
最后更新:
‎03-03-2016 12:01 AM
更新人: