Hi there,
I am trying to handle some ADC interrupts but i have a more general question. I will try to explain my use case and use it as an example for the bigger picture.
I am using an lpcxpresso 4367 mounted on a custom pcb.
I am using an analog PIR sensor so that i can catch different levels of motion and generate the appropriate interrupts as well.
So i used lpcopen periph adc example as a code base.
Inside adc example there is ADC0_IRQHandler function which is triggered every time a specific adc channel asserts some voltage.
I want to find out (but arm specifciation only says about level and edge sensitive interrupts) when an interrupt is triggered. When ADC0_IRQHandler in my example is called?
Can i change the sensitivity of the triggering of an interrupt?
Again, in my example when no motion is detected the pir sensor generates mV that i dont care about.
Can i somehow filter values that are too low and trigger interrupt under a given threshold?
How do in general nvic interrupt handlers work? Where is their threshold specified?
Thanks a lot in advance
Hi Dimitris Sideris,
Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.
I'd highly recommend you refer to Chapter 47: LPC43xx/LPC43Sxx 10-bit ADC0/1 in the UM10503 which has illustrates the ADC operations in details, I think it can clarify you queries.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I surely checked the file you mentioned. It is the first thing I check. I didn't find anything that clears up my questions.
Can you please refer to it more specifically?
Thanks!
Hi Dimitris Sideris,,
Thanks for your reply.
1. Can I change the sensitivity of the triggering of an interrupt?
Now, the ADC can support to select the trigger source (See Fig 1).
Fig 1
2. Can I somehow filter values that are too low and trigger interrupt under a given threshold?
The ADC doesn't support the feature.
3. How do in general nvic interrupt handlers work? Where is their threshold specified?
About the NVIC, please refer to the Chapter 9 for details in the reference manual: UM10503.
Hope this is clear.
Have a great day,
Ping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------