Innovative Cost-Effective Embedded System to Enhance ECU Firmware Quality Through Remote Hybrid Testing in Automotive Domain
Abstract
1. Introduction
2. The Need for a Simple Test Device
- T1: The implementation/development timeframe of a task by the software developer. The duration may range from several hours to several days, dependent upon the task’s complexity.
- T2: The period during which the HIL test system is anticipated to be accessible to the tester developer engineer. The duration may range from one day to several days, contingent upon the HIL’s load. It is essential to consider that firmware development involves teams of engineers concurrently creating various software components. The output of each firmware development engineer must undergo testing on the hardware-in-the-loop (HIL) system. The access time to the HIL is contingent upon the number of firmware developers and the volume of their implementation tasks.
- T3: The time necessary for the software test engineer to evaluate the firmware. This duration typically spans several hours.
- T4: The period for fixing the firmware by the software engineer. Usually, this takes from 1 to 2 h.
3. Hybrid Testing
- The software developer requires 2 days (T1) to implement the software, followed by 2 h (T4) to fix the error;
- Testing the implemented changes in the software on the local bench requires one hour (T5);
- The software tester requires three days (T2) to obtain the hardware-in-the-loop (HIL) and then two hours (T3) to perform software testing;
- The cumulative count of software correction efforts is three, denoted by (i).
4. TestBench
- ECU under test (EUT);
- Power supply that supplies the ECU with electricity;
- Debugger for debugging embedded SW running in the ECU;
- ISOK (K-line) programmer that facilitates the downloading of SW into the ECU;
- Vector VN box device (Vector Informatik GmbH, Stuttgart, Germany) that allows monitoring and injects messages into the ECU’s CAN/FR/LIN communication bus;
- Switching relay, or fault insertion relays, for the interconnection of the abovementioned elements.
4.1. Embedded Test System Hardware
- A microcontroller (MCU);
- Input circuits;
- Output circuits.
- Control and monitor the electrical power supply;
- Manage various power supply models;
- Closely and precisely measure the current consumption of the EUT;
- Introduce a minimum of fault injection into the EUT;
- Control the power supply of the Lauterbach debug equipment through the HW device;
- Control the K-line programming interface of the EUT via the HW device connected to its power supply;
- Monitor the communication activity on the bus of the ECU.
- It offers a designated physical location for TestBench equipment.
- The comprehensive embedded testing system may be completely managed from a computer by using the “Remote Desktop Connection” feature in the Windows operating system. This removes the need for third-party software.
- It allows remote access by other software developers, facilitating remote mobile work. This benefit was highly valued during the COVID-19 pandemic, as the software development process and its testing could continue.
- It offers equipment with significantly reduced costs (EUR 200 for TestBench hardware) compared to a hardware-in-the-loop (HIL), which contains expensive devices used to validate software developer duties at just 5–10% of its potential.
- The EUT power supply is implemented through the red connectors KL30, KL30P, and KL15 and the black KL31 for the ground connection;
- The yellow connector links the K-line communication interface to the EUT.
4.2. Embedded Test System Firmware
- A real-time operating system (RTOS);
- Software application modules (“SW_APP_x”): “FW_APP_iMonitor”, “FW_APP_iMonitor”, and “FW_APP_PS” provide the key features of the firmware, indicating that this is where the algorithmic components of the firmware program are executed;
- A library module “Lib” with the specific libraries “Lib_EEPROM”, “Lib_Shunt”, “Lib_ADC”, “Lib_DAC”, and “Lib_Toggle”;
- Data memory “Dat_ shared”, which facilitates information interchange between the high-level application modules (“SW_APP_x”) and the “Lib” module; the “Data_shared” module stores the project’s global variables;
- A communication module implemented in the form of the “Communication Core”.
4.3. Embedded Test System Software
4.4. Communication Protocol
5. Results and Discussion
- The embedded software engineer establishes a connection to the bench hosting the ECU under evaluation via remote desktop connection and launches the graphical user interface (GUI) (see Figure 10).
- The ECU is powered through the activation of relays K1, K3, and K2, while its current consumption is visually monitored for a short period to ensure proper operating conditions. Typically, the current does not exceed 500 mA.
- To download the software onto the microcontroller, relay K4 is closed to supply power to the USB–K-line interface. Using dedicated software tools, the compiled software, from the embedded software engineer, is then flashed into the ECU’s microcontroller. Initiating the download process requires the triggering of Bootloader execution on the ECU, which involves resetting the microcontroller by briefly interrupting and restoring its power supply. This is achieved by pressing the “Reset Pulse” button. Normally, the entire programming process takes only a few minutes.
- The debugger is activated by closing relay K5, after which the Trace32 graphical interface is launched and the corresponding software symbols to be monitored are loaded. Software execution on the microcontroller is started via Trace32. Sensitive variables are observed in the watch window, such as task counters and other critical parameters relevant to the new software version under verification (see Figure 13, C3). If the counters fail to increment, this indicates severe software issues (bugs), and the software must be returned to the developer for correction. This stage corresponds to T4 in Figure 2b.
- If all previous steps are successful, a RestBus simulation is executed using CANoe or CANalyzer. At this stage, the signals transmitted by the ECU are monitored (see Figure 13, C2). Any inconsistencies or missing signals require reversion to stage T4 in Figure 2b. Conversely, if all checks are satisfactory, the software is transferred to the HIL system for final testing. At this point, the likelihood of non-compliance is significantly reduced, and the number of “test fail” loops between the software developer and tester is minimized.
- EUT ON/OFF by switching remote ON/OFF, fast reset, and digital auto-sequence generation for the power supply;
- Manual or automatic waveform generation by controlling the variable voltage output of the power supply;
- Control of the EUT operation mode (sleep, normal) by stimulating the ignition line (KL15) ON/OFF;
- Monitoring of the status of the EUT operation mode (sleep, normal) by measuring the EUT current consumption and EUT output voltages;
- Voltage measurements on the EUT outputs using the spare ADC channels from the Arduino board;
- Fault injection on the communication bus LIN/CAN/FlexRay (bus short), either permanent or pulse.
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| ADAS | Advanced Driver Assistance System |
| ADC | Analog-to-Digital Converter |
| aka | Also Known As |
| AUTOSAR | AUTomotive Open System Architecture |
| BIOComProP | Basic Input Output Communication Protocol Platform |
| BIOComProP_ECU | Basic Input Output Communication Protocol Platform for ECU |
| CAN | Controller Area Network |
| ComStack | Communication Stack |
| DAC | Digital-to-Analog Converter |
| ECU | Electronic Control Unit |
| EEPROM | Electrically Erasable Programmable Read-Only Memory |
| EOL | End-of-Line |
| ETS | Embedded Test System |
| EUT | ECU Under Test |
| FR | FlexRay |
| FW | Firmware |
| GUI | Guide User Interface |
| HIL | Hardware-in-the-Loop |
| HW | Hardware |
| LIN | Local Interconnect Network |
| PLC | Product Life Cycle |
| MTA | Multiple Task Activation |
| RTOS | Real-Time Operating System |
| SW | Software |
| UDS | Unified Diagnostic Services |
References
- Zheng, L. Research and Implementation of Automated Hil Simulation Test Platform for Ecu of Automotive Engine. Int. J. Mechatron. Appl. Mech. 2019, 1, 45–56. [Google Scholar] [CrossRef]
- Domingues, A.R.D.; Labate, C.G.; Ceccatto, J.P.V.; de Silva Lira da, V. Validação automatizada da diagnose da bomba de combustível de vazão variável em ambiente simulado. Blucher Eng. Proc. 2023, 10, 11–16. [Google Scholar] [CrossRef]
- Arcanjo, R.R.; Martins, L.E.G.; Fernandes, D.L.G. Verification and validation of embedded software in an automotive context: A systematic literature review. Rev. Cient. Multidiscip. Nucl. Conhecimento 2023, 3, 207–250. [Google Scholar] [CrossRef]
- Wang, X.; Chen, G.; Tong, W.; Guo, D.; Kang, J.; Ren, C. Hardware-In-The-Loop Simulation Of Vehicle Antilock Braking System. Int. J. Mechatron. Appl. Mech. 2022, 1, 118–125. [Google Scholar] [CrossRef]
- Abboush, M.; Knieke, C.; Rausch, A. A Virtual Testing Framework for Real-Time Validation of Automotive Software Systems Based on Hardware in the Loop and Fault Injection. Sensors 2024, 24, 3733. [Google Scholar] [CrossRef] [PubMed]
- Mihalič, F.; Truntič, M.; Hren, A. Hardware-in-the-Loop Simulations: A Historical Overview of Engineering Challenges. Electronics 2022, 11, 2462. [Google Scholar] [CrossRef]
- Syaka, D.R.B.; Purwoko, A.T.; Sopiyan, S. Design and Experiment of a Prototype Electronic Control Unit Direct Injection Fuel System Arduino-Based for 2-stroke Spark Ignition Engine. Automot. Exp. 2021, 5, 49–56. [Google Scholar] [CrossRef]
- Dewatama, D.; Melfazen, O.; Fauziyah, M. Implemantation of firefly algorithm on Arduino Uno. Bull. Electr. Eng. Inform. 2023, 12, 3593–3600. [Google Scholar] [CrossRef]
- Komarizadehasl, S.; Mobaraki, B.; Ma, H.; Lozano-Galant, J.-A.; Turmo, J. Development of a Low-Cost System for the Accurate Measurement of Structural Vibrations. Sensors 2021, 21, 6191. [Google Scholar] [CrossRef] [PubMed]
- Supranartha, A.; Pancane, I.W.D.; Sunaya, I.N.; Yasa, I.M.A.; Wiryawan, I.M.A. Implementation of Electronic Control Unit (ECU) Simulator Engine for Improving Vehicle System Performance Modern. Adv. Eng. Res. 2024, 249, 43–52. [Google Scholar] [CrossRef]
- Essa, M.E.-S.M.; Lotfy, J.V.W.; Abd-Elwahed, M.E.K.; Rabie, K.; ElHalawany, B.M.; Elsisi, M. Low-Cost Hardware in the Loop for Intelligent Neural Predictive Control of Hybrid Electric Vehicle. Electronics 2023, 12, 971. [Google Scholar] [CrossRef]
- Hellhake, D.; Bogner, J.; Schmid, T.; Wagner, S. Towards using coupling measures to guide black-box integration testing in component-based systems. Softw. Test. Verif. Reliab. 2022, 32, e1811. [Google Scholar] [CrossRef]
- Englisch, N.; Bergelt, R.; Hardt, W. An Educational Platform for Automotive Software Development and Test. In Proceedings of the IEEE 32nd Conference on Software Engineering Education and Training (CSEE&T), Munich, Germany, 23–29 May 2020; pp. 1–4. [Google Scholar] [CrossRef]
- Schärtel, L.; Reick, B.; Pfeil, M.; Stetter, R. Analysis and Synthesis of Architectures for Automotive Battery Management Systems. Appl. Sci. 2022, 12, 10756. [Google Scholar] [CrossRef]
- Bogorin-Predescu, A.; Țîțu, A.M.; Pană, M.M. Flow management for software developers in the knowledge based organization from the automotive industry. Int. J. Mechatron. Appl. Mech. 2024, 1, 44–51. [Google Scholar] [CrossRef]
- Jelkić, Z.; Pikula, B. The Establishment of an Advanced Brush Model for Simulation of Vehicle Dynamics. Lect. Notes Netw. Syst. 2022, 472, 260–273. [Google Scholar] [CrossRef]
- Teplická, K.; Khouri, S.; Mudarri, T.; Freňáková, M. Improving the Quality of Automotive Components through the Effective Management of Complaints in Industry 4.0. Appl. Sci. 2023, 13, 8402. [Google Scholar] [CrossRef]
- Bogdan, R.; Crișan-Vida, M.; Barmayoun, D.; Staicu, L.L.; Puiu, R.V.; Lup, M.; Marcu, M. Optimization of AUTOSAR Communication Stack in the Context of Advanced Driver Assistance Systems. Sensors 2021, 21, 4561. [Google Scholar] [CrossRef] [PubMed]
- Microchip. MCP4725 PICtail Plus Daughter Board User’s Guide. 2008. Available online: https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/UserGuides/51722a.pdf (accessed on 10 October 2025).
- Adafruit. Adafruit INA260 Current + Voltage + Power Sensor Breakout 2024. Available online: https://cdn-learn.adafruit.com/downloads/pdf/adafruit-ina260-current-voltage-power-sensor-breakout.pdf (accessed on 10 October 2025).
- Texas Instruments. INA260 Precision Digital Current and Power Monitor with Low-Drift, Precision Integrated Shunt. 2016. Available online: https://www.ti.com/lit/ds/symlink/ina260.pdf?ts=1735906791794&ref_url=https%253A%252F%252Fwww.google.com%252F (accessed on 10 October 2025).
- Okystar. Product Model: OKY3015. 2024. Available online: https://www.okystar.com/product-item/5v-12v-24v-8-channel-relay-module-oky3015/#tab-id-2 (accessed on 10 October 2025).
- Bogorin-Predescu, A.; Țîțu, A.; Oprean, C. Improving the quality of rapid prototyping processes of electronic control units by using a dedicated software platform. Acta Tech. Napoc. Ser. Appl. Math. Mech. Eng. 2023, 66, 171–180. Available online: https://atna-mam.utcluj.ro/index.php/Acta/article/view/2227 (accessed on 10 October 2025).
- Țîțu, A.M.; Oprean, C.; Mărginean, I.; Moldovan, A.M.; Bogorin-Predescu, A. Hydroelectric Turbine Linearly Developed Along River Streamline. Romania Patent Number RO127219-B1, 2017. Available online: https://worldwide.espacenet.com/patent/search/family/045876028/publication/RO127219B1?q=pn%3DRO127219B1 (accessed on 10 October 2025).
- Țîțu, A.M.; Oprean, C.; Bondrea, I.; Mărginean, I.; Moldovan, A.M.; Bogorin-Predescu, A. Portable Hydroelectric Turbine with Deformable Blades. Romania Patent Number RO128224-B1, 2018. Available online: https://worldwide.espacenet.com/patent/search/family/047998617/publication/RO128224B1?q=pn%3DRO128224B1 (accessed on 10 October 2025).
- Bondrea, I.; Țîțu, A.M.; Oprean, C.; Mărginean, I.; Moldovan, A.M.; Bogorin-Predescu, A. Chair for Working at PC, with Active Principle of Relaxing the Spine. Romania Patent Number RO129280-B1, 2021. Available online: https://worldwide.espacenet.com/patent/search/family/050343499/publication/RO129280B1?q=pn%3DRO129280B1 (accessed on 10 October 2025).
- Bi, Z.; Xu, G.; Wang, C.; Xu, G.; Zhang, S. A Method for Translating Automotive Body-Related CAN Messages Based on Labeled Bits. Appl. Sci. 2023, 13, 1942. [Google Scholar] [CrossRef]
- Lo Bello, L.; Patti, G.; Leonardi, L. A Perspective on Ethernet in Automotive Communications—Current Status and Future Trends. Appl. Sci. 2023, 13, 1278. [Google Scholar] [CrossRef]













