Bootloader Firmware Update Validation via CRC Checksum
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for reprogramming embedded devices, such as power supply systems and sensors, face challenges like data corruption, power outages, and malfunction during firmware updates, which can result in device failure due to inadequate validation and communication management.
Innovation Solution
A method using a bootloader to validate application code by calculating checksums (CRC16) during transmission and storage, ensuring integrity and completeness, and allowing for repeated transmission or aborting the procedure if errors are detected, with validation occurring before and after writing to non-volatile memory.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If classical external programming devices are used to update firmware, then reprogramming can be performed, but the device must be physically removed and service interruptions occur
Solution Approach 1:
The device performs firmware updates autonomously through its own bootloader without requiring external programming devices or physical removal. The bootloader executes self-updating operations by receiving new firmware through communication channels and validating it using checksum verification, enabling the device to service itself without external intervention or downtime.
2Ease of operation
If bootloader is used for remote firmware updates, then physical intervention is eliminated, but data corruption and device malfunction risks increase
Solution Approach 1:
The bootloader performs preliminary checksum validation on received firmware data before writing it to non-volatile memory. By calculating and verifying the checksum of the incoming firmware in advance, the system ensures data integrity before the actual update occurs, preventing corruption and ensuring reliable remote updates.
Solution Approach 2:
The system implements feedback mechanisms where the bootloader validates firmware integrity through checksum verification and can detect transmission errors. This feedback loop allows the system to identify corrupted data and prevent malformed firmware from being written to memory, thereby maintaining update reliability during remote operations.
3Reliability
If firmware validation is performed during reprogramming, then data integrity is ensured, but additional processing time is required
Solution Approach 1:
The checksum validation is performed preliminarily on the received firmware data before it is written to non-volatile memory. By validating the data in advance during the reception phase, the system ensures that only intact firmware is stored, eliminating the need for post-writing validation and optimizing the overall update process timing.
Data Source
Figure 1~2
Figure 3A~3D
Figure 3E~3F
AI summary
A method for uploading and storing an application code in a rewritable non-volatile memory of an electronic device by means of a bootloader is described. The method comprises the following phases: receiving said application code transmitted by a master unit through a communication channel; writing said application code to a portion of said non-volatile memory; validating at least a portion of the application code by means of the bootloader.