S32G- S32K3 CAN communication setup

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

S32G- S32K3 CAN communication setup

1,203 Views
abhishek_kachhwal
NXP Employee
NXP Employee

I am trying to setup CAN communication between S32G and S32K344 devices. 
I am using

Goldbox with s32g274a

GoldVIP  v 1.3.0 using linux bsp binaries

I want to use FlexCAN0 port on S32G for  Tx and Rx

On S32K344 I am using RTD 2.0.0 and CanTRCV 0.8.0 packages

I am using CANFD with controller baud rate 500 Kbps and CANFD data baud rate 2000 Kbps in polling mode. 

I have tested the S32K3 SW stack to communicate between 2 nodes of my S32K3 board which tells me that setup on S32K3 is ready to tx and rx messages. 

Communication setup :: Tx and Rx between FlexCAN0 (S32G)    <---> FlexCan0 (S32K3)

I have found a file in GoldVip sw named canperf.sh in cangw directory which contains the commands to trigger a tx and rx on s32G. default communication in example sets up a commuication between can0 and can1 of the s32G. 

 

command example: ./canperf.sh -t can0 -r can1 -i 0 -o 4 -s 64 -g 0 -l 10

Questions: 

1.) How do I define a Tx and Tx node of S32K3 in above command on the options -t, -r , -i,-o 

for example: if I am Txing from S32K3 and Rxing on S32G can0

then I can set 

-t    ??  (what would be name of an external node  Txing the message)

-r  can0   // want to receive data on s32G CAN0

 -i  16  // indicate the id of Tx on s32G . Its same for  Rx message from s32k3 

-o 17 // to indicate the id of Rx messages on s32G . its same for  Tx from S32k3

 

2.) How do I run a preconfigured command sequence/script (like a c code) in the s32G which contains the code and configuration to transmit data to s32K3 and receive data from s32K continuously without need of issuing commands and run after boot .

 

0 Kudos
Reply
1 Reply

1,093 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @abhishek_kachhwal ,

Hope you are well.

 

Please find my answers below:

1) you can use the -t option for the CAN Transmit interface. Once, the CAN interface is up and running you can see it in ifconfig.

same as you can track and use the Rx interface with the S32K board.

2) for automatically running the script at startup after booting Linux you can use crontab or put the script in etc/init.d/ folder.

Please let me know if anything is missing in the answer.

 

Thanks,

Mayank s Patel

0 Kudos
Reply