I use eirq0 as the external interrupt and use the PTC0 pin. Reference routines are linked below.
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!
Solved! Go to Solution.
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
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
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