LPC55xx ADC interrupt routine

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

LPC55xx ADC interrupt routine

2,112 次查看
ianbenton
Senior Contributor I

Would I be correct in thinking that the interrupt routine should clear STAT[TCOMP_INT] ?

Without doing so the interrupt routine runs continuously. I don't see any statement to that effect in the manual.

0 项奖励
回复
4 回复数

2,097 次查看
frank_m
Senior Contributor III

I would suppose any set interrupt flag would cause a continuous interrupt execution. The only difference is, certain flags like result ready get reset automatically on reading the result register.

I use to start out with an interrupt handler that clears all enabled interrupt flags regardless of their status.

0 项奖励
回复

2,102 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

STAT[TCOMP_INT] is for trigger interrupt flag, not ADC result ready interrupt flag.

If you want to use ADC trigger interrupt, yes, you need write 1 to clear it.

About read ADC data interrupt function, please refer to ADC interrupt demo under  SDK.

Strongly recommend you debug and run the ADC demo first.

 

Thanks.

 

BR

Alice

0 项奖励
回复

2,090 次查看
ianbenton
Senior Contributor I

When the SDK creates a project, it creates over 60,000 lines of code. I have searched for ADC0_IRQHandler in most of the logical places it could possibly be, but can't find it.

0 项奖励
回复

2,079 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

For example lpadc_interrupt demo:

Alice_Yang_0-1639371812110.png

 

BR

Alice

 

0 项奖励
回复