LPC55xx ADC interrupt routine

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC55xx ADC interrupt routine

2,121件の閲覧回数
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,106件の閲覧回数
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,111件の閲覧回数
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,099件の閲覧回数
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,088件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

For example lpadc_interrupt demo:

Alice_Yang_0-1639371812110.png

 

BR

Alice

 

0 件の賞賛
返信