interrupt without processor expert in KDS

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

interrupt without processor expert in KDS

856 Views
lijofrancis
Contributor III

Dear sir

     I am using K40 controller using KDS. when i am using without processor expert the files not generating vector.c files.So i add vector.c files but it is not working.I does not want processor expert I likes to do project by our style.Actually i want MK40DZ10.h files that is generated by processor expert.so i copied into the file i generated without processor expert.please tell me how i enable interrupt handler using vector.c n the project without  generated processor expert

0 Kudos
2 Replies

389 Views
adriancano
NXP Employee
NXP Employee

Hi,

In this case the exception handlers name are already set and the interrupt vector is loaded in the startup_MK20D5.s (or the same startup file for your device).

startup.png

In the image you can see the I2C0_IRQHandler, this is the name for the ISR you need to create in your code, in this case the function with the name I2C0_IRQHandler will be called when an interrupt of the I2C0 occurs.

You can copy the MK40DZ10.h from the processor expert project and erase the one in the one project, that is not problem. The difference is that the just KDS project use a header file that access in a different way to the registers.

Attached you can see an example I created for using the PTC interrupt in a TWR-K20D50 to toggle a led, the project uses the KDS header file. Please refer to the code for better understanding.


Hope this information can help you

Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

389 Views
LiKe
Contributor I

I change to MK64FN1M0 and the interrupt can working, thank you.

0 Kudos