Skip to main content
ashibakov
Associate II
April 24, 2014
Question

STM32 USB OTG and RXFLVL interrupt masking

  • April 24, 2014
  • 1 reply
  • 779 views
Posted on April 24, 2014 at 22:19

This question was asked during a code review. The function that reads

a packet from RxFIFO masks the `RxFIFO nonempty' (RXFLVL) interrupt

while reading the packet (both in our code and the standard USB OTG device library supplied by ST). The manual (RM0008) also says that the application can mask this interrupt (is that a recommendation?). The question is why? The only (far fetched) scenario that I could come up with is that a higher priority interrupt may preempt the current USB OTG interrupt, and in turn change the priority of the USB OTG interrupt which will then preempt the one already in progress (is this even possible?).  Is there any other reason? Otherwise, what does masking RXFLVL achieve? USB OTG interrupt will certainly not preempt itself so in effect is it already `masked' for its duration.
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    August 10, 2018

    Sorry, bumping old zombie unanswered threads off my feed

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..