Hi
You can check that your FRDM-K64F is working correctly first. Make sure that J21 is set so that it can supply power to the host.
Attached is a binary that you can load to the board that does USB-MSD host. Just connect any memory stick and use the OpenSDA VCOM connection at 115'200 Baud to see the operation. Below is what it looks like when a memory stick is connected (or when one is inserted when the board starts). The command line interface has a DOS like menu so you can then view files, create directories, navigate, rename, etc. and there are some disk-analysis functions for people who want to learn the low level details of FAT on the memory stick. USB-MSD host also require a FAT file system, whereby here utFAT is used.
If you need a working solution it is available in the uTasker K64 OpenSource project at http://www.utasker.com/forum/index.php?topic=1721.msg7086#msg7086
If your main interest is in porting or fixing the examples you may still be able to benefit from it because it contains a complete K64 simulation, including USB host mode and memory sticks so that you can study the operation and work out how to solve your issues.
Regards
Mark
Hello, world... KINETIS
OS Heap use = 0x0441 from 0xc000
USB FS device detected
USB device information ready:
USB2.0 device with 64 byte pipe
Vendor/Product = 0xcd12/0xef18
Manufacturer = "USB "
Product = "DISK "
Serial Number = "0482DE22941182E"
Bus-powered device (max. 100mA) with 1 interface(s)
Mass Storage Class : Sub-class = 0x06 interface protocol = 0x50
Endpoints:
2 = BULK OUT with size 64
2 = BULK IN with size 64
Enumerated (1)
LUN = 1
UFI INQUIRY -> Status transport - Passed
UFI REQUEST SENSE -> Status transport - Passed
UFI FORMAT CAP. -> (2:512:511744) Status transport - Passed
UFI READ CAP. -> (512:511743) Status transport - Passed
Mem-Stick mounting...
Disk E mounted
Serial number: 00
Software version V1.4.012
Device identification: KINETIS
Main menu
===================
1 Configure LAN interface
2 Configure serial interface
3 Go to I/O menu
4 Go to administration menu
5 Go to overview/statistics menu
6 Go to USB menu
7 Go to I2C menu
8 Go to utFAT disk interface
9 FTP/TELNET client commands
a CAN commands
b Advanced commands
help Display menu specific help
quit Leave command mode
8
Disk interface
===================
up go to main menu
info utFAT/card info
dir [path] show directory content
dird [path] show deleted directory content
dirh [path] show hidden content
infof [path] show file info
infod [path] show deleted info
cd [path] change dir. (.. for up)
file [path] new empty file
write [path] test write to file
mkdir new empty dir
rename [from] [to] rename
trunc truncate to [length] [path]
hide [path] file/dir to hide
unhide [path] file/dir to un-hide
prot [path] file/dir to write-protect
unprot [path] file/dir to un-protet
print [path] print file content
del [path] delete file or dir.
undel undelete [name]
format [-16/12] [label] format (unformatted) disk
fformat [-16/12] [label] full format (unformatted) disk
re-format [-16/12] [label] reformat disk!!!!!
re-fformat [-16/12] [label] full reformat disk!!!!!
sect [hex no.] display sector
help Display menu specific help
quit Leave command mode
dir
Directory E:\
---- 05.11.2012 17:13 <DIR> CCA_Design_Rec_C
---A 22.01.2017 19:29 209396 software.bin
---- 11.02.2016 02:51 <DIR> 10.2.2016
---- 16.02.2016 00:56 <DIR> 15.2.2016
---- 22.02.2016 03:04 <DIR> storage_22.2.2016
---- 20.12.2014 22:02 <DIR> USBPlay
---A 27.02.2016 14:26 54790 memo.txt
---- 08.03.2016 03:45 <DIR> 7.3.2016
---- 09.03.2016 02:36 <DIR> 8.3.2016
---- 10.03.2016 03:43 <DIR> 9.3.2016
---- 14.03.2016 04:10 <DIR> 14.03.2016
---- 15.03.2016 19:44 <DIR> 15.3.2016
---- 22.03.2016 22:00 <DIR> 22.3.2016_database
---- 24.03.2016 04:24 <DIR> 23.03.2016
2 files with 72843790 bytes
12 directories, 83726336 bytes free
E:\>