GPIO Simple interrupt mpc5200B

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

GPIO Simple interrupt mpc5200B

621 Views
sburck
Contributor I

I started today takng some legacy code running on the MPC5200B, and have to add an optical encoder which has been hooked up to ETH16 and USB6 as two input GPIO pins.  These pins were chosen as one of the will be supplying an interrupt (ETH16 is documented as allowing a simple GPIO interrupt), and the other will be read during the handler of that interrupt.

I'm a bit confused as to how to implement the handler.  There is already a handler for the external IRQ, handling core stuff which I'd rather not touch if I don't have to; but it is unclear to me where the GPIO simple interrupts are vectored to.  Do they go to the same vector and then the handler has to distinguish between them?

Labels (1)
0 Kudos
2 Replies

519 Views
sburck
Contributor I

     (Thanks.  I'll look it over in the next couple of days and get back to you (including pressing the correct answer button

0 Kudos

519 Views
Pavel
NXP Employee
NXP Employee

Look at attached file. It is simple program example for the MPC5200B Eth14 interrupt. The MPC5200b Eth14 is configured as GPIO interrupt. See main.c file.


Have a great day,
Pavel Chubakov

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

0 Kudos