In my application, there is a requirement from our internal customer about diagnosis. After discussion a bit, We defined up to 20 Diagnosis cases which we will want to send to the target vehicle if required. But so far, We have never worked on diagnosis.
I know there are some standards such as OBD or UDS but I could not find any paper about how diagnosis is managed in CAN.
What I understand about the Diagnostic System in Autosar is that if an error case occurs, ECU will store it to a specific address with specific ID. Then, If a diagnostic session start request comes from CAN, ECU will allow to read diagnostic memory somehow.
Do these session requests only come from Diagnosis Tools ? If my ECU is broken, how could I inform the BUS ? If a bus is able to start a diagnostic session, does this happen periodically ? Are there any ways to handle this in a more simple way without touching UDS ?
Giving a basic training on diagnostic protocols, vehicle diagnostics and the AUTOSAR diagnostic stack in stack overflow is not realistic, but more a topic for a few weeks of coaching.
However, this is the short version:
In an AUTOSAR application you would do the following: