AUTOSAR Diagnostic
description
Transcript of AUTOSAR Diagnostic
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 1/28
AUTOSAR Diagnostic Overview
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 2/28
Diagnostic serviceinformation exchange initiated by a client in order to require diagnosticinformation from a server and/or to modify its behavior for diagnosticuroses
Server
function that is art of an electronic control unit and that rovides thediagnostic services
Tester
system that controls functions such as test! insection! monitoring ordiagnosis of an on"vehicle electronic control unit and which may be
dedicated to a seci#c tye of oerator $e%g% a scan tool dedicated togarage mechanics or a test tool dedicated to assembly lant agents&
Diagnostic data
data that is located in the memory of an electronic control unit which maybe insected and/or ossibly modi#ed by the tester $diagnostic dataincludes analogue inuts and oututs! digital inuts and oututs!intermediate values and various status information&
Terms and Defnitions
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 3/28
Architecture – Contents o Sotware Layer
• The Debugging module suortsdebugging of the AUTOSAR (S)% *t
interfaces to '+U internal modulesand to an external host system viacommunication %
• The Diagnostic Event Manageris resonsible for rocessing andstoring diagnostic events $errors&and associated ,ree-e,rame data%
• The module Diagnostic Log andTrace suorts logging and tracingof alications% *t collects userde#ned log messages and convertsthem into a standardi-ed format%
• The Diagnostic Communication
Manager rovides a common A.*for diagnostic services
• The Function nhibitionManager is resonsible forroviding a control mechanism forsoftware comonents and the
functionality• The !etwor" #ayer art of
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 4/28
$hy DCM%
The functionality of the D+2 module is used by externaldiagnostic tools during the develoment! manufacturing orservice
The D+2 module ensures diagnostic data 3ow and managesthe diagnostic states! esecially diagnostic sessions andsecurity states
The D+2 module checs if the diagnostic service request is
suorted and if the service may be executed in the currentsession according to the diagnostic states%
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 5/28
&verview o the communication between the e'terna#diagnostic too#s and the onboard A(T&SA) A**#ication
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 6/28
DCM &verview with A(T&SA)
*n the AUTOSAR architecture! the Diagnostic +ommunication
2anager module is located in a 4+ommunication services5$Service 1ayer&%
The Dcm *nterfaces with communication modules to transferinformation from an '+U to an o6"board Tester and vice"
versa%
UDS Service
This refers to a UDS Service as de#ned in *SO7899:"7
0ote; All UDS Service de#ned in *SO7899:"7 is not
suorted by the Dcm module
O(D Service
This refers to an O(D Service as de#ned in *SO7<=>7"<
0ote; All UDS O(D Service as de#ned in *SO7<=>7"< is
not suorted by the Dcm module
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 7/28
The functionality of Dcm module is used by externaldiagnostic tools e%g% in the develoment! manufacturing orservice
Diagnostic services include functions such as test!insection! monitoring or diagnosis of on"board vehicleservers $'+U&%
The information transferred might consist of '+U faultinformation! arameter reorting! control routines!calibration values and other tyes of data used in erforming'+U diagnostics%
The Dcm module is networ indeendent% All the networ
seci#c functionality $the Seci#cs of networs lie +A0! 1*0!,lexRay or 2OST& is handled outside of the Dcm%
The .DU Router $.duR& module rovides a networ"indeendent interface to the D+2 module%
The Dcm requests data or functional state from S)"+s via
ort interfaces or from other (S) modules through directfunction calls if any of the data elements or functional states
Diagnostics CommunicationManager
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 8/28
The DS. rovides the following diagnostic UDS services;o DiagnosticSession+ontrol $=x7=&
o '+UReset $=x77&o SecurityAccess $=x9?&o +ommunication+ontrol$=x9@&o Tester.resent $=x>'&o +ontrolDT+Setting $=x@<&o ResonseOn'vent $=x@&o 1in+ontrol $=x@?&o ReadData(y*denti#er $=x99&o Read2emory(yAddress $=x9>&o ReadScalingData(y*denti#er $=x98&o ReadData(y.eriodic*denti#er $=x9A&o DynamicallyDe#neData*denti#er $=x9+&o )riteData(y*denti#er $=x9'&o
+learDiagnostic*nformation $=x78&o ReadDT+*nformation $=x7:&o *nutOutut+ontrol(y*denti#er $=x9,&o Routine+ontrol $=x>7&o RequestDownload $=x>8 hex&o RequestUload $=x><&o TransferData $=x> hex&o RequestTransfer'xit $=x>?&
(nifed diagnostic services +(DS, – Su**orted+)-./.0,
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 9/28
&1D service su**orted – Su**orted +)-./.0,
The DS. rovides the following diagnostic O(D services;o Relevant O(D Service *denti#ero Request current owertrain diagnostic data $B=7&o Request current owertrain free-e frame data $B=9&
o Request con#rmed emission related DT+s $B=>&o +lear/Reset emission related diagnostic information $B=8&o Request monitoring test results for seci#c monitored
systems $B=&o Request ending emission related DT+s $B=?&o Request control of on"board system! test or comonent
$B=@&o Request vehicle information and *U2.R $B=:&o Request emission"related DT+s with ermanent status
$B=A&
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 10/28
The Diagnostic 'vent 2anager $Dem& handles and stores the
events detected by diagnostic monitors in both Software+omonents $S)"+s& and (asic software $(S)& modules
The stored event information is available via an interface toother (S) modules or S)"+s
The Dem module uses the 'vent*d to manage the status of
the CDiagnostic 'ventC of a system and erforms therequired actions for individual test results '%g% stores the free-e frame$*f quali#ed as ,ailed& The Dem module shall reresent each Diagnostic 'vent by
an 'vent*d and the related 'vent0ame% All monitors and (S) modules use the 'vent*d as a symbolic
'vent0ame% The 'vent*d and the related 'vent0ame shall be unique er
Dem module reresented by the '+U con#guration
Diagnostics Event Manager
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 11/28
'ach alication software comonent $S)"+& can reort errors to the Dlt
+ollects log messages and converts them into a standardi-ed format% The
Dlt forwards the data to the Dcm or a +DD which uses a serial interface forexamle
1ogging
logging of errors! warnings and info messages from AUTOSAR S)"+s!roviding a standardi-ed AUTOSAR interface
gathering all log and trace messages from all AUTOSAR S)"+s in acentrali-ed AUTOSAR service comonent $Dlt& in the (S)
logging of messages from Det and
logging of messages from Dem
Tracing
RT' activities
+ontrol
individual log and trace messages can be enabled/disabled and
1og levels can be controlled individually by bac channel
eneric
Dlt is available during develoment and roduction hase
access over standard diagnosis or latform seci#c test interface isossible and
Diagnostic Log and Trace
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 12/28
Diagnostic Log and Trace
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 13/28
To suort a user $system integrator or (S) develoer& duringdeveloment! in case the basic software does not behave asexected
+ollects as much information as ossible about the runtimebehavior of the systems without halting the rocessor
Data is transmitted to an external host system via communication!to enable the user to identify the source of a roblem
An internal bu6er is rovided to decoule data collection from
data transmission 2ain tass of the Debugging 2odule are to
+ollect and store data for tracing uroses +ollect and immediately transmit data to host 2odify data in target memory on host request Transmit stored data to host Accet commands to change the behavior of the Debugging
2odule
Debugging Modu#e
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 14/28
Debugging Modu#e use cases Tracing .rinciles
Tracing means collecting information from running software% Toerform tracing! the software is not halted
Tracing of variables
+yclically
on event
Tracing of functions
*n order to imlement tracing of functions! the code has to beinstrumented with calls to +ollect ,unction Tracing *nformation$function entry& A.* when the function is entered and calls to +ollect,unction Tracing *nformation $function exit& A.* before leaving thefunction
Tracing of S)"+
The debugging module o6ers functions to the RT' to trace informationfrom the following RT' events
signal transmission
signal recetion
+O2 callbac
start runnable
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 15/28
AUTOSAR D'2 Overview
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 16/28
D'2 E Diagnostics 'vent 2anager
The service comonent Diagnostic 'vent 2anager $Dem& is
resonsible for rocessing and storing diagnostic events $errors&and its associated data
The Dem o6ers interfaces to the alication layer and to other(S) modules to mae the stored event information available
Dem rovides fault information to the Dcm
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 17/28
Diagnostics 'vent A CDiagnostic 'ventC de#nes the atomic unit that can be handled
by the Dem module
The status of a CDiagnostic 'ventC reresents the result of amonitor
The Dem receives the result of a monitor from S)"+ via the RT' orother (S) modules
The Dem module uses the 'vent*d to manage the status of theCDiagnostic 'ventC of a system and erforms the required actions
for individual test results
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 18/28
'lements of Diagnostics 'vent
Event *riority
*t is de#ned as a raning of events based uon level of
imortance *t is used to determine which fault entries may be removed
from the event memory in the case of the number of storedevents exceeds the maximum number of memory entries
A riority value of 7 is the highest riority% 1arger riority value
shall de#ne lower imortance
Event occurrence
The Dem module rovides an occurrence counter er eventmemory entry
The Dem module increments the occurrence counter by one ifthe related event is already stored in the event memory andthe UDS DT+ status bit = $Test,ailed& changes from = to 7
*f the con#guration arameterDemOccurrenceCounterProcessing $in container Demeneral&is D'2F.RO+'SSFO+++TRF+DT+! the Dem module only
increments the occurrence counter if the fault con#rmation hasbeen successfully #nished
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 19/28
Event "ind
There are two di6erent tyes of events;
– (S)"related events $reorted via +"A.* EDemFReort'rrorStatus&
– S)"+"related events $reorted via RT' oeration ESet'ventStatus&
Event signifcance
There are two di6erent signi#cance levels of events;
– G faultH; classi#es a failure! which relates to thecomonent/'+U itself $and requires for examle a
reair action& – G occurrenceH; classi#es an issue! which indicates
additional information concerning insuIcient systembehavior $and relates for examle to a condition out ofthe '+U5s control&
Event destination
The con#guration arameter DemEventDestination
'lements of Diagnostics 'vent
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 20/28
Diagostic monitor
Diagostic monitor
A diagnostic monitor is a routine entity determining the roerfunctionality of a comonent
The monitoring function identi#es a seci#c fault tye $e%g%short to ground! oen load! etc%& for a monitoring ath
A monitoring ath reresents the hysical system or a circuit!
that is being monitored $e%g% sensor inut&% 'ach monitoringath is associated to exactly one diagnostic event%
*f the monitor debounces on its own! the reorting A.* is calledonly after a quali#ed result $assed or failed& is available
*f the monitor uses Dem"internal debouncing mechanism! thereorting A.* is called whenever the code with the functional
chec is executed
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 21/28
DTC 2 DTC grou*s
Diagnostic troub#e code
There are two di6erent inds of DT+s; – non O(D"relevant DT+s $UDS DT+s&
– O(D"relevant DT+s
DTC grou*s
The following DT+ grous are rovided;• emission"related DT+ grou $otional! #xed value J
=x======&
• owertrain DT+ grou $otional! con#gurable value&
• chassis DT+ grou $otional! con#gurable value&
•
body DT+ grou $otional! con#gurable value&• networ communication DT+ grou $otional! con#gurable
value&
• further user"de#ned DT+ grous $otional! con#gurablevalue&
• 4all DT+s5 DT+ grou $mandatory! #xed value J =x,,,,,,&
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 22/28
&*eration cyc#e management
The Dem module uses di6erent oeration cycles
The cycles could either be rovided by other (S) modules andS)"+ or generated by the Dem module itself
'xamles of oeration cycles are;
• " driving cycle
• " engine warm u cycle
• " ignition on/o6 cycle
• " ower u/ower down cycle
• " oeration active/assive cycle
- accumulated oerating time
The oeration cycle management of the Dem module uses thereorted state $D'2F+K+1'FSTAT'FSTART /D'2F+K+1'FSTAT'F'0D& of the A.* Dem_SetOperationCycleState $refer to chater @%>%>%& to set the Dem seci#c oeration cyclestate $started / ended&
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 23/28
Event status management
The C'vent Status 2anagementC is the Dem5s ability to record andretain events! event status and associated data
The Dem module rovides the caability to reort the status of anevent through the A.* Dem_SetEventStatus allowing adiagnostic monitor to inform the Dem about the result of theinternal diagnostic test
The Dem module rovides the caability to reset the failed statusof an event without reorting a assed result through the A.*Dem_ResetEventStatus
The Dem module rovides the caability to retrieve the currentUDS DT+ status byte of a seci#c event through the A.*
Dem_GetEventStatus The Dem module rovides the current event failed status through
the A.* Dem_GetEventFailed
The Dem module rovides the current event tested status throughthe A.* Dem_GetEventTested
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 24/28
Status bit update *n case a quali#ed diagnostic event $assed / failed& is reorted to the
Dem module! the Dem erforms the event status transition
immediately for the bits being relevant for fault reactions• (it = Test,ailed• (it 7 Test,ailedThisOeration+ycle• (it 8 Test0ot+omletedSince1ast+lear• (it < Test,ailedSince1ast+lear• (it Test0ot+omletedThisOeration+ycle
Notifcation o status bit changes The Dem module triggers the event"seci#c callbac"function
EvenStatusChanged on each event status change The con#guration container
DemCallbackEventStatusChanged is used to secify one ormore orts/c"callbacs er event
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 25/28
Debouncing o diagnostic events
*f the Dem module is con#gured to imlement the debounce algorithmfor a seci#c event! one of the following debounce algorithms are tobe erformed Dem"internally Counter based debounce algorithm Time based debounce algorithm Further specifc debounce algorithms
Monitor internal debounce algorithm
The Dem module suorts the event"seci#c con#guration ofdebounce algorithms by using the con#guration containerDemDebouncelgorithmClass
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 26/28
Counte based debounce algoithm
The Dem module calculates the fault detection counter $"79@ LM79?
according to UDS& based on the value and range of the internaldebounce counter to ma the internal counter values linearly to theexternal values
DemDebounceCounterFailedThreshold de#nes the event"seci#c limitindicating the failed status $active&
DemDebounceCounterPassedThreshold de#nes the event"seci#c
limit indicating the assed status $assive& The Dem module increments the internal debounce counter with its
con#gured ste"si-e $DemDebounceCounter!ncrementStepSi"e&! whenthe monitor reorts D'2F'N'0TFSTATUSF.R',A*1'D
The Dem module decrements the internal debounce counter with itscon#gured ste"si-e $DemDebounceCounterDecrementStepSi"e&!
when the monitor reorts D'2F'N'0TFSTATUSF.R'.ASS'D *f the monitor reorts D'2F'N'0TFSTATUSF,A*1'D! the Dem module
sets the internal debounce counter value to its con#gured thresholdbeing the failed criteria
*f the monitor reorts D'2F'N'0TFSTATUSF.ASS'D! the Dem modulesets the internal debounce counter value to its con#gured threshold
being the assed criteria
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 27/28
Counte based debounce algoithm contd!
The Dem module rovides the con#guration arameterDemDebounceCounter#umpDo$n for activating or deactivating the
um down behavior *f the um down behavior is active! the Dem module rovides the
con#guration arameter DemDebounceCounter#umpDo$n%alue
de#ning the new internal debounce counter init value if the countingdirection changes from incrementing to decrementing The Dem module rovides the con#guration arameter
DemDebounceCounter#ump&p for activating or deactivating the umu behavior
*f the um u behavior is active! the Dem module rovides the
con#guration arameter DemDebounceCounter#ump&p%alue de#ningthe new internal debounce counter init value if the counting directionchanges from decrementing to incrementing
7/21/2019 AUTOSAR Diagnostic
http://slidepdf.com/reader/full/autosar-diagnostic 28/28
Counte based debounce algoithm E"ample