eMcem_Eim_SetupInjectionChannel return fail

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

eMcem_Eim_SetupInjectionChannel return fail

跳至解决方案
614 次查看
Sylvia_jiang
Contributor IV

Hi Nxp Community,

       I am thankful for having a chance to consult about something. I am stuck in EIM because api eMcem_Eim_SetupInjectionChannel that is necessary to inject faults always return fail. Access to pEim->EICHD[u16EimChannel].WORD[0] (address is 0x40258100) causes to BusFault_Handler(). Is there any solution? looking forward to your reply.

Sylvia_jiang_0-1680162281247.png

main() is as belows:

Sylvia_jiang_1-1680162752564.png

BR,

Sylvia

 

标记 (4)
0 项奖励
回复
1 解答
561 次查看
frantisekdobes
NXP Employee
NXP Employee

Hello Sylvia,

by default the clock for EIM module is disabled so when trying to access EIM registers a bus fault is generated. In order to enable clocks for EIM module, there can be used Power_Ip driver.

 

In the configuration it is needed to add POWER module:

frantisekdobes_0-1681296813075.png

 

Then in configuration of POWER module enable clock for EIM:

frantisekdobes_1-1681296855341.png

And then in main function call Power_Ip_SetMode API to enable the EIM clock:
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[0]);

Best Regards,
Frantisek

 

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
562 次查看
frantisekdobes
NXP Employee
NXP Employee

Hello Sylvia,

by default the clock for EIM module is disabled so when trying to access EIM registers a bus fault is generated. In order to enable clocks for EIM module, there can be used Power_Ip driver.

 

In the configuration it is needed to add POWER module:

frantisekdobes_0-1681296813075.png

 

Then in configuration of POWER module enable clock for EIM:

frantisekdobes_1-1681296855341.png

And then in main function call Power_Ip_SetMode API to enable the EIM clock:
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[0]);

Best Regards,
Frantisek

 

 

0 项奖励
回复