0% found this document useful (0 votes)
17 views6 pages

Understanding Flash Bootloader in ECUs

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

Understanding Flash Bootloader in ECUs

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Understanding What is Flash Bootloader | ECU Reprogramming [Link]

Understanding What is a Flash Bootloader and the Automotive & IoT Blog

Nuances of an Automotive ECU Re-programming


Subscribe

Home > Automotive & IoT Blog > Understanding What is a Flash Bootloader and the Nuances of an Automotive ECU Re-programming

Understanding What is a Flash Bootloader and the Nuances of an


A u t o m o t i v e E C U Re - p ro g r a m m i n g

Every Electronic Control Unit (ECU) in an automobile is tasked with executing a specific
application. An A n t i - L o c k B r a k i n g S y s t e m E C U , for instance, ensures that brakes don’t get
locked during braking.

How this works? – the ABS software application ported into the ECU hardware, is able to
fetch the vehicle speed as an input and is designed to reduce the brake on the wheels, based
on this input.

What role does a Flash Bootloader software play in all this? You may ask!

Well, as the names suggests, B o o t l o a d e r i s t h e s o f t w a r e a l g o r i t h m t h a t i s e x e c u t e d d u r i n g


the booting of the system.

Let’s delve deeper to understand why an Automotive ECU/Control Unit, should have software
re-programming capability.

Automotive ECUs (Control Units) support host of functionalities. These features and
 functionalities have grown to become more advanced and complex.

 It has become imperative for the Automotive OEMs’ and Suppliers to ensure that these
software-driven control units are always operating in a secure & efficient environment.

 This can be ensured only if the ECUs’ (control units), within your vehicle, have the latest and
updated version of the software and security patches.

Hence, the application software designed and ported on t h e M C U p l a t f o r m n e e d s t o b e


u p d a t e d quite frequently, either through a remote location or at the service station.

The Bootloader software, which occupies the ROM of the Electronic Control Unit, has been
entrusted with this responsibility of facilitating the E C U s o f t w a r e u p d a t e .

The following software architecture of a Bootloader Software will help you understand better,

H a p py ×
to Help!

1 of 6 10/17/2023, 01:25
Understanding What is Flash Bootloader | ECU Reprogramming [Link]

How Bootloader Software Makes Re-programming of an Automotive ECU, an


Efficient Process?

An F-35 fighter aircraft has approximately 5 . 7 m i l l i o n l i n e s o f c o d e and a Boeing 787 stands


at a little higher than 6 . 5 m i l l i o n l i n e s o f c o d e .

 But when on examining a luxury car, one would observe that it has close to 1 0 0 m i l l i o n l i n e s
of software code.

Thus, the firmware update of an Automotive ECU (Electronic Control Unit) becomes a tedious
 job, due to such huge volumes of software code.

A Bootloader Software is designed to automate this process of flash re-programming and


 managing the firmware update.

At every Boot-up of the System, the Bootloader software checks if the latest/updated version
of the ECU software is available.

If yes, then before the booting of the system, Bootloader software downloads and stores the
new updated version of the firmware. Post this the system boot-up is executed and system
now runs on the new version of the software in a completely secure environment.

Understanding how Firmware is Updated, using a Flash Bootloader: a Step-by-


Step Process Guide

A Flash Bootloader module is designed to update the firmware without the use of any
specialized hardware such as JTAG.

Following is the flowchart of the steps involved in ECU reprogramming using Flash Bootloader:

• The Flash Bootloader module is the first software module that gets activated during the
booting of the system (after the power supply of the device is switched on).

• The control is transferred to the Flash Bootloader, which checks for the updated version of
the firmware. If a new version is available, Flash Bootloader analyzes the update to
authenticate the source and cross-check all the pre-defined system security parameters. If the
authentication is successful then Bootloader Module writes the new updated on the flash
memory, at the target address.

• Next, the updated program is again verified to check the integrity and fidelity of the software
.If no anomaly is found, the control is transferred from the Flash Bootloader to the
Application. H a p py ×
to Help!

2 of 6 10/17/2023, 01:25
Understanding What is Flash Bootloader | ECU Reprogramming [Link]

All these steps, involved in the process of an ECU reprogramming, are performed by two
different parts of the Bootloader- the Primary and the Secondary Bootloader.

In the next section, we explain both of them.

Primary Bootloader: Microcontroller Unit Setup

After the microcontroller is reset, the control first comes to Primary Bootloader. This is the
part of the Bootloader software that initializes and sets up the MCU resources.

In the context of a CAN based Bootloader, the resources include the CAN protocol and the
CAN controller. The CAN controller is initiated to download the update, with the correct CAN
speed.

Any update transmitted over CAN BUS is identified by the CAN protocol and subsequent
actions are taken.

S e c o n d a r y B o o t l o a d e r : M i c ro c o n t ro l l e r Re p ro g r a m m i n g

Similar to the primary Bootloader that initializes various functionalities, there is another part
of the Bootloader software that gets active upon receiving the firmware update via the
communication medium. It is known as the Secondary Bootloader.

Essentially, this secondary Bootloader downloads the updated related to the target application
and reprograms the flash memory.

It has all the necessary flash routines and the UDS functions (if the Bootloader is UDS based)
that are necessary for storing the updated data on the flash memory.

 The Primary Bootloader transfers the control to the Secondary Bootloader, once the
application update is received.

 Next, the secondary Bootloader initializes F l a s h B u s I n t e r f a c e U n i t ( F B U I ) on the RAM


memory.. This enables the capability to read/write on the flash memory.

