Microcontroller Bootloader Update Using Secondary Loader Backup
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing bootloader update mechanisms for microcontrollers are prone to corruption due to power loss, require complex power management, introduce security vulnerabilities, and are hardware-dependent, leading to system complexity and compatibility issues.
Innovation Solution
A bootloader update mechanism that allows updating the bootloader without tampering with existing write access restrictions, using a secondary bootloader software stored in a separate memory area to overwrite the current bootloader software, ensuring resilience against power loss and simplifying the update process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If write access is restricted to the memory area storing main application firmware to prevent corruption, then security and integrity are improved, but firmware updates become hindered
Solution Approach 1:
The memory is segmented into a first memory area for storing the main application firmware with restricted write access, and a second memory area for storing the bootloader update software with permitted write access. This segmentation allows firmware updates to proceed without compromising the integrity of the main application firmware, as the update process occurs in the isolated second memory area.
2Ease of manufacture
If traditional bootloader update mechanisms are used, then firmware updates can be performed, but the system becomes vulnerable to power loss corruption and hardware dependency
Solution Approach 1:
The bootloader update software acts as an intermediary that facilitates safe bootloader updates by first copying the current bootloader to a backup location, then writing the new bootloader to the restricted memory area. This intermediary mechanism ensures that if power is lost during the update process, the system can recover using the backup bootloader, thereby eliminating vulnerability to power loss corruption.
3Reliability
If complex power management mechanisms are implemented to protect against power loss during updates, then reliability is improved, but device complexity increases
Solution Approach 1:
Before writing the new bootloader to the restricted memory area, the system performs preliminary actions by copying the current bootloader to a backup location in the second memory area. This preliminary backup is created before any potentially risky write operations occur, ensuring that if power is lost during the update, the system can automatically recover using the pre-prepared backup without requiring complex power management mechanisms.
Data Source
Figure 1A
Figure 1B~2
Figure 3~4
AI summary
A microcontroller device including: a non-volatile memory including: a restricted memory area configured to store a first bootloader software to load a firmware; and a further memory area configured to store a loader update software and a second bootloader software; a logic configured to: identify, before an execution of the first bootloader software, the second bootloader software within the further memory area; and execute the loader update software to overwrite the second bootloader software into the restricted memory area.