I use KEAZ128AMLH Controller where even though i disable the ADC Interrupt after a particular sequence (and then later enabled again), interrupt is being triggered.
Note : AIEN = Low, configured for HW (PIT (TEN, TIE, TIF registers are Low) on interrupt trigger so interrupt should not trigger as AIEN and TEN is low.
Hi,
I suppose that the previous interrupt still valid after you clear AIEN bit.
Pls try to clear the pending bit for the ADC when the clear AIEN bit
NVIC->ICPR[0]|=1<<15;
check if you can enter ISR
BR
XiangJun Rong
No it still hits the ISR even after turning off the PIT and clearing the pending ADC Interrupt
Note : ADC Interrupt is still enabled
on Disable of ADC, PIT and at the same time clearing its Pending interrupts is solving my issue.
Hi,
I suppose that you can use the NVIC module to control the interrupt.
DisableIRQ( ADC0_IRQn);
If you do want to stop ADC conversion, you can set the ADCH as 0x1F.
Hope it can help you
BR
Xiangjun Rong