LPC1347 Level Interrupts, lpcware, MCUXpresso

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

LPC1347 Level Interrupts, lpcware, MCUXpresso

642 Views
ronkreymborg
Contributor I

I need interrupts from both edges of a 0 to 3.3V triangular input wave. It must interrupt on the rising edge and then on the falling edge. The actual interrupt levels are not important, just so both edges are caught. The frequency is low enough that using EDGE triggering I get six or so interrupts at the chip's trigger levels on both edges.

I had thought the solution would be to use LEVEL triggering implemented so that at the first rising edge interrupt the rising interrupts are turned off and falling interrupts turned on. On the subsequent falling interrupt, falling interrupts are turned off and rising interrupts turned on. This would give me a single interrupt on both edges.

However, while I have tried various combinations of the associated  pinint_13xx functions, I cannot arrive at a sequence that would look something like:

void PIN_INT1_IRQHandler(void) {

   // Interrupt setting is LEVEL.

   if (this Interrupt was high-going) {

      Disable high-going interrupts;

      Enable low-going interrupts;

   }

   else {

      Enable high-going interrupts;

      Disable low-going interrupts;

   }

My problem is there does not seem to be equivalent functions in the pinit_13xx library and I am not sure I understand how to implement the above functions myself. Has anyone managed to implement level interrupt code with this functionality?

Many thanks,
Ron Kreymborg

Labels (1)
0 Kudos
1 Reply

517 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Ron Kreymborg,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
According to your reply, I'm not very clear with the triangular wave, likes the frequency, amplitude, etc, so I hope you can show me this wave, in further,
I was wondering if you can introduce the testing result about using either the edge or level detecting to measure the triangular wave.
I'd like to suggest to you download the LCPOpen library which contains ADC demo project and please refer to it.

LPCOpen Software for LPC13XX | NXP 

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos