I am trying to make a project which uses eMIOS GPT to produce a periodic interrupt and blink the LED by defining the ISR. But on buiding undefined reference to 'EMIOS0_5_IRQ' error is coming.
Please tell me how can I solve this error and a proper way to define any ISR.
Hi @SParihar
Sorry for not explaining correctly.
The error shown in S32DS could be caused by the configuration of the ISR in the IntCtrl_Ip. In this configuration, you do not define the handler. So, when you call extern ISR(EMIOS0_5_IRQ) as the handler is not defined causes the error "undefined reference to".
If you refer to the PIT example you use as a reference, you will see that the handler is defined as PIT_0_ISR, which will be used in extern ISR().
Hi @SParihar
I look deep into your project and the following are my observations:
/* Initialize EMIOS instance 0 - Channel 0 */
//Emios_Gpt_Ip_InitChannel(EMIOS0_CH0, &EMIOS_0_ChannelConfig_PB[1]);
Emios_Gpt_Ip_InitChannel(EMIOS0_INST, &EMIOS_0_ChannelConfig_PB[1]);
/* Enable channel interrupt EMIOS 0 - CH_0 */
Emios_Gpt_Ip_EnableChannelInterrupt(EMIOS0_INST, EMIOS0_CH0);
/* Install IRQ handler for EMIOS */
//IntCtrl_Ip_InstallHandler(EMIOS0_5_IRQn, EMIOS0_5_IRQ, NULL_PTR);
//IntCtrl_Ip_EnableIrq(EMIOS0_5_IRQn);
IntCtrl_Ip_Init(&IntCtrlConfig_0);
IntCtrl_Ip_EnableIrq(EMIOS0_5_IRQn);
void PitNotification(void)
The EMIOS clock is 160MHz and the EMIOS0_INTERVAL needs to be a value of 16bits.
You need to have a loop to wait for the interrupt to occur - while (1).
//extern void EMIOS0_5_IRQ(void);