cancel
Showing results for 
Search instead for 
Did you mean: 

OTG_USB: How to decouple OTG interrupt filesystem access from normal access.

recently
Associate II

I'm currently implementing USB OTG filesystem access via the MPT protocol on a H7 with an external quadspi-flash. It works so far, but all OTG calls are interrupt functions that then call file system functions via the mpt protocol. How can you then access the file system from a normal task level without causing interference?

2 REPLIES 2
Piranha
Chief II

The protocol is MTP, no MPT.

You've chosen a USB stack that does everything in interrupt handlers. As you can see, such a design is stupid and practically unusable in non-trivial projects. It's implemented that way because the developers of it are incompetent.

For example, TinyUSB is a much better USB stack designed by people, who actually use brain. Unfortunately at this point it doesn't have MTP support. Well, instead of rewriting a significant part of ST's junk, you can spend that time and implement MTP support for TinyUSB and commit it to the project. :)

recently
Associate II

Ok... thanks for the honest answer... I need to process this