2014-04-24 01:19 PM
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.2018-08-10 09:37 AM
Sorry, bumping old zombie unanswered threads off my feed