S32K314 external interrupt issue

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

S32K314 external interrupt issue

ソリューションへジャンプ
4,014件の閲覧回数
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,948件の閲覧回数
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,994件の閲覧回数
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,965件の閲覧回数
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,949件の閲覧回数
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,905件の閲覧回数
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,907件の閲覧回数
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 件の賞賛
返信