ECU Flash Programming
A Flash Bootloader module is designed to update the firmware without using of any specialized hardware such as JTAG. 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).
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.
Secondary Bootloader: Microcontroller Reprogramming
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 updates 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 Flash Bus Interface Unit (FBUI) 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.
Recommended by LinkedIn
Role of UDS Software Stack in an Automotive ECU Reprogramming
According to the AUTOSAR Standard, Unified Diagnostics Services (UDS) is the most suitable protocol for implementing Bootloader, for the purpose of ECU reprogramming.
Following are the key responsibilities of UDS in an ECU flashing operation:
Thanks Vikesh for informative article! here is a question I have - is SBL meant to play the role only for the ECU reprogramming? In other words does SBL not executed if there is not a reprogramming request? Thanks in advance!
Good one Vikesh ! May be in next write up, try to bring Ethernet as well. Keep going
Are you in any need for electronic components?