1 Reply Latest reply on Dec 17, 2019 12:02 AM by BragadeeshV_41

    How to use PID 0x3C and 0x3D on LIN component




      I was wondering if it is possible to configure the Default ID settings for a LIN Slave 4.0 component on the PSoC 5LP to receive frames with PID 0x3C and 0x3D. The datasheet seems to indicate that this isn't possible, but I just wanted to confirm.




        • 1. Re: How to use PID 0x3C and 0x3D on LIN component

          Hi DaCh_4605951,


          As per LIN protocol spec, the PIDs 0x3C and 0x3D are used as diagnostic frames. They can not be used as unconditional frames.

          To use 0x3c and 0x3d, enable the Use Transport layer option in LIN Component configuration (right-click LIN Component and select Configure. In the Configure ‘LIN’ window, go to the Transport Layer tab). The Component handles these IDs in the LIN source code. (See LIN.c). However, you can monitor the the service field of the LIN diagnostic frame and create your own service handling function.

          For instance, if you want to handle 0xB1, then you can use the following code snippet to handle the service:

          /* If there is a data in the MRF then proceed frame receiving. */

          if((ld_raw_rx_status(LINS_IFC_HANDLE) == LD_DATA_AVAILABLE))

          {          /* Receive the data into a rxBuffer[] */

                      ld_get_raw(LINS_IFC_HANDLE, rxBuffer);


          if(rxBuffer[2] == 0xB1)


            //Handle the service