S32K144 EVB External interrupt

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

S32K144 EVB External interrupt

3,585件の閲覧回数
pritampatil
Contributor III

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.

タグ(2)
3 返答(返信)

2,867件の閲覧回数
Kavin-Sun
Contributor II

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 */

KavinSun_0-1630053755709.png

 

 

1.  changed PIN 12, PIN 13 by input setting like below. 

KavinSun_1-1630053853836.png

2. changed  PTC 12,PTC 13 interrupt option 

KavinSun_2-1630053894182.png

3. Generate Processor Expert Code 

KavinSun_4-1630053950984.png

4. Modified 'main.c' file 
   /* Kevin START */    ~my changed code ~  /* Kevin END */

 

Thank you a lot. 

 

 

0 件の賞賛
返信

3,040件の閲覧回数
raresvasile
NXP Employee
NXP Employee

Hi,

Please check flexcan_encrypted_s32k144 example project. You can find there an example on the implementation of the buttons interrupt.

Best regards,

Rares

3,040件の閲覧回数
pritampatil
Contributor III

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

0 件の賞賛
返信