PORT_SetPinInterruptConfig() mixing GPIO & PORT

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

PORT_SetPinInterruptConfig() mixing GPIO & PORT

669 Views
Frotz
Contributor III

Hi,

In the gpio_input_interrupt example for the FRDM-KE15Z, the interrupt is configured using PORT_SetPinInterruptConfig(). The pin for SW2 is on GPIOB and the port used in the example is PORTB. Is there any value in using a different port when calling this function. Is it always necessary to match the GPIO module and the port? Can they be mixed?

Thank you very much,

Andre.

0 Kudos
2 Replies

652 Views
Frotz
Contributor III

Hi Jing,

Thank you very much for putting a fine point on that for me. I appreciate your help!

Best,

Andre.

0 Kudos

660 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Frotz,

Yes, the io interrupt control register is in PORT group, not in gpio group. GPIOA is corresponding to PORTA and GPIOB is corresponding to PORTB. This is fixed.

Once PORT_SetPinInterruptConfig() is called, it only can enable one interrupt from a certain group pins.

 

Regards,

Jing

0 Kudos