KL27 USB MSD device application

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

KL27 USB MSD device application

1,776 次查看
juanjosevicente
Contributor I

Hi everyone,


I am currently designing a board based on a KL27 which will communicate via USB to an android tablet.
Based on the demo available in this article https://community.nxp.com/docs/DOC-105714,
I would like this board to act as MSD device which would create a file including some sensor values (these value will eventually change through time).

I haven´t work with the USB protocol yet. So, I will base my project on this demo.

Regarding the callback function, where should I create the file and how should I prevent the tablet to access to this file when I am updating it?

Thanks in advance,
Juanjo

标签 (1)
标记 (2)
0 项奖励
回复
4 回复数

832 次查看
bobpaddock
Senior Contributor III

Take a look at how AN4379 does the fake text files.

See Any update fro AN4379 MSD device bootloader? 

https://community.nxp.com/docs/DOC-97782 

Also take a look at FatFs - Generic FAT File System Module .

0 项奖励
回复

832 次查看
juanjosevicente
Contributor I

Hello Alice,

I have the KDS3.0 and the SDK1.3 already installed. Also I have the demo running without any issue.

My question is about how can I create a file in the MSD device, using the KL27 itself. I need at least a plain text file which includes some info like several ASCII characters.

Regards,

Juanjo

0 项奖励
回复

832 次查看
mjbcswitzerland
Specialist V

Hi

Note also that USB-MSD FAT emulation is also a very efficient method in various circumstances.


There is a FRDM-KL27Z binary here that shows it in operation:
http://www.utasker.com/kinetis/FRDM-KL27Z.html#EM_FAT

The technique is explained in http://www.utasker.com/docs/uTasker/uTaskerEmulatedFAT.pdf

It can also be mixed with multiple USB-MSD LUMS so that the processor appears as multiple disks, which could be emulated ones, FAT disks in internal Flash or on an attached SD card (or any mixture of these).


At the link there are all of these options which can be generated with just a few defines. They have been verified in real products and so are suitable for projects that need immediate and proven operation. Operates on KL27 and all other Kinetis parts with most compilers/IDEs, so also no porting effort needed.

Regards

Mark

0 项奖励
回复

832 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Juanjo,

If you want to refer to that demo, please first download and install KSDK v1.2 .

Please refer to this thread to downlaod : Where to get SDK 1.3? 

Please refer to "KDS_Users_Guide" (KDS_v3\doc\KDS_Users_Guide.pdf) install on KDS .

Hope it helps


Have a great day,
Alice Yang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复