Share this

Research on the Application of Freescale Microprocessors in Engine ECU Testing

2026-04-06 06:38:13 · · #1

Abstract: This paper discusses the hardware testing of engine ECUs, focusing on one method for implementing hardware testing and the composition of the testing system, as well as the application research of microprocessors in engine ECU testing and control systems.

Keywords : engine, ECU under test, test, microprocessor, computer, C++

1 Introduction

With the rapid development of my country's automotive industry in recent years, passenger vehicles of all levels have entered countless households. Today's consumers are paying more attention to both active and passive safety of vehicles than ever before. People have higher requirements for the reliability of every part in a car. As the engine is like the heart of a car, the ECU, as the core that controls the operation of the engine, is extremely important for its reliability. The following will introduce a method for testing the reliability of ECU hardware.

2. System Composition and Functions

2.1 System Composition

This ECU offline testing equipment performs hardware tests on various engine ECUs. The equipment mainly includes various ECU fixtures, digital input test, analog input test, speed circuit test, CAN communication test, pulse input test, low-side drive output test, and a monitoring console with a human-machine interface.

2.2 Functional Description

2.2.1 General Description

This engine ECU offline hardware testing equipment is used to perform hardware testing on various existing LNG/CNG engine ECUs of Dongfeng Motor and other companies. It tests the ECU with analog/digital input and real/dummy loads. The host computer compares the data from each test with reference values ​​to determine whether the ECU hardware is normal.

2.2.2 Detailed Description

Step 1: Flash the dedicated test software along with the ECU under test;

Step 2: Access the test monitoring interface, as shown in the image below:

Figure 1: Monitoring Interface

Step 3: Observe the system communication prompt in the upper right corner of the monitoring interface. If it shows green "Communication is normal", you can proceed to the next step. If it shows red "PC-Communication box not connected", you need to check whether the communication box in the test bench is connected properly.

Step 4: Click "Ignition Enable" in the monitoring interface. Observe the version number of the ECU under test in the upper left corner. Only if the version number is consistent with the version of the ECU under test can you proceed to the next step of the test; otherwise, click the ignition disable button to exit the test and remove the ECU to proceed to step 1.

Step 5: Assuming all the above steps are normal, proceed to hardware testing. Click the "Start Test" button. You can also stop the test midway by clicking "Stop Test." It is recommended not to stop the test unless there are unexpected issues; it is safest to stop the device after completing one test cycle. Step 6: Observe the test interface. Items that pass the test will display "Pass." If there is a "Fail" message, observe the error report window and compare the values ​​in the error report with the test reference values. If the deviation is significant, it indicates a problem with the hardware being tested. Record the fault and send it to a repair technician. You can also click "Save Error Report" to save the error information as a TXT file for relevant technical personnel to reference.

Step 7: After the test is completed, a prompt will appear in the lower left corner of the monitor indicating that the test is complete and the ECU can be removed.

3. Control Hardware Design Interface Description

3.1 The hardware structure of the control equipment is shown in Figure 2. To simplify wiring, the devices are connected via a bus. The monitoring computer has a Chinese interface, which is intuitive. Operators can directly perform corresponding operations based on the prompts.

Figure 2: Hardware System Diagram

3.2 Interface Description

3.2.1 Interface List

1) The six circuit boards of TEST are connected by 26-pin ribbon cables, and the external output/input is connected by 24-pin connectors;

2) The TEST (test bench), the ECU under test, and the monitoring computer are connected via CAN communication (CCP protocol).

3.2.2 Information Exchange Processing

1) Signal exchange between the test bench and the monitoring computer includes:

Define name

address

length

describe

DigitalValueSelect

0X3C08

1 bit

Select digital output value

DigtalChAlloff

0X3C09

1 bit

Digital outputs all off

DigtalChAllon

0X3C0A

1 bit

Digital output fully enabled

DigitalChEnable[23]

0X3C0B

23bit

23 digital output enable

AnalogOutValueSelect

0X3C22

1 bit

Analog output voltage selection

AnalogOutChAlloff

0X3C23

1 bit

Analog output all off

AnalogOutChAllon

0X3C24

1 bit

Analog output fully open

AD_vRaw[24]

0X3C67

24bit

Voltage value detected (reserved)

