Skip to main content
Lukasz Przenioslo
Associate III
March 26, 2018
Question

Alternative to MSC device (MTP)

  • March 26, 2018
  • 7 replies
  • 3268 views
Posted on March 26, 2018 at 07:30

Hello there,

I was able to implement an MSC class device basing on external qspi flash memory (

https://community.st.com/message/190720-re-qspi-fatfs-usb-mass-storage?commentID=190720

).

It works, but after some research and testing i think that this is not the right USB device class for the application. The goal is to be able to modify files in the system within it by the MCU (FatFS) and by the user using connected PC through USB. The problem here is that both systems (FatFS and USB MSC) implemet their own filesystems, thus they both operate on raw flash memory. this is not good, as I am having hard time hard time making this thread safe, as the USB components operate purely on interrupt routines. Instead, it would be beneficial to make the USB host PC to use the internal FatFS. The only idea how to do it I got now, is using USB CDC and implementing all communication + PC app by myself. I would like to avoid that.

I have noticed an USB class that might fit into this application but I am not sure how is it called and either it is proprietary at any point. I noticed it after I connect my Android phone to the PC:

0690X0000060A4FQAU.png

This has to be something different than MSC. Also the phones operating system is just fine with me modifying the files there from my PC. Because of that I believe this is the kind of USB class designed for such application. The question is what is it and how can one implement it in STM32?

I would appreciate all help.

#msc #cdc #usb
This topic has been closed for replies.

7 replies

Lukasz Przenioslo
Associate III
March 26, 2018
Posted on March 26, 2018 at 08:39

Hello,

I have found out that the class I am looking for is MTP (Media transfer protocol). I wass all happy after I found this document and started reading about itL

http://www.st.com/resource/en/user_manual/dm00105256.pdf

 

It was a matter of time since I noticed that this class is available only for HOST's not DEVICE's. Thats a pitty...

James Murray
Associate III
April 4, 2018
Posted on April 04, 2018 at 02:02

According to the Wikipedia pages about MTP it seems to be less standard that MSC and may require special drivers at the PC end. If this is incorrect please let me know!

I'd like to use it for the same reasons as you do, but the driver-less usage of MSC is more important for me.

James

Tesla DeLorean
Guru
April 4, 2018
Posted on April 04, 2018 at 03:12

Microsoft used MTP heavily with their media players circa 2005-2006

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ST Technical Moderator
April 4, 2018
Posted on April 04, 2018 at 11:12

Hello,

In fact, the MTP device is under USB roadmap. But, currently, there is no short term planning defined yet.

Best Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Lukasz Przenioslo
Associate III
April 6, 2018
Posted on April 06, 2018 at 08:22

I would appreciate an update if anything moves forward in this manner. If You will need any testers for this new driver let me know

DAHMEN.IMEN

‌