`
Diagnostic Services List SID (Hex) 34 36 37 Service Name RequestDownload TransferData RequestTransferExit Support SPRS bit The negativeResponseCodes (NRC) used by ECU are defined as follows:
Tab 6. Negative Response Codes NRC(Hex) 11H 12H 13H 22H 24H 36H 31H 33H 37H 35H 72H 78H 7FH 92H/93H 7EH Description serviceNotSupported subFunctionNotSupported incorrectMessageLengthOrInvalidFormat conditionsNotCorrect requestSequenceError exceededNumberOfAttempts requestOutOfRange securityAccessDenied requiredTimeDelayNotExpired InvalidKey generalProgrammingFailure responsePending serviceNotSupportedInActiveSession VoltageTooHigh / voltageTooLow subFunctionNotSupportedInActiveSession
If two or more NRCs are reasonable, the ECU could send the negative response message according to the following priority rules:
? The 7Fh NRC have the highest priority;
? For others, the NRC with smaller number has higher priority.
4.2.2. DiagnosticSessionControl(10H)
This service is used by the client to enable different diagnostic sessions in the server(s). A diagnostic session enables a specific set of diagnostic services in the server(s).
Word文档
`
4.2.2.1. Message Format
Request: Byte #1 #2 Name RequestServiceIdentifier Sub-function = [ DefaultSession ProgrammingSession ExtendedDiagnosticSession ] Cvt M M Value(hex) 10 01 02 03 Value 50 01 02 03 00-FF 00-FF 00-FF 00-FF Positive Response: Byte #1 Name PositiveResponseServiceIdentifier Sub-Function=[ #2 DefaultSession ProgrammingSession ExtendedDiagnosticSession ] P2server[ ] =[ byte#1 byte#2] P2*server[ ] =[ byte#1 byte#2] Timing P2server value is provided in 1ms resolution. Timing P2*server value is provided in 10ms resolution.
M Cvt M #3 #4 #5 #6 M M M M Negative Response: Byte #1 #2 #3 HEX 01 Name NegativeResponseServiceIdentifier RequestServiceIdentifier NegativeResponseCode Cvt M M M Value 7F 10 NRC Cvt M Sub-function Parameter Definition Description DefaultSession This diagnostic session enables the default diagnostic session in the server(s)and does not support any diagnostic application timeout handling provisions. (e.g. no TesterPresent service is necessary to keep the session active). ProgrammingSession This diagnostic session enables all diagnostic services required to supported the memory programming of a server. ExtendedDiagnosticSession This diagnostic session can e.g. be used to enable all diagnostic services required to support the adjustment of functions like “Idle Speed, CO Value, etc.” in the server’s memory. It can also be used to enable diagnostic services, which are not specifically tied to the adjustment of functions. 02 M 03 M Word文档
`
Negative Response Codes (NRC) NRC(Hex) 12 13 22 Description The sub-function parameter in the request message is not supported. The length of the message is wrong. The ECUcurrent conditions do not allow the change ofdiagnostic Session. Cvt M M M 4.2.2.2. Implementation Rules
This service is used by the diagnostic tool to enable different types of diagnostic sessions in a server. In order to execute a diagnostic service the appropriate session has to be started first.There shall be only one diagnostic session active at a time.
Normal/Default Session (01h) shall be enabled automatically by the ECU if no diagnostic session has been requested at power up.
The ECU shall return to Normal/Default Session (01h) after timeout of ExtendedDiagnostic Session.
The ECU shall be capable of providing all diagnostic functionality defined for the default diagnostic session under normal operating conditions.
The ECU shall first send a DiagnosticSessionControl Positive Response (50h xx) message before the new session becomes active in the ECU.
A DiagnosticSessionControl Positive Response (50h xx) message shall be returned by an ECU if the diagnostic tool requests a session that is already running. If the ECU has already received the same request message previously and performed the requested operation, the ECU shall continue to perform the current operation (i.e. it is not a change of the session).
The ECU shall remain in its current diagnostic session if it is not able to switch into the requested diagnostic session.
The TesterPresent (3Eh) service shall be used to keep the non-default diagnostic sessions active by retriggering S3server. Also any other service request shall retrigger S3server.
A functional TesterPresent (3Eh) request without response may be sent at any time, even regardless of any other service in progress.
When receiving or transmitting any diagnostic messages, including 3Eh service, the S3servertimer will reset.
Word文档
`
Fig 3. Session transition diagram
4.2.3. ECUReset (11H)
This service requests the server to effectively perform an ECU reset based on the content of the ResetType parameter value (suppressPosRspMsgIndicationBit (bit 7) not shown). 4.2.3.1. Message Format
Request: Byte #1 #2 Name RequestServiceIdentifier Sub-Function= [ ResetType: HardReset SoftReset] Cvt M M Value(hex) 11 01 03 Value 51 01 03 Value 7F 11 NRC Cvt M Positive Response: Byte #1 #2 Name PositiveResponseServiceIdentifier Sub-Function=[ ResetType: HardReset SoftReset] Cvt M M Negative Response: Byte #1 #2 #3 Option (Hex) 01 Name NegativeResponseServiceIdentifier RequestServiceIdentifier NegativeResponseCode Cvt M M M Sub-function Parameter Definition Description HardReset Word文档
`
03 This value identifies a “hard reset” condition which simulates the power-on / start-up sequence typically performed after a server has been previously disconnected from its power supply (i.e. battery). SoftReset This value identifies a “soft reset” condition, which causes the server to immediately restart the application program if applicable. The performed action is implementation specific and not defined by the standard. A typical action is to restart the application without reinitializing of previously learned configuration data, adaptive factors and other long-term adjustments. M Negative Response Codes (NRC) NRC (Hex) 12 13 22 Conditions Sub-function parameter in the request message is not supported. The length of the message is wrong The criteria for the ECUReset request are not met. Cvt M M M 4.2.3.2. Implementation Rules
The positive response shall be sent before performing the ECU reset.
The execution of reset will take
4.2.4. CommunicationControl(28H)
The service is used to “switch on/off” the transmission and/or the reception of certain messages of (a) server(s). 4.2.4.1. Message Format
Request: Byte #1 #2 Name RequestServiceIdentifier Sub-Function = [ EnableRxAndTx DisableRxAndTx ] CommunicationType= [ NormalCommunicationMessagesNetworkManagementCommunicationMessages NetworkManagementCommunicationMessagesAndNormalCommunicationMessages ] Cvt M M Value(hex) 28 00 03 01 02 03 #3 M Positive Response: Byte Name CvValue Word文档