NXP S32K144 EVB LIN Communication Question

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

NXP S32K144 EVB LIN Communication Question

Jump to solution
2,033 Views
saranya_chitta
Contributor III

I've followed the LIN Master and Slave examples for the NXP S32K144 EVB, connected the wires according to the description in the examples. The communication is all good between Master and Slave.
But, when I disconnect a LIN wire and plug it back in, the communication stops completely. Is there a way to restore the communication back again without manual power reset?

0 Kudos
1 Solution
1,991 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @saranya_chitta ,

MBDT generates code on top of the S32SDK for S32K. There are a couple of C functions that can be used besides or block, solving some issues like the ones you see with your board. 

For example you can get the LIN state using the following function 

lin_node_state_t LIN_DRV_GetCurrentNodeState(uint32_t instance)

and also, you can abort a transfer (which works for the CAN, see below) using the following function:

status_t LIN_DRV_AbortTransferData(uint32_t instance).

Please give this a try and let me know if worked.

A similar discussion we had previously on CAN, please have a look at the link below. This might be a good tutorial for getting the same results on LIN.https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Reset-CAN-Bus-Silence/m-p/1190321 

Hope this helps,

Marius

View solution in original post

0 Kudos
5 Replies
1,962 Views
ruihang_wu
Contributor III

ruihang_wu_0-1630426804475.png

I set the data store class as volatile

Thank you @mariuslucianand 

I looked at the other thread and implemented something similar. This worked around our issue with LIN communication.

 

0 Kudos
1,987 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

this is a feedback from SDK team I got...

"I have checked customer issue on my site(Release SDK_RTM_4.0.1). I have tried to disconnect and reconnect between Master and Slave. However,  it seem that the communication is still normal.

See the description document of the example:
- If value of temperature signal is higher than MOTOR1_OVER_TEMP value, Master SeatECU will send STOP command through Motor1Selection signal to stop motor and turn on RED_LED.
- If value of temperature signal is in range from MOTOR1_MAX_TEMP value to MOTOR1_OVER_TEMP value, master SeatECU will send DECREASE MOTOR SPEED command through Motor1Selection signal to reduce motor speed and turn on BLUE_LED.
- If value of temperature signal is lower than MOTOR1_MAX_TEMP value, master will send INCREASE MOTOR SPEED command through Motor1Selection signal to increase motor speed and turn on GREEN_LED.

From my point of view, maybe the Master and Slave have worked on STOP case when they reconnected. And then, Slave and Master will always turn on RED_LED.

So for clarification, please provide some information as below:

  • The SDK release version which you are running.
  • The boards status when you reconnect."

 

BR, Petr

0 Kudos
2,007 Views
saranya_chitta
Contributor III

Hello @mariuslucianand 

 

I've followed the LIN Master and Slave examples for the NXP S32K144 EVB, connected both the EVBs according to the description in the examples. The communication is all good between Master and Slave.
But, when I disconnect a LIN wire and plug it back in, the communication stops completely. Is there a way to restore the communication back again without manual power reset?
Also, I was able to see some signals on the Freemaster - lin rx busy, lin bus busy, lin tx busy etc., Is there any way to access and play with these signals on Simulink?

Thank you for your help!

0 Kudos
1,992 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @saranya_chitta ,

MBDT generates code on top of the S32SDK for S32K. There are a couple of C functions that can be used besides or block, solving some issues like the ones you see with your board. 

For example you can get the LIN state using the following function 

lin_node_state_t LIN_DRV_GetCurrentNodeState(uint32_t instance)

and also, you can abort a transfer (which works for the CAN, see below) using the following function:

status_t LIN_DRV_AbortTransferData(uint32_t instance).

Please give this a try and let me know if worked.

A similar discussion we had previously on CAN, please have a look at the link below. This might be a good tutorial for getting the same results on LIN.https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/Reset-CAN-Bus-Silence/m-p/1190321 

Hope this helps,

Marius

0 Kudos
1,951 Views
saranya_chitta
Contributor III

Thank you @mariuslucianand

I've tried to replicate the same as you mentioned by following the URL you've shared and I see the communication is restored now without a power reset (when I intentionally pull the LIN wire and plug it back in). The attached example in the other thread was helpful.

Appreciate your help!

0 Kudos