S32K142 LIN Setup

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,600件の閲覧回数
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,579件の閲覧回数
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,573件の閲覧回数
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,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