ADC INTERRUPT

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ADC INTERRUPT

2,481 次查看
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.

标签 (1)
4 回复数

2,421 次查看
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 项奖励
回复

2,352 次查看
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 项奖励
回复

2,453 次查看
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 项奖励
回复

2,430 次查看
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 项奖励
回复