S32K314 external interrupt issue

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

S32K314 external interrupt issue

Jump to solution
1,321 Views
Lita
Contributor II

I use eirq0 as the external interrupt and use the PTC0 pin. Reference routines are linked below. 

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/SIUL2-external-interrupt-example-proje...

 

The configuration is as follows:

/* Initialize interrupt */
IntCtrl_Ip_Init(&IntCtrlConfig_0);
IntCtrl_Ip_ConfigIrqRouting(&intRouteConfig);
//IntCtrl_Ip_ClearPending(SIUL_0_IRQn);
//IntCtrl_Ip_EnableIrq(SIUL_0_IRQn);
/***********************************************************************************************
* Port Driver
***********************************************************************************************/
Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);

Siul2_Icu_Ip_Init(0U, &Siul2_Icu_Ip_0_Config_PB_BOARD_InitPeripherals);

/* Enable ICU edge detect for ETH interrupt. */
Siul2_Icu_Ip_EnableInterrupt(0U, 0U);
Siul2_Icu_Ip_EnableNotification(0U, 0U);
//IP_SIUL2->MSCR[64] &= 0;
//IP_SIUL2->MSCR[64] = (1<<19);
/* Assign PTC0 input to EIRQ[0] */
//IP_SIUL2->IMCR[16] = SIUL2_IMCR_SSS(3U);

however ,Interrupt function cannot enter, who can solve this problem? thanks very much!

Lita_0-1692939790249.png

Lita_1-1692939825948.png

Lita_2-1692939864722.png

Lita_3-1692939933803.png

 

 

 

 

 

 

0 Kudos
Reply
1 Solution
1,255 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I was able to run your code and get into EIRQ0 interrupt on S32K3x4EVB. I just use different pin (PTE0) so it can be easily accessible on the EVB. So I set PTE0 for EIRQ0 in Pin tool, also enable weak pull up. Then remove your code that directly set PTC0, mainly IMCR16. This is set in Siul2_Port_Ip_Init. 

BR, Petr

View solution in original post

0 Kudos
Reply
5 Replies
1,301 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

please share full project you have or follow carefully setting given in the example and tailor it to your selected IRQ pin.

BR, Petr

0 Kudos
Reply
1,273 Views
Lita
Contributor II

Thanks for your reply.Reading directly through IO is normal, but with interrupts there is a problem, interrupt functions can not enter the problem. The works are as follows. 

0 Kudos
Reply
1,256 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I was able to run your code and get into EIRQ0 interrupt on S32K3x4EVB. I just use different pin (PTE0) so it can be easily accessible on the EVB. So I set PTE0 for EIRQ0 in Pin tool, also enable weak pull up. Then remove your code that directly set PTC0, mainly IMCR16. This is set in Siul2_Port_Ip_Init. 

BR, Petr

0 Kudos
Reply
1,213 Views
Lita
Contributor II
Thank you very much. I'm using JTAG. He can't interrupt the online simulation? Can I set this up? The burn program can be run offline.
0 Kudos
Reply
1,215 Views
Lita
Contributor II
Thank you for your reply. I checked and it was still the same problem, but I used IO queries to achieve it. I suspect the LINK file is different. Could you please check the link file of s32k314?
if(exit_it == 1){
exit_it = 0;
//ok!
}
0 Kudos
Reply