Microcontroller Security Data Update Using Dual Memory Sectors
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for updating security data in microcontroller memories lack robustness against power failures or resets, potentially leading to data loss or corruption.
Innovation Solution
A method involving the erasure and rewriting of security data to a secondary sector, with a state machine ensuring data integrity by copying valid data before sector status change, and a software command managing sector status transitions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If security data is updated in place in a single memory sector, then the update process is simple and fast, but the system is vulnerable to power failures causing data loss or corruption
Solution Approach 1:
The memory is divided into multiple sectors (first sector and second sector) that can be independently managed. Security data is stored in one sector while updates are performed in another, allowing the system to segment the storage space to prevent single-point failures and enable rollback capabilities.
Solution Approach 2:
Before updating security data in the first sector, the system performs preliminary actions by erasing and preparing the second sector in advance. This preliminary preparation ensures that a valid backup sector is ready before the update occurs, protecting against data loss if the update fails.
Solution Approach 3:
The system copies security data between sectors during updates. The second sector serves as a backup copy of the first sector, and vice versa. This copying mechanism ensures data redundancy and allows the system to restore from a known good state if an update fails.
2Reliability
If the system uses multiple memory sectors for security data storage with status tracking, then robustness against power failures is improved, but the memory management complexity increases
Solution Approach 1:
The system merges the functionality of data storage and status tracking into a unified sector structure. Each sector contains both the security data and its associated status information, allowing the controller to manage sectors as complete units rather than separate components, thereby reducing management complexity.
Solution Approach 2:
The memory controller automatically manages sector status transitions and data copying between sectors without requiring external intervention. The system self-services by autonomously handling the complexity of multi-sector management, including erasing, writing, and status assignment, thereby shielding the user from the underlying complexity.
3Reliability
If security data is copied sequentially from the first sector to the second sector before status change, then data integrity is ensured, but the update time increases
Solution Approach 1:
The sequential copying of security data is performed in periodic stages rather than as a single continuous operation. The state machine executes copy operations for individual data items or groups of items in sequence, allowing intermediate states to be managed and potentially aborted if errors occur, thereby balancing integrity requirements with time efficiency.
Solution Approach 2:
The manual or software-controlled sequential copying process is replaced with a hardware-based state machine that automatically performs the copying operations. This substitution eliminates the overhead of software management and optimizes the copying speed through dedicated hardware logic, reducing the time penalty while maintaining data integrity.
Data Source
AI summary
The present description concerns a method of updating a security data stored in a first sector of a non-volatile memory of a microcontroller, with a first status being assigned to the first sector. The method comprises the following successive steps: erasing the content of a second sector of the non-volatile memory, different from the first sector, writing a new version of the security data into the second sector, and assigning the first status to the second sector.


