cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 USB OTG and RXFLVL interrupt masking

ashibakov
Associate II
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.
1 REPLY 1

Sorry, bumping old zombie unanswered threads off my feed

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