LPC11C24 Interrupt Logic

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

LPC11C24 Interrupt Logic

856 Views
f_fiorini
Contributor III

Hi all,

I'm developing some software for a PCB using the LPC11C24 board as MCU, and I have a doubt regarding the interrupt logic.
As far as I know, I can define a WAKEUP_IRQHandler and a PIOINT0_IRQHandler, the former responsible of waking up the MCU when in (Deep) Sleep mode, the latter just defines a routine whenever any GPIO pin in Port 0 gets triggered accordingly.
I'm currently using pin 0_11 in both WAKEUP logic and to switch between states when the MCU is awake, but I'm unsure of what to expect.

Is it possible to dynamically change the interrupt trigger (from FALLING to RISING edge) and therefore use the same pin for two different interrupt handlers, based on its current interrupt logic?
If so, is there some example I can refer to? Or just have a chat with someone who managed to get this working.

Thank you in advance, any help is appreciated.

Best,

Federico  

Labels (5)
0 Kudos
3 Replies

694 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Federico Fiorini,

    About the falling or rising edge trigger, you still need to modify the control register to change the edge in your code.

   The chip don't have the hardware function to realize it dynamically, you need associated with your code to realize it.

    Actually, just change the STARTAPRP0 register configuration.

Wish it helps you!

If you still have question about it, please kindly let me know.

With is helps you!

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

694 Views
f_fiorini
Contributor III

Thanks for the prompt reply kerryzhou‌!
My original idea was to dynamically change the register configuration from within the interrupt handlers, so that further triggers will be handled in either of the two (WAKEUP_IRQn and PIOINT0_IRQn). 
Do you think this is going to be a proper solution?

Thank you in advance

0 Kudos

694 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Federico Fiorini,

     If your original interrupt is triggered, then enter the interrupt, I think you can modify the register in the interrupt handler.

   You can try it on your side, whether it works or not.

If you still have question about it, please kindly let me know.
Have a great day,
Kerry

-------------------------------------------------------------------------------
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