Hi,
I am working on a project in which i need to send and receive LIN diagnostics message using apis.
I need an example code for the diagnostic communication.
location:
SDK>middleware>lin>transport>lin_commontl_api.c
Diagnostic request ID-3C
For example i need to send
7E 02 10 03 00 00 00 00
Diagnostic Response ID-3D
35 02 50 03 00 00 00 00
MCU-S32K116
Complier-IAR
Thanks & Regards
Pankaj prasad
Hi,
are you asking for master or slave demo code?
What is the driver (SDK, RTD) version you are using?
BR, Petr
Hi,
I need master code for sending and receiving message.
Driver-SDK 3.0 version
Thanks & Regards
Pankaj prasad
Hi,
see response I got from SW team...
Base on the information which our customer provided, I have some question as below:
For example i need to send
7E 02 10 03 00 00 00 00
[Diep] For my understand, the diagnostic request (3C) is sent with length = 0x02. So, the unused data should be 0xFF instead of 0x00.
35 02 50 03 00 00 00 00
[Diep] Because diagnostic request is sent with NAD = 0x7E(Functional NAD), the master node should not send diagnostic response header after that. Slave node only receive functional request and do not transmit the response. You can see image below or chapter 5.4, 5.5 of LIN_Specification_Package_2.2A to more detail.
Please help me to confirm with our customer.
BR, Petr
Hi,
Apologies for the late reply
Question-1
Base on the information which our customer provided, I have some question as below:
For example i need to send
7E 02 10 03 00 00 00 00
[Diep] For my understand, the diagnostic request (3C) is sent with length = 0x02. So, the unused data should be 0xFF instead of 0x00.
Ans- Yes unused data will be 0XFF.
Question-2
35 02 50 03 00 00 00 00
[Diep] Because diagnostic request is sent with NAD = 0x7E(Functional NAD), the master node should not send diagnostic response header after that. Slave node only receive functional request and do not transmit the response. You can see image below or chapter 5.4, 5.5 of LIN_Specification_Package_2.2A to more detail.
Ans:- Usually in diagnostics we send the Master Req and also we send the diagnostics response header from the master where slave just update the buffer with the data.
For reference I need some code like this- Solved: S32K SDK LIN Stack not working properly with UDS - NXP Community
Above link is for slave but we need master.
Thanks & Regards
Pankaj prasad