USB HOST (PEN DRIVE)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

USB HOST (PEN DRIVE)

跳至解决方案
2,250 次查看
eliezer_fortron
Contributor I

Hello, I have an IMXRT1050-EVKB kit.
I'm trying to create .txt file and write to a thumb drive, but all examples of the SDK teach only to communicate with terminal (Tera Term).
Has anyone ever written a txt file on the thumb drive? Can you help me?

0 项奖励
1 解答
2,039 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hi Eliezer,

Please ensure that you are connecting the USB stick on micro USB connector U9, using a proper micro USB - USB Host adapter (that ties to GND the ID pin).


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
5 回复数
2,039 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hi Eliezer,

You could take as reference/base the “host_msd_fatfs_bm” SDK example (from SDK v2.4.2 for IMXRT1050-EVKB board), that access to USB stick folders/files:

usb_examples->host_msd_fatfs_bm

Attached you can find the readme PDF file of such example.

 

CAUTION: This example erases all the content of the connected USB stick (performs a format).


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,039 次查看
eliezer_fortron
Contributor I

Hello Carlos,
I imported the SDK sample and followed step by step into PDF but it did not work.
Is something missing to be done?

0 项奖励
2,040 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hi Eliezer,

Please ensure that you are connecting the USB stick on micro USB connector U9, using a proper micro USB - USB Host adapter (that ties to GND the ID pin).


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
2,039 次查看
eliezer_fortron
Contributor I

Hi Carlos, I've been able to find what I need.
Thanks for listening.

0 项奖励
2,039 次查看
eliezer_fortron
Contributor I

Ola Carlos, set the example right.
I am trying to create a .txt file to save in PEN DRIVE but there is a lot of stuff in that code, I'm pretty confused, I'm new to NPX.
I am using as base the FatFs - Generic FAT Filesystem Module.
I am not able to find the functions that tests if the pen drive is connected in order to generate my .txt file and when it is disconnected.

0 项奖励