iMX RT USB Host msd fatfs do not work well.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX RT USB Host msd fatfs do not work well.

1,001 Views
hiro33
Contributor III

Hello

I developed USB Host Mass Storage using MIMXRT1064-EVK board and MCUXpresso UDE.
4K bytes are written every 100ms.
Writing to a USB memory is usually 10ms to 30ms.
However, it sometimes takes more than 400ms.
I don't know why it takes more than 400ms.
Please tell me what's wrong with my program.

Time measurement is done on lines 241 and 249 of wti_usb_host.c.

Best Regards.

USBWriteTime.PNG

Labels (1)
0 Kudos
2 Replies

938 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi 

I would suggest you refer to usb_host_msd_fatfs demo in SDK.

SDK_2_10_0_EVK-MIMXRT1064\boards\evkmimxrt1064\usb_examples\usb_host_msd_fatfs\bm

 

you can enable MSD_FATFS_THROUGHPUT_TEST_ENABLE to test the throughput.   or toggle a GPIO to test the performance, and compare the difference.

 

Please refer to MCUXpresso SDK USB Stack User's guider.

danielchen_0-1640153592463.png

 

Regards

Daniel

 

 

0 Kudos

923 Views
hiro33
Contributor III

Hi Daniel

I checked using \usb_examples\usb_host_msd_fatfs\bm.
I made the USB read / write infinite instead of twice.
I'm adding GPIO processing on lines 207 and 217 of host_msd_fatfs.c.
USB writing is completed in about 10ms, but sometimes it takes 1 second.
I fixed it to take 1 second, what should I do?

Best Regards.USB波形.PNG

0 Kudos