GPIO Interrupt in K40Dx256(Tower Module) using ProcessorExpert

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

GPIO Interrupt in K40Dx256(Tower Module) using ProcessorExpert

1,085件の閲覧回数
keerthanas
Contributor I

I want to use the switch SW1 in K40DX256 tower module. I added the components Init_GPIO and InterruptVector for using PTC5 (SW1 - PTC5). My Init_GPIO Configurations are: 

Image_3.png

Image_5.png

For InterruptVector Module , It will show an error like

Image_6.png

how to debug this error or if there is any other configurations to use the switch.

0 件の賞賛
返信
2 返答(返信)

982件の閲覧回数
isaacavila
NXP Employee
NXP Employee

Hi Keerthana,

You could use your Interrupt for PORTC without using InterruptVector component, I attached a simple project where I toggle on-board LED when pressing SW3.

As you could see, you need to configure all interrupt settings in your GPIO component:

ConfigureInterrupt.jpg

And then populate your ISR function in order to attend your interrupt service request.

void PORTC_ISR(void) {

    if (PORT_PDD_GetPinInterruptFlag(PTC_PORT_DEVICE,5)) {

        PORT_PDD_ClearPinInterruptFlag(PTC_PORT_DEVICE,5);

        GPIO_PDD_TogglePortDataOutputMask(PTC_DEVICE,1 << 7);

    }

}

I hope this can help.

Best Regards,

Isaac Avila

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

982件の閲覧回数
keerthanas
Contributor I

Thank you very much for your answer. Really Its working .I have tested. :):):):)

With Regards,

Keerthana. S

0 件の賞賛
返信