S32K314 external interrupt issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K314 external interrupt issue

跳至解决方案
3,950 次查看
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

 

 

 

 

 

 

标记 (1)
0 项奖励
回复
1 解答
3,884 次查看
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 项奖励
回复
5 回复数
3,930 次查看
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 项奖励
回复
3,901 次查看
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 项奖励
回复
3,885 次查看
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 项奖励
回复
3,841 次查看
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 项奖励
回复
3,843 次查看
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 项奖励
回复