ADC INTERRUPT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC INTERRUPT

1,158 Views
Naveen158
Contributor II

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.

Labels (1)
4 Replies

1,098 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

1,029 Views
Naveen158
Contributor II

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.

0 Kudos
Reply

1,130 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

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.

 

xiangjun_rong_0-1719889359749.png

 

Hope it can help you

BR

Xiangjun Rong

 

0 Kudos
Reply

1,110 Views
Naveen158
Contributor II

Thanks Xiangjun Rong for Answering my Question, the solution you gave me works absolutely fine but it does not solve my root Problem, can you explain me why ISR is executing even though the interrupt is off (AIEN = 0).

0 Kudos
Reply