Use the PLIN APIs to Reprogram an ECU with UDS based LIN Flash Boatloader

LIN Interface for USB
Locked
aismail
Posts: 5
Joined: Wed 25. Aug 2021, 12:40

Use the PLIN APIs to Reprogram an ECU with UDS based LIN Flash Boatloader

Post by aismail » Tue 16. Apr 2024, 12:25

Hi,

I'm willing to develop a UDS based flash application on LIN using the PLIN APIs as a first Application layer below a Transport layer that will be used to handle segmented data transfer and a UDS layer to construct diagnostic requests/responses.

For that purpose, i want to have some details and ideas about the requirements that i should consider when creating a PLIN Client and configuring the hardware as master or slave, shall i for example define a specific LIN frame entry (LIN table) to manage the communication between the diagnostic Application and the ECU for a UDS flash procedure ? shall i use a determined Schedule table also ? or anything else ...


Thanks in advance!

Ayoub

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: Use the PLIN APIs to Reprogram an ECU with UDS based LIN Flash Boatloader

Post by M.Maidhof » Tue 16. Apr 2024, 12:36

Hi,

in that case you only use diagnostic frames 0x3C/0x3D for communication. You must configure the PLIN-USB as a LIN master, 0x3C must be configured as publisher, 0x3D as subscriber, you could use a scheduler or write the frames through a timer, which will be most of the time the better and easier solution fro that task. All transport protocol related data must be handled by your own application. We don't have any UDS or ISOTP APIs available for LIN at the moment.

regards

Michael

aismail
Posts: 5
Joined: Wed 25. Aug 2021, 12:40

Re: Use the PLIN APIs to Reprogram an ECU with UDS based LIN Flash Boatloader

Post by aismail » Tue 16. Apr 2024, 17:03

Hi Michael,

Thank you for your immediate response and support,

As i understand, no diagnostic frame entry(frame table) is required when the PLIN-USB is configured as a LIN master, so i can use LIN_Write()/LIN_Read() directly ?

About the scheduler alternative that you have mentioned, is there some C++ samples on how to construct a Schedule Table and how the Scheduler processes and handle the slots in the table using the PLIN APIs ?

The other alternative, write the frames through a timer, is just by making the client application use the function LIN_Write that generates a Header on the bus and wait for a response from the slave with LIN_Read()?

Regards

Ayoub

M.Maidhof
Support
Support
Posts: 1751
Joined: Wed 22. Sep 2010, 14:00

Re: Use the PLIN APIs to Reprogram an ECU with UDS based LIN Flash Boatloader

Post by M.Maidhof » Tue 16. Apr 2024, 17:30

Hi,

yes, best solution for UDS diagnostic is to use LIN_Write and LIN_Read, because when using the scheduler, you don't know how much 3D subscriber are necessary for receiving the consecutive frames of a specific UDS request. In that case you will get the info with the first frame and you can exactly define how much 3D subscriber are needed.

regards

Michael

aismail
Posts: 5
Joined: Wed 25. Aug 2021, 12:40

Re: Use the PLIN APIs to Reprogram an ECU with UDS based LIN Flash Boatloader

Post by aismail » Tue 16. Apr 2024, 17:53

Hi,

Thank you very much for your support !

Best regards

Ayoub

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: Use the PLIN APIs to Reprogram an ECU with UDS based LIN Flash Boatloader

Post by M.Heidemann » Wed 17. Apr 2024, 09:14

If you have further questions, feel free to open another topic

Best Regards

Marvin

- Closed -
---
Marvin Heidemann
PEAK-Support Team

Locked