how do you set up KBI0_IRQHandler and KBI1_IRQHandler interruptions?

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

how do you set up KBI0_IRQHandler and KBI1_IRQHandler interruptions?

307 Views
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. 

Labels (1)
0 Kudos
Reply
5 Replies

216 Views
carlesls
Contributor II

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

0 Kudos
Reply

212 Views
Celeste_Liu
NXP Employee
NXP Employee

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

0 Kudos
Reply

210 Views
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 Kudos
Reply

255 Views
carlesls
Contributor II

Thanks a lot again. 

0 Kudos
Reply

268 Views
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