How to use ld_receive_message() ?

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

How to use ld_receive_message() ?

881 Views
pankajprasad100
Contributor III

Hi,

I am working on a project where there are two ECUS master and slave.

I have implemented a code where I send the Lin-Diagnostics request 3C and the slave is responding by sending the positive response which can be seen on the LIN bus.

But while using the  ld_receive_message()  function, I am not getting the values which are seen on the LIN bus.

pankajprasad100_0-1643963481425.png

pankajprasad100_1-1643963525314.pngpankajprasad100_2-1643964052448.png

 

0 Kudos
3 Replies

840 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @pankajprasad100,

I would like to share with you an example project (Attach) about to use the ld_receive_message():

  • Hardware: S32K118
  • SDK release version:  S32SDK_S32K1xx_RTM_3.0.0
  • PEx: S32 Design Studio v2.2

 

The Master node send a UDS frame with NAD = 0x02, PCI = 0x06, SID = 0x23, data = {0x03, 0x04, 0x05, 0x06, 0x07}

The Slave node use ld_receive_message() function to receive request message and then responded with PSID = 0x63 (Value = SID + 0x40).

 

namnguyenviet_0-1645701548612.png

Hope it helps.

Best Regards,

Nam

0 Kudos

822 Views
pankajprasad100
Contributor III

Hello @namnguyenviet 

 

I have used the  ld_receive_message() function and its working, but when I use to take the seed given by the slave the length buffer is updating but the data buffer is not updating. I can see the seed on the LIN bus but not in the buffer.

Is there anything i need to do to obtain the data?

 

 

MCU-S32K116

COMPILER-1AR

LIN ANALYZER-CANOe

0 Kudos

816 Views
namnguyenviet
NXP Employee
NXP Employee

Hello,

Did you try out with the example I shared with you?

Best Regards,

Nam

0 Kudos