2017-11-01 03:42 AM
Hi,
In your opinion, what would be the proper way to disable an interrupt, disabling only the peripheral enable bit or also the NVIC bit?
Is there a risk to disable only the peripheral bit and leaving the NVIC IRQ enabled? in the case of EXTI5-9, for example, that is a must, so I wonder, if for efficiency sake it is good practice to leave the NVIC always enabled?
#interrupts #nvic #irq2017-11-01 04:15 AM
Both disabling the device or the NVIC take serveral cycles to take effect. This must be considered.
2017-11-01 05:18 AM
At the source...
2017-11-01 05:56 AM
Both answers above are clearly correct. If you want to dig deeper then google is your friend with 6 useful links on the first page:
https://www.google.com/search?q=nvic+disable+interrupt+delay
2017-11-01 06:49 AM
At the source, meaning, at the peripheral alone is sufficient, as I thought. Is that what you mean?
2017-11-01 06:58 AM
Yes, the peripheral typically has the logic to latch/clear things and gate things downstream, so usually the best place to enable/disable.
2017-11-01 07:03 AM
Google is a great friend but that is not what I was asking. I don't care about those tiny delays, what I was pondering about was opposite to your google search, I was trying to get your opinion if using just the peripheral interrupt disable is safe enough to disable the interrupt without changing the NVIC settings, is it a good practice....
2017-11-01 07:30 AM
is it a good practice....
It's not. The infocenter.arm.com link outlines the reason.