3 Replies Latest reply on Jun 8, 2016 10:45 PM by maustin_1409416

    Determining which LPC triggered an interrupt

    maustin_1409416

      OK, so this might seem like a pretty basic level question, but I'm a bit of a newbie.

         

      I have two Low Power Comparators in my design, and in order for these to kick my CPU out of DeepSleep, have these linked to a Global Signal component configured with a combined Low Power Comparator interrupt.

         

      Where I'm having trouble is in determining which of the two LPC's has triggered the interrupt so that I can direct my ISR code to undertake the appropriate task.

         

      I thought a simple "if" statement, using the GetInterruptSource() API, but I'm not actually sure what this API returns and so I'm not sure how to check it and see which of the two LPC's has triggered my interrupt.

         

      Can anyone help me understand how to go about this?  I may not actually be approaching this from the correct angle, so if you're sitting here reading this thinking "hmmm, you're making life difficult for yourself there pal!", feel free to gently steer me in the correct direction

         

      Cheers,

         

      Mike