Hi Brent,
Thank you for your reply.
Carlos who is one of the Freescale engineer shared me a project which use the SD card as a MSD storage USB mass storage device from SD card with TWR-K60 . He said it should work, but when I copy the disk.c to the MQX demo project msd_disk_twrkf120m, it does not work. I am wondering if I did something wrong. I know the read/write on the SD card also use the the interrupt but how does it work? Here is a document shows it use the SD card as a USB MSD storage http://cache.freescale.com/files/microcontrollers/doc/user_guide/USBUG.pdf
There is still a part of the code in that project I don't understand.
if(3 == u8gvIndex++)
{
sdcard_handle->LOCATION = (lba_data_ptr->offset >> 9);
write(sdcard_handle,u8gvlba_data_buff,1);
u8gvIndex = 0;
}
Why it use 3 here? If it is used to convert the 64 bytes buffer to 512 bytes, it should use 7. I am confused about this.
Thank you again.
-Daniel