PORT_SetPinInterruptConfig() mixing GPIO & PORT

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PORT_SetPinInterruptConfig() mixing GPIO & PORT

968 次查看
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 项奖励
回复
2 回复数

951 次查看
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 项奖励
回复

959 次查看
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 项奖励
回复