CAN/LIN not waking up after sleep

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN/LIN not waking up after sleep

2,025 Views
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

Tags (4)
0 Kudos
Reply
5 Replies

1,777 Views
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 Kudos
Reply

1,764 Views
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 Kudos
Reply

2,009 Views
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,990 Views
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,999 Views
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 Kudos
Reply