LPC55xx ADC interrupt routine

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

LPC55xx ADC interrupt routine

926 Views
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 Kudos
4 Replies

911 Views
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 Kudos

916 Views
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 Kudos

904 Views
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 Kudos

893 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello,

For example lpadc_interrupt demo:

Alice_Yang_0-1639371812110.png

 

BR

Alice

 

0 Kudos