Unhandled IRQ error for ICU interrupt source

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

Unhandled IRQ error for ICU interrupt source

5,392件の閲覧回数
Sathishkumar_Rajkumar
Contributor I

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 

0 件の賞賛
返信
11 返答(返信)

3,417件の閲覧回数
Hemant_Rawat
Contributor I

I am facing the Similar issue Did anyone manage to have a solution.

0 件の賞賛
返信

5,362件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Sathishkumar_Rajkumar,

Can you share the project?

Have you enabled the interrupt in the code?

 

BR, Daniel

0 件の賞賛
返信

5,356件の閲覧回数
Sathishkumar_Rajkumar
Contributor I

Hello @danielmartynek 

I am using EMIOS instance 0 and Channel 7 in ICU module and
configured EMIOS instance 0 and channel 23 in MCL module for ICU EMIOS BUS REF.

Also I am using Port Pin PTE7 (PCR:135, PIN Mode: eMIOS_0eMIOS_0_CH_7_G_IN)

Could you please tell me which Interrupt Source /Interrupt handler function should be configured for the above channel configurations. Because it is not clear which one should be used. 

0 件の賞賛
返信

5,351件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

The ICU channel, that is EMIOS_0_Ch7.

danielmartynek_0-1659355387981.png

extern ISR(EMIOS0_4_IRQ);

IntCtrl_Ip_InstallHandler(EMIOS0_4_IRQn, &EMIOS0_4_IRQ, NULL_PTR);
IntCtrl_Ip_EnableIrq(EMIOS0_4_IRQn);

Emios_Icu_Ip_EnableInterrupt(0, 7);

 

BR, Daniel

 

 

0 件の賞賛
返信

5,344件の閲覧回数
Sathishkumar_Rajkumar
Contributor I

Yeah, we have also configured the same IRQ Handler (EMIOS0_4_IRQ). 

I am calling Icu_EnableEdgeDetection interface at Init phase which in turn calls Emios_Icu_Ip_EnableInterrupt. So, I hope this should be fine to enable the interrupt. 

Also instead of Platform module interfaces like InstallHandler and EnableIrq, we have configured interrupt in OS (Category 2 ISR) which will take care of triggering the interrupt. 

And the thing is, interrupt is getting triggered, when input is fed to the ICU pin, but it is left unhandled. Which means interrupt request is not assigned to the corresponding ISR. So, we are not sure whether the interrupt handler function (EMIOS0_4_IRQ) from MCL is mapped  properly to the Interrupt source.

Is there any other specific configuration to be enabled for mapping IRQ with interrupt ?


0 件の賞賛
返信

5,328件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Sathishkumar_Rajkumar,

Hard to say, it would be better if I could test your project (or at least a simplified version of it) on my side.
You can refer to this example though:

https://community.nxp.com/t5/S32K-Knowledge-Base/S32K344-Example-Ocu-Overflow-Icu-Edge-S32DS34-RTD20...

 

BR, Daniel

0 件の賞賛
返信

5,326件の閲覧回数
Sathishkumar_Rajkumar
Contributor I

Hello @danielmartynek 

Due to company policy it is tough to share the project.

It would be really helpful if you could join a debug session. 

Please let me know your calendar to schedule the session. 

 

Regards,

Sathish

0 件の賞賛
返信

5,312件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Sathishkumar_Rajkumar,

Our technical support does not provide debug sessions.

You can create a ticket and share the project there privately.

It does not have to be the whole project but a test project that replicates the issue.

 

BR, Daniel

0 件の賞賛
返信

5,309件の閲覧回数
Sathishkumar_Rajkumar
Contributor I

Hi @danielmartynek 

Could you please share the steps to create ticket.

0 件の賞賛
返信

5,301件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

@Sathishkumar_Rajkumar,

Go to nxp.com and login,

you should see Support Tickets as below.

danielmartynek_0-1659451892567.png

 

Thank you,

BR, Daniel

 

0 件の賞賛
返信

5,136件の閲覧回数
JAY_SUN1
Contributor II

Hi Daniel,

We have the same issue as below link and we already attached our project in the post, please help to check it. Thanks a lot.

https://community.nxp.com/t5/S32K/S32K344-MCAL-IPWM-ICU-CAPTURE/m-p/1543046#M18511

 

Wade

0 件の賞賛
返信