S32k144evb matlab example for LIN master send and receive

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

S32k144evb matlab example for LIN master send and receive

1,125 Views
sagar_salunkhe
Contributor II

I am using s32k144evb board in Matlab environment.

I have tried LIN master -slave existing example in Matlab . But I am unable to send  data from slave and unable to receive data on master.

Do you have any example in Matlab for sending and receiving data from master and sending and receiving data on slave. Please provide any example with master transmitting,receiving and slave transmitting receiving with PID /ID etc as per standard. I tried it many ways in Matlab LIN blocks but no success.

I also found that CRC which is generated is not correct. when I observed master transmitted  data on CANoe it is showing invalid checksum

0 Kudos
Reply
2 Replies

992 Views
constantinrazva
NXP Employee
NXP Employee

Hello sagar.salunkhe@faurecia.com,

Sorry for the late reply, your question was opened on another subcommunity of ours, and we did not receive notifications.

Did you try the example that comes with our toolbox? (lin_master_s32k14x.mdl + lin_slave_s32k14x.mdl)

These applications form a simple example where the master sends the header with ID=1 (while PID is automatically calculated). Once this is sent, a callback is triggered where the master sends 6B of data (including information about event, frame id + some constant values). You should see the red LED being toggled every time the master sends data. There is also a FreeMASTER project asociated with the slave model where you can check the data received by the slave.

Note that you should have external power as VBAT is connected to VSUP. Also, you should connect the ground of both EVBs + the LIN signal [J11.1].

Please let me know if this basic example/setup is working on your end or if you have issues.

Kind regards,

Razvan.

0 Kudos
Reply

991 Views
constantinrazva
NXP Employee
NXP Employee

Hello sagar.salunkhe@faurecia.com ,

 

So both the data and PID are sent correctly? Only the CRC is invalid?

 

Unfortunately due to the context we’re in, for the time being I am working from home and do not have a LIN analyzer with me, so I am unable to check this issue right away. I’ll get back to you on this topic once I get hold of one. Sorry for the inconvenience.

 

Kind regards,

Razvan.

0 Kudos
Reply