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) {};
}
Solved! Go to Solution.
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
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.
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
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 ?
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
Hi Daniel
I really appreciate for your help ! I am tring to debug it.
BR,
Sylvia
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!
Hello @Sylvia_jiang,
Yes, according to S32K_SPD_EMCEM_UM,
I will need to test it on my side.
Regards,
Daniel
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