CR0_ID

0X100

CCP receiving address

DT0_ID

0X200

CCP sending address

2) Data exchange between the tested ECU (V1.4 injection ECU) and the monitoring computer includes:

Test definition name

length

address

describe

Analog_Input[0]

16bit

3030

CNGP

Analog_Input[1]

MAP

Analog_Input[2]

TURBO-P

Analog_Input[3]

Electronic Throttle Body TPS1

Analog_Input[4]

PEDALP2

Analog_Input[5]

Electronic throttle body TPS2, unmeasurable

Analog_Input[6]

PEDALP1

Analog_Input[7]

CNGTemp

Analog_Input[8]

OilP-In

Analog_Input[9]

OilTemp-In

Analog_Input[10]

ExhaustTemp2-In

Analog_Input[11]

ExhaustTemp1-In

Analog_Input[12]

VehBatt

Analog_Input[13]

O2-F-In

Analog_Input[14]

MAT

Analog_Input[15]

CTS

RPM_Time

16bit

3082

Rotational speed (cycle, accuracy = 1µs)

RPM_SMOT_Value

8bit

3084

Speed ​​signal sensitivity [0 = high sensitivity (low voltage), 1 = low sensitivity (high voltage)]

IGN_Diagnostic_TriggerTime

16bit

3085

Ignition high voltage feedback trigger signal - pulse width (accuracy = 1µs)

IGN_DiagTrig_Cnt

16bit

3087

Ignition high voltage feedback trigger signal - number of triggers

IGN_DwellTime

16bit

3089

Ignition and charging time (accuracy = 1.6µs)

IGN_DwellPeriod

16bit

308B

Ignition cycle (accuracy = 1ms)

INJ_Diagnostic_TriggerTime

16bit

308D

High-pressure feedback trigger signal for nozzles – pulse width (accuracy = 1µs)

INJ_DiagTrig_Cnt

16bit

308F

Nozzle high pressure feedback trigger signal - number of triggers

Throttle_En

8bit

3091

Electronic throttle control enabled (0 = disabled, others = enabled)

Throttle_Tgt_r

8bit

3092

Electronic throttle control target opening (accuracy = 1/256%)

TPS_r

8bit

3093

Electronic throttle control of actual opening degree (accuracy = 1/256%)

TPS1_AD

16bit

3094

Electronic throttle body TPS1 AD value

TPS2_AD

16bit

3096

Electronic throttle body TPS2 AD value

O2_HeatEn

8bit

3098

Oxygen sensor heating control enabled (0 = disabled, others = enabled)

CJ125_REG

32bit

3099

CJ125 register SPI read return value (correct value = 0x63ff8900)

CJ125_State_OK

8bit

309D

CJ125 chip SPI communication status determination (0=Error, 1=Ok)

CJ125_Ur_AD

16bit

309E

CJ125_Ur Voltage AD Value

CJ125_Ua_AD

16bit

30A0

CJ125_Ua Voltage AD Value

CJ125_IDENT_REG

8bit

30A2

CJ125_IDENT register return value

CJ125_DIAG_REG

8bit

30A3

CJ125_DIAG register return value

CJ125_INIT1_REG

8bit

30A4

CJ125_INIT1 register return value

CJ125_INIT2_REG

8bit

30A5

CJ125_INIT2 register return value

MC33814_SPIChckRsp

16bit

30A6

MC33814 chip SPI communication check (correct value = 0x7123)

IGN_Value

8bit

30A8

Ignition load status (=0, true ignition load; =1, dummy ignition load)

SW_Version

16bit

30A9

Software version number

4. Motherboard Schematic

The system uses the Freescale MC9S12XEP100MAC microprocessor, which has abundant hardware resources. It is a 16-bit microcontroller with 144 pins, 64KB of RAM, and 32KB of D_Flash. The CAN schematic is shown in Figure 3. The CAN transceiver circuit is mainly used for data communication, realizing communication between multiple ECUs, as well as communication with the host computer.

Figure 3: CAN transceiver circuit

Figure 4 shows a schematic diagram of a part of the motherboard ECU. The main ECU performs functions such as analog data acquisition, analog pulse signals, and low-side driving.

Figure 4: ECU Main Control Circuit

5. Program Organization Structure

5.1 Test bench program description:

