The FRDM-K66F is a low cost development platform for KinetisĀ® K66, K65, and K26 MCUs.

K66 SD card Clif Notes

28 Feb 2018

Just to make the path easier for those that walk it behind me, I found these links useful in getting the SD card with a FAT file system to work:

References:
https://github.com/ARMmbed/mbed-os-example-filesystem
https://github.com/ARMmbed/sd-driver
https://os.mbed.com/docs/v5.7/mbed-os-api-doxy/class_f_a_t_file_system.html#a7703d0f9f2be4318f27ebc3d1f78b4ef

Error codes:
https://github.com/ARMmbed/mbed-os/blob/8b6a7aacc5d2b90ba40d89c8eeb680ebee81ea18/platform/mbed_retarget.h#L132-L393
- they're actually POSIX return codes, but this is handy, too

Libraries:
https://os.mbed.com/users/coverxit/code/sd-driver/
- this is the library you can import into your program if you're using the web-based compiler

NOTE:

  • If the examples above don't work for you, check whether the card you're using needs the extended partitioning - eg., it's > 2GB. I had some difficulty until I used a 2GB card, instead.
  • You shouldn't need to format or initialize the card with the mbed libraries to use the card; a properly FAT formatted SD card should work as-is.