CAN/LIN not waking up after sleep

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

CAN/LIN not waking up after sleep

2,023 次查看
nidhin521
Contributor II

Hi,

I am using Model based design toolset to implement CAN and LIN communication for a pump control software. I have an issue with CAN/LIN not waking up after it goes to sleep(Essentially I disconnect the CAN/LIN cables and plug it back in but the communication doesn't resume). Is there any way I can fix this issue?. Is there any way I can force wake up CAN/LIN using Model based design toolset

Thanks in advance

标记 (4)
0 项奖励
回复
5 回复数

1,775 次查看
saranya_chitta
Contributor III

Hello @nidhin521 

Were you able to figure out a way to restore the communication without having to reset the board?

0 项奖励
回复

1,762 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello @saranya_chitta,

As @nidhin521 said, one way is to reinitialize the LIN, using custom code. But I think that trying to use the SDK function "LIN_DRV_AbortTransferData" would also work, using custom code.

Hope this helps,

Marius

0 项奖励
回复

2,007 次查看
mariuslucianand
NXP Employee
NXP Employee

Hello @nidhin521 ,

What low power mode are you using? IS the mcu refuses to wake up or the mcu wakes up but the communication is not working?

Also, please have look at this thread. We have a great discussion here regarding the low power modes.

https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-put-S32K-MCU-into-sleep-low-power-m...

Hope this helps,

Marius

 

1,988 次查看
nidhin521
Contributor II

Hi @mariuslucianand ,

I went through the link you mentioned and figured out a way to reinitialize the LIN using LIN_DRV_Init(....)  function in System Outputs block. Working on reinitializing CAN the same way.

Thanks 

1,997 次查看
nidhin521
Contributor II

Hi @mariuslucianand ,

Thanks for the quick response.

I haven't configured any power mode using MBDT. I am using S32K118 powered by external 12V. The board does both CAN and LIN communication. If I pull out the LIN cable, the CAN works fine, so I don't think the board is going into low power mode. Its just that the LIN doesnt work even on reconnecting the cable, until I reset the board. Same thing with CAN. if I pull out the CAN cable, LIN continues to work but CAN wont work even on reconnecting the cable until a board reset.

Is there any way I can reinitialize the CAN and LIN using MBDT or custom C code to restore the communication without resetting the board? 

0 项奖励
回复