How to use EIM on K344

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

How to use EIM on K344

ソリューションへジャンプ
2,712件の閲覧回数
Sylvia_jiang
Contributor IV

SPD 1.0.1 has been setup successfully in S32DS 3.5. I tried to add some codes of EIM in example code SPD_101_S32K344 as below :

Main()

{

        eMcem_Init(&eMcem_Config_0);

        Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);

        eMcem_SetupInjectionChannel(EMCEM_EIM_CH_0, 0, 1);

        eMcem_InjectFault(EMCEM_EIM_CH_0);

        for(;;)
        {
              if(exit_code != 0)
             {
                    break;
             }
        }
        return exit_code;

}

Errors happened in debugging code "pEim->EICHD[u16EimChannel].WORD[0] = channelCfg.EICHD_WORD[0];" of Function eMcem_Eim_SetupInjectionChannel (), and jump to

void HardFault_Handler(void)

{

          while(TRUE) {};

}

 

タグ(1)
0 件の賞賛
返信
1 解決策
2,613件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Sylvia_jiang,

I just sent you another project with the functionality that you are looking for.

The project is officially available at the SafeAssure NDA community:

https://community.nxp.com/t5/SafeAssure-NDA-group/S32K344-Example-for-EIM-and-ERM-module/m-p/1458016

 

https://community.nxp.com/groups/safeassure-nda

REQUESTING ACCESS for SafeAssure NDA group: to get safety documents and receive expert support

https://community.nxp.com/docs/DOC-335524

 

BR, Daniel

 

元の投稿で解決策を見る

0 件の賞賛
返信
10 返答(返信)
2,601件の閲覧回数
Sylvia_jiang
Contributor IV

Hi Daniel,

     I wonder if hardfault occurs with other debugger. but I don't have any other debugger except Multilink. Would you mind testing my own project?

Looking forward to your reply

BR,

Sylvia.

0 件の賞賛
返信
2,603件の閲覧回数
Sylvia_jiang
Contributor IV

hi Daniel,

    I really appreciate for your reply! I have requested SafeAssure NDA community and been waiting for reply. In private message you say "I just tested the eMcem_SetupInjectionChannel() using PE Micro Multilink and I get a hardfault. But not with Lauterbach / Segger J-Trace. I understand you use PE Micro too. Do you have any other debugger?". I don't have any other debugger.  when I test it at removing PE Micro Multilink and let it free run hardfault recurs. I think hardfault  that caused by eMcem_SetupInjectionChannel() has nothing to do with debugger.

0 件の賞賛
返信
2,594件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi Sylvia,

I sent you the example in a private message.

Can you test it?

Regarding the debugger, it was probably an issue on my side,

 

Regards,

Daniel

0 件の賞賛
返信
2,558件の閲覧回数
Sylvia_jiang
Contributor IV

hi Daniel,

     The second project hasn't been built successfully. I haven't know these module and disable them. Have those disabled modules influenced on EIM running ?

Sylvia_jiang_0-1679017588040.png

 

0 件の賞賛
返信
2,544件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Sylvia_jiang,

As far as I know, these modules should not impact the EIM.

Once you have access to the SafeAssure NDA community, I would recommend posting any safety related questions there. Also, you can follow-up in the thread of the example.

Thank you,

 

Regards,

Daniel

0 件の賞賛
返信
2,481件の閲覧回数
Sylvia_jiang
Contributor IV

Hi Daniel

     I really appreciate for your help ! I am tring to debug it.

 

BR,

Sylvia

0 件の賞賛
返信
2,693件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Sylvia_jiang,

I just sent you an example,

 

BR, Daniel

0 件の賞賛
返信
2,672件の閲覧回数
Sylvia_jiang
Contributor IV

Hi Daniel,

     Thanks for your code and i really appreciate it ! Could I ask you about something?

Q1: eMcem_SetupInjectionChannel is not called. Is it not necessarry for eMcem_InjectFault ?

Q2: FCCU 0 pin output is high level and FCCU 1 is low level after eMcem_Init and they keep the same level after inject Fault 15. Is it the correct reaction?

Q3: Alarm Handler of Fault 15 is defined as eMcemUserAlarmHandler. How can I trigger this handler?

Looking forward to your updates!

0 件の賞賛
返信
2,633件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Sylvia_jiang,

Yes, according to S32K_SPD_EMCEM_UM,

danielmartynek_0-1678455594570.png

 

I will need to test it on my side.

 

Regards,

Daniel

 

 

 

 

 

0 件の賞賛
返信
2,614件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Sylvia_jiang,

I just sent you another project with the functionality that you are looking for.

The project is officially available at the SafeAssure NDA community:

https://community.nxp.com/t5/SafeAssure-NDA-group/S32K344-Example-for-EIM-and-ERM-module/m-p/1458016

 

https://community.nxp.com/groups/safeassure-nda

REQUESTING ACCESS for SafeAssure NDA group: to get safety documents and receive expert support

https://community.nxp.com/docs/DOC-335524

 

BR, Daniel

 

0 件の賞賛
返信