This system utilizes a main control module developed using the Freescale MC9S12XEP100MAC microprocessor. The application software used for programming this module is Freescale CodeWarrior V5.1. The system employs a structured programming approach, ensuring high readability. The program is divided into several modules for management, including digital output functions, analog output functions, speed output functions, frequency output functions, CAN initialization functions, and CCP functions. This categorization facilitates maintenance personnel in quickly locating faults online when equipment malfunctions. The programming software is a general-purpose software designed by Freescale for programming their 16-bit microprocessors. Due to space limitations, only a brief explanation of the main functions is provided below.

void main(void)

{

PE_low_level_init(); // PE initialization

ErrorSta = AD16CH_Start();

ErrorSta = AD24CH_Start();

ccpBootInit(0x100, 0x200); // CCP protocol communication address

ccpInit(); // CCP initialization

CAN3Init(); // CAN initialization

GenFreqInit(); // Frequency output initialization

GenRPMInit(); // Initialize the rotation speed output

AD_vRaw[0]=0; // Initialize AD quantity

for(;;)

{

ErrorSta = ccpBackground();

if(ccpBootTransmitCrmPossible()){

ErrorSta = ccpSendCallBack();

}

if(ccpBootReceiveCro(CAN0RxBuf)){

ccpCommand(CAN0RxBuf);

}

if(Task2msFlag)

{

Task2msFlag=0;

ccpDaq(1);

}

if(Task10msFlag)

{

Task10msFlag=0;

TesterAPP_FrequencySignal(); // Frequency output function

Calc_RPMSignal(); // Simulated rotational speed output function

IOCFG_GenFreqOutput();

IOCFG_DigitalSelect(); // Digital output function

IOCFG_DigitalChOutput();

IOCFG_AnalogSelect(); // Analog output function

IOCFG_AnalogChOutput();

IOCFG_LoadSelect(); // Load switching function

IOCFG_IGNControl(); // Ignition enable function

IOCFG_GenRPMAmpSelect(); // Rotational speed amplitude adjustment function

ECUCANTest(); // CAN test

ccpDaq(2);

}

if(Task100msFlag)

{

Task100msFlag=0;

ccpDaq(3);

}

}

}

5.2 Description of the monitoring computer program structure

The monitoring software was written using the C++Builder 6.0 editing environment. This programming software is relatively easy to use. The compiled monitoring interface is shown in Figure 1: Monitoring Interface.

5.3 Description of the ECU program under test:

Since the test bench is a general-purpose test bench, the ECUs under test can be of different types. We have tested three ECUs so far. The ECUs under test write their own test programs according to their own needs. The programs are somewhat similar to the test bench software, so we will not go into details here.

6. Conclusion

After successful commissioning, this control system was put into operation with virtually no modifications. It is currently running very stably, and operational experience to date demonstrates that:

(1) The system is designed with a rigorous concept, has stable and reliable functions, and requires virtually no maintenance. It achieves centralized operation and decentralized management, and is simple and intuitive to operate.

(2) Debugging and fault diagnosis are convenient and fast. The fault diagnosis function enables operators to discover production faults in a timely manner and determine their location, shortening the time for troubleshooting.

(3) The system has good performance and can meet the hardware testing requirements of various engine ECUs.

(4) The system adopts CAN bus control, which has good scalability and is easy to expand in the future.

References :

1. Shao Beibei's Online Development Methods for Embedded Applications of Microcontrollers [M]... Tsinghua University Press, 2005

2. Tan Haoqiang, C Programming [M]…………………Tsinghua University Press, 1999 edition

3. Freescale 08 Series Microcontroller Development and Application Examples [M], Beihang University Press, 2009.

4. Chen Long's Research on the Application of ABB Robots and TSX57 Processors in Automobile Welding……………………………………Electrical Age 2007, 9121-124

About the author:

Chen Long, male, born in October 1977, holds a bachelor's degree and is an industrial automation engineer. He graduated from Wuhan University with a major in Electronic Engineering and is mainly engaged in the design and research of electrical automation system engineering.

Read next

CATDOLL EQ (Sleepy Q) 108CM

Height: 108cm Weight: 14.5kg Shoulder Width: 26cm Bust/Waist/Hip: 51/47/59cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22