how do you set up KBI0_IRQHandler and KBI1_IRQHandler interruptions?

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

how do you set up KBI0_IRQHandler and KBI1_IRQHandler interruptions?

1,438件の閲覧回数
carlesls
Contributor II

I am polling the pins PTA and PTB to get the state/value of the pin but I want to use the KBI0_IRQHandler and KBI1_IRQHandler for this pins... Is it possible? 

A secondary question is it better than polling in terms of flash memory?

 

Thanks for all. 

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

1,347件の閲覧回数
carlesls
Contributor II

What does ALT0, ALT1, ALT2, means...? Thank you

0 件の賞賛
返信

1,343件の閲覧回数
Celeste_Liu
NXP Employee
NXP Employee

The full name of ALT is "alternative", which means other options different from the default way.

0 件の賞賛
返信

1,341件の閲覧回数
carlesls
Contributor II

carlesls_0-1732617638350.png

I choose the keyboard interrupt for the pta1 and the pta3. And then I updated the code.  

carlesls_1-1732617818991.png

Then I understand that I have to use some mask and activate the interruption.

 

carlesls_2-1732617923443.png

 

But still the interruption is not being triggered.

carlesls_3-1732617959889.png

 

 

 

0 件の賞賛
返信

1,386件の閲覧回数
carlesls
Contributor II

Thanks a lot again. 

0 件の賞賛
返信

1,399件の閲覧回数
Celeste_Liu
NXP Employee
NXP Employee

Hello carlesls,

Thanks for your post. 

For the first question, the answer is yes. I know that you are using the MKE04Z8. Specifically, you can refer to "10.2.1 Signal Multiplexing and Pin Assignments" in the Reference manual, as shown in the following figure.

Celeste_Liu_0-1732162705827.png


For the second question, if I understand correctly, you are asking which one is better between polling and interrupts from the perspective of memory. I think interrupts are better. Polling will take up a large amount of processor time and consume CPU resources.

Hope below information can helps.

Best Regards,

Celeste