| Task State | SW Activity [Hours] | Current Workflow [Hours] | Optimized Workflow [Hours] |
|---|---|---|---|
| SW developer (T1) | Implementation time | 2 days = 16 h | 2 days = 16 h |
| SW tester (T2 + T3) | Waiting + testing time | 3 days + 2 h = 26 h | 3 days + 2 h = 26 h |
| Attempts (i) | 3 | 3 | |
| SW developer (T4) | Bug fix time | 2 h | 2 h |
| SW developer (T5) | Test time | - | 1 h |
| Total hours spent formula | T1 + i × (T2 + T3) + (i − 1) × T4 (1) | T1 + i × (T4 + T5) + (T2 + T3) (2) | |
| Total hours spent | 98 h | 51 h |
| Attempts (i) | Traditional Workflow [Hours] | Optimized Workflow [Hours] | Attempts | Traditional Workflow [Hours] | Optimized Workflow [Hours] |
|---|---|---|---|---|---|
| 1 | 42 | 45 | 6 | 182 | 60 |
| 2 | 70 | 48 | 7 | 210 | 63 |
| 3 | 98 | 51 | 8 | 238 | 66 |
| 4 | 126 | 54 | 9 | 266 | 69 |
| 5 | 154 | 57 | 10 | 294 | 72 |
| Nr. | Requirement Description | FW_APP_iMonitor | FW_APP_vMonitor | FW_APP_PS | Communication Core | Lib_EEPROM | Lib_Shunt | Lib_ADC | Lib_DAC | Lib_Toggle | Data Shared |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Activation and deactivation of switches K1–K9. | x | x | ||||||||
| 2 | Activation or deactivation for a defined timeframe. | x | x | ||||||||
| 3 | Injection of faults into the communication bus. | x | x | ||||||||
| 4 | Voltage measurement at the terminals of the equipment under test (EUT). | x | x | x | x | ||||||
| 5 | Measurement of the current consumption from the shunt. | x | x | x | x | ||||||
| 6 | Cyclic monitoring of the voltages at the EUT terminals. | x | x | x | |||||||
| 7 | Cyclic monitoring of the current consumption from the shunt. | x | x | x | |||||||
| 8 | Digital control of the power supply’s ON/OFF functionality. | x | x | x | |||||||
| 9 | Analog control of the power supply. | x | x | x | |||||||
| 10 | Digital control for the activation or deactivation of a power source for a predetermined duration and specified number of cycles. | x | x | ||||||||
| 11 | Analog control including a predetermined waveform and several cycles of the power supply. | x | x | ||||||||
| 12 | Monitoring the current consumption, safeguarding the power supply and the equipment under test (EUT) during a short circuit, and notifying the graphical interface. | x | x | x | x | x | x | x | |||
| 13 | Fast cache retrieval of voltage and current consumption data subsequent to periodic monitoring. | x | x | x | x | ||||||
| 14 | Preserving and reinstating system state parameters during shutdown and startup. | x | x | x | x | x | |||||
| 15 | Reading and writing system parameters from/to EEPROM. | x | x | ||||||||
| 16 | Reading and writing traceability data from/to EEPROM. | x | x |
| Command Description | Nr | Direction | #0 | #1 | #2 | #3 | #4 | #5 | #6 | #7 |
|---|---|---|---|---|---|---|---|---|---|---|
| Set relay, i.e., “Write Port X bit” | 1 | PC -> TestBench | x10 | xB2 | CH | x00 | State | x00 | x00 | x00 |
| 2 | PC <- TestBench | x50 | xB2 | CH | x00 | State | x00 | x00 | x00 | |
| Get relay state, i.e., “Read Port X bit” | 3 | PC -> TestBench | x11 | xB2 | CH | x00 | x00 | x00 | x00 | x00 |
| 4 | PC <- TestBench | x51 | xB2 | CH | x00 | State | x00 | x00 | x00 | |
| Read voltage, i.e., “Read Port ADC” | 5 | PC -> TestBench | x11 | x05 | CH | x00 | x00 | x00 | x00 | x00 |
| 6 | PC <- TestBench | x51 | x05 | CH | Data MSB | Data LSB | x00 | x00 | x00 | |
| Set voltage, i.e., “Write Port DAC” | 7 | PC -> TestBench | x10 | x08 | CH | Data MSB | Data LSB | x00 | x00 | x00 |
| 8 | PC <- TestBench | x50 | x08 | CH | Data MSB | Data LSB | x00 | x00 | x00 | |
| Read shunt | 9 | PC -> TestBench | x11 | x0F | CH | x00 | x00 | x00 | x00 | x00 |
| 10 | PC <- TestBench | x51 | x0F | CH | Data MSB | Data LSB | x00 | x00 | x00 | |
| Write EEPROM | 11 | PC -> TestBench | x30 | x02 | Addr MSB | Addr LSB | Data | x00 | x00 | x00 |
| 12 | PC <- TestBench | x70 | x02 | Addr MSB | Addr LSB | Data | x00 | x00 | x00 | |
| Read EEPROM | 13 | PC -> TestBench | x31 | x02 | Addr MSB | Addr LSB | x00 | x00 | x00 | x00 |
| 14 | PC <- TestBench | x71 | x02 | Addr MSB | Addr LSB | Data | x00 | x00 | x00 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bogorin-Predescu, A.; Titu, S.; Titu, A.M.; Marcu, D.F.; Dragomir, D.C.; Dragomir, M. Innovative Cost-Effective Embedded System to Enhance ECU Firmware Quality Through Remote Hybrid Testing in Automotive Domain. Appl. Sci. 2025, 15, 12736. https://doi.org/10.3390/app152312736
Bogorin-Predescu A, Titu S, Titu AM, Marcu DF, Dragomir DC, Dragomir M. Innovative Cost-Effective Embedded System to Enhance ECU Firmware Quality Through Remote Hybrid Testing in Automotive Domain. Applied Sciences. 2025; 15(23):12736. https://doi.org/10.3390/app152312736
Chicago/Turabian StyleBogorin-Predescu, Adrian, Stefan Titu, Aurel Mihail Titu, Dragos Florin Marcu, Diana Cristina Dragomir, and Mihai Dragomir. 2025. "Innovative Cost-Effective Embedded System to Enhance ECU Firmware Quality Through Remote Hybrid Testing in Automotive Domain" Applied Sciences 15, no. 23: 12736. https://doi.org/10.3390/app152312736
APA StyleBogorin-Predescu, A., Titu, S., Titu, A. M., Marcu, D. F., Dragomir, D. C., & Dragomir, M. (2025). Innovative Cost-Effective Embedded System to Enhance ECU Firmware Quality Through Remote Hybrid Testing in Automotive Domain. Applied Sciences, 15(23), 12736. https://doi.org/10.3390/app152312736

