Professional Documents
Culture Documents
Product information
Product name: TM4 CO150 MCU
Version number: CO150-A1/CO150-A2
Embedded Bootloader version: 1.4.2.x
Embedded application software version: 2.4.x.x, 2.6.x.x, 3.4.x.x
Document information
Reference: TG-0090 TM4 MCU UDSonCAN Technical Guide
Release date: 2020-02-27
Version number: 11.0
Template information
Reference: IN-8014_4
Table of contents
1 Introduction ........................................................................................................................ 5
1.1 Diagnostic setup ........................................................................................................ 5
1.2 Scope......................................................................................................................... 5
1.3 What’s new ................................................................................................................ 6
1.4 Definitions, acronyms and abbreviations .................................................................... 6
1.5 References................................................................................................................. 6
2 Communicating using UDSonCAN ..................................................................................... 7
2.1 UDS CAN communication configuration ..................................................................... 7
2.2 UDS sessions and security access ............................................................................ 7
2.2.1 Default diagnostic session ................................................................................... 8
2.2.2 Extended diagnostic session ............................................................................... 9
2.2.3 Programming diagnostic session ......................................................................... 9
2.2.4 Setting sessions and security access ................................................................ 10
2.3 Reading and clearing errors ..................................................................................... 11
2.3.1 DTC failures and associated corrective actions ................................................. 11
2.4 Reading and setting values over UdsOnCan ............................................................ 12
2.4.1 Reading or editing product identification information ......................................... 12
2.4.2 Reading and writing system parameters............................................................ 14
2.4.3 Reading diagnostic variables............................................................................. 16
2.4.4 Saving modified parameter values to NVM........................................................ 18
2.5 Resetting the system ................................................................................................ 19
2.6 Program the embedded application .......................................................................... 19
2.6.1 Reading the program file ................................................................................... 20
2.6.1.1 Reading the hardware number....................................................................... 21
2.6.1.2 Reading the code file ..................................................................................... 22
2.6.2 Establishing the programming session .............................................................. 23
2.6.3 Flashing the program file ................................................................................... 25
2.6.3.1 Erase segment .............................................................................................. 26
2.6.3.2 Programming segment................................................................................... 27
2.6.3.3 Validating segment ........................................................................................ 28
2.6.4 Launching the program ..................................................................................... 29
3 Customer service ............................................................................................................. 30
Appendix A UDS services implemented for MCU ............................................................. 31
Appendix B UDS routine identifiers................................................................................... 32
Appendix C UDS RID and DID in MCU Bootloader........................................................... 33
Appendix D User stories ................................................................................................... 34
List of tables
Table 1 Related document references ............................................................................. 6
Table 2 UDS Communication parameters ........................................................................ 7
Table 3 Default session – Security feature accessibility ................................................... 8
Table 4 Extended session – Security feature accessibility ............................................... 9
Table 5 Programming session – Security feature accessibility ......................................... 9
Table 6 Security access – sub-function .......................................................................... 10
Table 7 ECU part and serial numbers ............................................................................ 13
Table 8 Vehicle Identification Number (VIN)................................................................... 14
Table 9 System parameters (part I) ................................................................................ 14
Table 10 System parameters (part II) ............................................................................... 16
Table 11 Baud rate value definitions ................................................................................ 16
Table 12 MCU sensors .................................................................................................... 16
Table 13 Internal data ...................................................................................................... 17
Table 14 Manual control................................................................................................... 18
Table 15 Descriptions of the code file segments .............................................................. 22
Table 16 Implemented UDS services with sub-functions .................................................. 31
Table 17 Implemented UDS services – Brief description from ISO 14229 ........................ 31
Table 18 UDS routine identifiers ...................................................................................... 32
Table 19 UDS identifiers in the Bootloader ...................................................................... 33
List of figures
Figure 1 Typical setup - MCU using UDSonCAN .............................................................. 5
Figure 2 Examples of SecurityAccess request ................................................................ 11
Figure 3 Examples of ReadDTCinformation and ClearDiagnosticInformation .................. 12
Figure 4 Save NVM (RID 222) flowchart ......................................................................... 18
Figure 5 Flash process .................................................................................................... 19
Figure 6 Reading program file ......................................................................................... 20
Figure 7 Example of header in the .hex file with format = 1 ............................................. 21
Figure 8 Example of header in the .hex file with format = 2 ............................................. 21
Figure 9 Example code file .............................................................................................. 22
Figure 10 Establish programming session ......................................................................... 23
Figure 11 Flashing the program file ................................................................................... 25
Figure 12 Erase segment .................................................................................................. 26
Figure 13 Programing segment ......................................................................................... 27
Figure 14 Validating segment ............................................................................................ 28
Figure 15 Launch the program .......................................................................................... 29
1 Introduction
This guide describes how to communicate with TM4 Motor Control Unit (MCU) using Unified Diagnostic
Services over Controller Area Network protocol (UDSonCAN) in order to consult, edit or update embedded
vehicle system information.
Designed as an appendix to the MCU Operations and Maintenance Guide [1], this additional information is
specifically related to UDSonCAN and is aimed at developers of a UDS tester that would be used for End-
Of-Line testing or in-field diagnostics. This information includes how to use the UDSonCAN functions of the
MCU product; the main functions of the UDSonCAN interface and the message structure and sequences
that an external UDS-enabled device should transmit in order to use the MCU UDSonCAN interface.
The MCU UDSonCAN implementation is based on ISO-15765, ISO-14229-1 and SAE J2012; these
standards should be consulted for more detailed information on how to communicate with embedded
systems using UDSonCAN.
1.2 Scope
This technical guide is divided as follows:
• Introduction – general information about UDSonCAN, definitions and document reference information.
• Communicating using UDSonCAN – how to interact with the UDSonCAN functionality.
• Customer service – TM4 customer service contact details.
• Appendices – give a resume of the services and specific sub-functions implemented by TM4, details of
the UDS routine identifiers and user stories.
1.5 References
Table 1 Related document references
Reference Title
[1] TG-0068 TM4 CO150-A2-M1 Operations and Maintenance Guide
[2] SC-6004E-0XX DTC Action Guide
[3] See note TM4 Error Codes and Corrective Actions
[4] IN-8013e MCU CAN Protocol v4.1 Specifications
MCU CAN Protocol v4.2 Specifications
MCU CAN Protocol v4.3 Specifications
MCU CAN Protocol v4.4 Specifications
Note: This html document is generated for each software version and made available with the software package at the
time of delivery.
1 The ECU Hardware numbers 0x1456, DLSITE 0xF10A, PRGSHOP 0xF198 and the PDDID 0xF199 can
only by written in a Programming/Advanced session.
2 Once the download routine has been called, TesterPresent service is no longer available until the ECU
boots up again.
3 Refer to Section 2.4.2 for information on how to read/write the UdsEncryptionKeyPartX values.
4 For a request to Basic access level, the MCU returns a positive response (no seed).
5DLSITE 0xF10A, PRGSHOP 0xF198 and the PDDID 0xF199 are read-write access in
Programming/Advanced or Extended/Factory sessions.
The VIN requires a VIN write security access level in order to set the string values.
Table 8 Vehicle Identification Number (VIN)
Name UDS ID Type Write Description Owner
Session/
Security
MCU_VINDID 0xF190 String(18) Extended/ VIN Customer
VIN write
10The majority of the parameters and variables will take effect on the application only after an ECU re-boot
(any type of re-boot).
Start
Establish
Programming session
Launch program
End flash
The Flash process is made up of several steps and segments described in the flowcharts in the following
sections:
1 Reading the program file, see Section 2.6.1.
2 Establishing the programming session, see Section 2.6.2.
#------------------------------------------
# HeaderFormat = 1
# HardwareNumber = 12
#------------------------------------------
:020000040008F2
:10000000EFBEB8A985FDA3A5C399805BAFB112452A
:1000100020B377A4FBCD4BAF4657AAA25642657CCE
…
#------------------------------------------
# HeaderFormat = 2
# HardwareNumber = 12,13
#------------------------------------------
:020000040008F2
:10000000EFBEB8A985FDA3A5C399805BAFB112452A
:1000100020B377A4FBCD4BAF4657AAA25642657CCE
…
HeaderFormat: This is the version of the header format. This number will be incremented if
the format changes.
HardwareNumber: This number or list of numbers represents the controller PCB numbers on
which this software can operate. Those number will have to be sent to the
Bootloader during the flashing process to unlock the flashing operation.
:020000040008F2
:10000000EFBEB8A985FDA3A5C399805BAFB112452A
:1000100020B377A4FBCD4BAF4657AAA25642657CCE
:10002000BB39C5ED905354D5EBEFF3C5F14B8BF8CD
:1000300051C5D18C870466D1DD43A0C8D1EA82EADC
:100040004A903975065308CB4C84D6F7918C3A15F3
:10005000A5045AE49D3208DC9EEF24B5A42B3D2074
…
:10FFD00008700C0B8463832CB8D2409D7926FC708A
:10FFE00077889EB488147B5DFAC9824EE940E12D82
:10FFF0007B736D7C1E60861352284379F2BC5738A0
:020000040009F1
:100000004981D8B131C2C3B5C5A6C0F3A8AB025C63
:1000100020A167A4FFF21DFE42681BB451D774CD26
:100020005A9419B4707A53B60E7F0A2510E6540913
…
:10CEA0003EED71AA70AC05ACE52D0C7C9333925F1E
:10CEB000300B5F180CB49B61C5FBDF5E9A56A283F2
:08CEC0003FB4F8216EC51F7993
:00000001FF
712 02 10 02 00 00 00 00 00 Programming
Select programming session 71A 04 50 02 00 00 00 00 00 Ok
In process Result No
Error
Ok?
Yes
Wait 500 ms
712 02 10 03 00 00 00 00 00 Programming
Select Programming session 71A 04 50 03 00 00 00 00 00 Ok
Result No
Error
Bootloader?
Yes
Yes
Erase segment
Program segment
Verify segment
No
Start
In process Result No
Error
Ok?
Yes
End
Start
No
End
Start
In process Result No
Error
Ok?
Yes
End
In process Result No
Error
Ok?
Yes
3 Customer service
For further technical assistance, please contact TM4 Customer Service:
Email: tm4customersupport@dana.com
12Specialized factory that removes the conventional power-train of the vehicle to install the electrical
powertrain components.