AnsweredAssumed Answered

STM32 USB OTG and RXFLVL interrupt masking

Question asked by shibakov.alex on Apr 24, 2014
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.