Skip to main content
Visitor II
March 18, 2022
Question

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

  • March 18, 2022
  • 2 replies
  • 801 views

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?

    This topic has been closed for replies.

    2 replies

    Graduate II
    March 18, 2022

    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. :)

    recentlyAuthor
    Visitor II
    March 19, 2022

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