PORT_SetPinInterruptConfig() mixing GPIO & PORT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PORT_SetPinInterruptConfig() mixing GPIO & PORT

1,847件の閲覧回数
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 返答(返信)

1,830件の閲覧回数
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 件の賞賛
返信

1,838件の閲覧回数
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 件の賞賛
返信