Board used for Development: S32K344
Module : ICU
We are working on S32K344 hardware and configured ICU(Input capture unit) module for detecting both rising edge and falling edge triggering functionality.
ICU module is configured by referring the NXP example configuration. To test it, we are feeding PWM signal as input to ICU pin.
When it detects the signal, interrupt is triggered but the handler is not being serviced and left unhandled. Because of this Unhandled IRQ, error hook is thrown.
We confirmed this by checking the interrupt source when it causes error hook. It is same as the interrupt source number of EMIOS_0_Channel_7.
We also tried with different priority and different EMIOS channels but the issue seems to be still same.
Below are the ICU and Port configurations implemented:
ICU EMIOS channel configuration:
Instance 0;
Channel 7;
Bus used is EMIOS_ICU_BUS_A
Sub measurement mode is SAIC
ICU Channel:
Measurement mode is SIGNAL EDGE DETECT with default start edge as BOTH EDGES
Signal notification function is configured and defined.
MCL EMIOS channel configuration for ICU:
Instance 0;
Channel 23;
Counter - MCB UP COUNTER;
Default Period - 65535
Port configuration for ICU:
PIN used - PTE7
Pcr number - 135
Pin mode - eMIOS_0eMIOS_0_CH_7_G_IN
Initial mode: GPIO Mode
OS Configuration for Interrupt trigger:
Vector Interrupt source number - 81
Handler Function - EMIOS0_4_IRQ (instance 0 with interrupt request 7)
Followed below sequence in Init Phase:
Icu_Init(NULL_PTR);
Icu_EnableEdgeDetection(Icu_Channel);
Icu_EnableNotification(Icu_Channel);
Attached snapshots of configurations for reference.
Please let me know if you need additional information.
@sathyaganesr @WojciechK @Hector_Torre