This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
customer gets unintentional nested interrupts in his ADC interrupt routine from timer 1 interrupt. Reason is that he used DINT(), EINT() in some sub functions because of protection reasons. How can he prevent this?
Can he set IER=0 at the beginning of his ADC interrupt routine?
If yes, must he save IER register to recover it at the end of the ADC interrupt routine? Or is the IER automatically recovered by the HW?
Regards, Holger
Holger,
I would recommend reviewing this article for intentional interrupt nesting to see if it provides enough information to answer some of the questions.
-Tommy
Hello Tommy,
I know the article. In this case customer don't want nested interrupts but has to enable the INTM. We can discuss offline or per video call if you like.
Regards, Holger
Hi Holger,
Thanks for your question! IER is automatically restored on return from an ISR, so the customer does not need to store the IER state of the device when wanting to change it.
Only the PIEIER bits are not restored automatically, so if those get modified at all, they must be stored and then restored manually.
Let me know if that clears up the issue for you!
Regards,
Vince