I am working on S32K144 Eval board. i want to do a simple project where i can detect a external interrupt (probably by a switch connected to PTC-12) and switch on a LED. It can be done with simple if-else conditional statement also, but i want to know how to configure external interrupts for S32K144. Example projects have only internal interrupt example.
It will be great if someone could attach here a sample code which has a simple External interrupt( through switch) and toggles the LED whenever interrupt is received.
Hi.
Thank you for NXP employee.
I tried 'External interrupt' using s32K144 EVB.
Using example 'hello_world_s32k144', modified button1 ,2 interrupt example.
Please refer below comment in 'main.c' file.
/* Kevin START */
~~
/* Kevin END */
1. changed PIN 12, PIN 13 by input setting like below.
2. changed PTC 12,PTC 13 interrupt option
3. Generate Processor Expert Code
4. Modified 'main.c' file
/* Kevin START */ ~my changed code ~ /* Kevin END */
Thank you a lot.
Hi,
Please check flexcan_encrypted_s32k144 example project. You can find there an example on the implementation of the buttons interrupt.
Best regards,
Rares
Hi,
I tried looking int that code, it was quite confusing as i have never worked on CAN.
It will be really helpful if you can provide a basic sample code for External interrupt.
Pritam