S32K142 LIN Setup

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

S32K142 LIN Setup

Jump to solution
1,188 Views
itsnewforme
Contributor IV

I want to setup Canoe as LIN master node and S32k142 as LIN slave node using the code lin_slave_baremetal_s32k142. 

How do I setup this ?

0 Kudos
1 Solution
1,167 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

master example works in following way

- Press BUTTON 0 (SW2):
- For the first time, Master node sends FRAME_MASTER_RECEIVE_DATA header (ID=2) and require slave node responds by sending data (txBuff2={0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11}).
- For the second time, Master sends FRAME_SLAVE_RECEIVE_DATA header (ID=1), then continue sending data (txBuff1={0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}) and slave node will receive the data.
- If node successful receives data, this node will turn on GREEN_LED, otherwise turn on RED_LED.
- Press BUTTON 1 (SW3):
- Master node will check current node state. If the state is LIN_NODE_STATE_SLEEP_MODE, Master node will send wakeup signal and BLUE_LED will be turned on both nodes, otherwise Master node will send header (PID=3) to set Master node and Slave node to sleep mode and all LED will be turned off both nodes.

So set Canoe in similar way.
I used this config in PLIN View, I have

PetrS_0-1655975811486.png

BR, Petr

View solution in original post

2 Replies
1,161 Views
itsnewforme
Contributor IV

Hii Thank you Petr. In CANoe I used IG block to transmit Header with ID 1 and ID 2. but in Trace window its showing 01(PID : C1) and 02(PID : 42)

Is there any calculation method for PID ?

0 Kudos
1,168 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

master example works in following way

- Press BUTTON 0 (SW2):
- For the first time, Master node sends FRAME_MASTER_RECEIVE_DATA header (ID=2) and require slave node responds by sending data (txBuff2={0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11}).
- For the second time, Master sends FRAME_SLAVE_RECEIVE_DATA header (ID=1), then continue sending data (txBuff1={0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}) and slave node will receive the data.
- If node successful receives data, this node will turn on GREEN_LED, otherwise turn on RED_LED.
- Press BUTTON 1 (SW3):
- Master node will check current node state. If the state is LIN_NODE_STATE_SLEEP_MODE, Master node will send wakeup signal and BLUE_LED will be turned on both nodes, otherwise Master node will send header (PID=3) to set Master node and Slave node to sleep mode and all LED will be turned off both nodes.

So set Canoe in similar way.
I used this config in PLIN View, I have

PetrS_0-1655975811486.png

BR, Petr