S32K142 LIN Setup

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

S32K142 LIN Setup

跳至解决方案
1,601 次查看
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 项奖励
回复
1 解答
1,580 次查看
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

在原帖中查看解决方案

2 回复数
1,574 次查看
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 项奖励
回复
1,581 次查看
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