Hi all, i'm implementing a device that can work like MSD with a SDCard connected to the KL25 micro. The system is working well, the micro can write and read file with the FatFS and the PC recognize the mass storage device. I can open the Sdcard and see all the file but when i try to open one of this the time before read (for example) a txt file is of many seconds (more or less 30 sec ). In the image is selected the moment when i double click on the file txt to open, the system try to read 4096 byte but after 10 sec the system say: Status Cancelled; After that, three other attempts are done (for a total of 4 tentative). After 30 sec i can see the file. Can you help me, what can be the possible errors?? If i put the sdcard in a reader there is not problem . Thanks
up..
Hi ,in this days i have work for find a solution with the freescale stack library. A fist solution, that i find, is to increase the buffer length in the file usb_msc.h changing:
#define MSC_RECV_DATA_BUFF_SIZE (512)
#define MSC_SEND_DATA_BUFF_SIZE (512)
in :
#define MSC_RECV_DATA_BUFF_SIZE (8192)
#define MSC_SEND_DATA_BUFF_SIZE (512)
now i can load in to the sdcard files with dimension up to 8192byte, the problem with the MSD seem to be that the recieve buffer will not be emptied, writing the data, when it's reaches the maximal content of data. The file send to the device is not splitted in more small packages with the dimension of the buffer. Someone can help me?