Immediately after this step, the communication over CAN is initialized again, so that the
 Bootloader is ready to receive the UDS request.

Post this, the update is stored in the flash memory. This is when the Secondary Bootloader is
erased from the RAM and control once again goes to the Primary Bootloader.

Role of UDS Software Stack in an Automotive ECU Reprogramming

According to the A U T O S A R S t a n d a r d , U n i f i e d D i a g n o s t i c s S e r v i c e s ( U D S ) is the most


suitable protocol for implementing Bootloader, for the purpose of ECU reprogramming.

There are multiple reasons for that and we would discuss them in detail in other UDS blogs.
For now, we will focus on the role played by UDS in a Bootloader operation.

Following are the key responsibilities of UDS in an ECU flashing operation:

1. UDS sets the server into a reprogramming mode and start the reprogramming sequence

2. It handles the initiation and termination of the data transfer

3. UDS takes care of size and order of data blocks to be sent/received and memory blocks
where the data will be stored

4. The UDS services allow the client to start or stop a routine, which may be running on the
server

5. It allows the client to initiate a software reset event on the server

UDS performs all these responsibilities with the help of certain software services. Some of
these services and their use in flashing in explained in the table below.
H a p py ×
to Help!

3 of 6 10/17/2023, 01:25
Understanding What is Flash Bootloader | ECU Reprogramming [Link]

How Remote ECU Flashing works, using a Specialized Flash Bootloader

In order to perform automotive control unit reprogramming, the vehicle has to be brought to
the garage where the service engineer will do the needful.

However, as the software used in vehicles is growing in the volume and complexity, numbers of
the software upgrades have also become more frequent.

In such scenarios, the OEMs cannot expect the vehicle owners to bring their car to the garage
frequently, for the ECU flashing. A Bootloader software enabled with remote update
capabilities over Ethernet is the key here.

With D o I P ( D i a g n o s t i c s o v e r I n t e r n e t P r o t o c o l ) , remote ECU update has become possible.


While the rest of the components and services are similar, usage of Ethernet as the medium for
communication, has made the remote update possible.

In simple terms, the firmware update that is transmitted over CAN, is sent over Ethernet using
a DoIP software stack.

The DoIP stack inside the Bootloader software identifies the message and the entire process of
ECU reprogramming is performed.

Whether based on DoIP or UDS, Flash Bootloader is a component that is indispensable, given
the importance of regular ECU updates.

And with the remote ECU update capabilities, it is going to be easy for the OEMs and other
automotive suppliers to ensure the robustness and safety of the software-driven Electronic
Control Units (ECU) in our vehicles.

 MAY 27 2019 SHARE:

 POPULAR TAGS

HEADS-UP DISPLAY IOT INFOTAINMENT

J1939 STACK AUTOSAR BOOT LOADER

MOBILITY ADAS TELEMATICS

Subscribe

RELATED POSTS

PREDICTIVE MAINTENANCE CASE- [VIDEO] WHAT IS A SCADA SYSTEM?


STUDIES FROM RAILWAY, ENERGY, OIL FIND YOUR ANSWERS IN THE ‘S’, ‘C’,
& MINERALS INDUSTRIES: THE AND ‘A’ OF A SCADA SOLUTION
CHALLENGES AND BENEFITS

ASK OUR EXPERTS

*Email

*Please mention your query here

H a p py ×
to Help!

4 of 6 10/17/2023, 01:25
Understanding What is Flash Bootloader | ECU Reprogramming [Link]

I agree to allow this website to store my submitted data. This data can be used only for responding to my query and/or send related information about technology
services and solutions.

Submit

FEATURED WHITEPAPER

12 design strategies to develop an "In-Vehicle Infotainment " system

Download

POPU LAR TAGS

HEADS-UP DISPLAY IOT INFOTAINMENT J1939 STACK AUTOSAR BOOT LOADER MOBILITY ADAS TELEMATICS

R E L A T E D S E RV I C E S

Car HUD (Heads-up Display)


Go-to-market in 6 months with our automotive grade hardware and software design

Automo�ve Control Units


Electronic Control Units (ECU) development services for Body Control Modules (BCM), Powertrain, Chassis and Infotainment

 AUTOSAR So�ware Services


AUTOSAR MCAL development, RTE and BSW integration, Application Layer development, Tools configuration and code generation


VIEW ALL

H a p py ×
to Help!

5 of 6 10/17/2023, 01:25
Understanding What is Flash Bootloader | ECU Reprogramming [Link]

CUS TOM ER SUCCESS STORI ES

J1939 Stack for advanced EPS system


Find out how J1939 stack resolved on-chip memory issue for an Automotive Tier-I supplier

So�ware re-engineering | Telema�cs applica�ons


Modular architecture re-design across fleet management product lines - GPS fleet security, vehicle and trailer tracking

IoT based Home Automa�on system


Design and development – Sensor Networks, Custom IoT gateway, Cloud and Mobile App

VIEW ALL

Reach Us News & Events Resource Center


Do you have any questions, Press Blog
suggestions or comments? Automotive Webinars Case Studies

sales@[Link] Digital Commerce Webinars Automotive Insights


IoT & Mobility Insights
India: +91 80 41694200 Digital Commerce Insights
Germany: +49 152 06 927 221 Automotive Whitepapers
USA: +1-248-385-2017 Digital Commerce Whitepapers
UK: +49 152 06 927 221

© 2023 Embitel. All Rights Reserved     

H a p py ×
to Help!

6 of 6 10/17/2023, 01:25

You might also like