Microcontroller Security Data Update Using Sector Status Swapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current update procedures for microcontroller security data in non-volatile memories are vulnerable to data loss due to power failures or resets, leading to potential corruption or loss of security data.

Innovation Solution

A method involving successive steps of erasing the contents of a second non-volatile memory sector, writing a new version of the security data to the second sector, and assigning the first status to the second sector, with additional steps to ensure data integrity during power outages or resets, including copying valid data before erasure and status swapping.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If current update procedures are used to update security data in non-volatile memory, then the update process is simple, but the system is vulnerable to data loss during power failures or resets

Engineering Contradiction:
Improvedata integrityVSAvoidupdate process complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The memory is divided into multiple sectors (first sector containing current security data, second sector for updated data). This segmentation allows the system to maintain separate working copies of security data, enabling safe updates without risking complete data loss. The status register tracks which sector is active, providing a structured approach to data management that improves reliability while keeping the update process manageable.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary actions by writing updated security data to the second sector before switching the status register to point to it. This preliminary writing step ensures that valid security data exists in the target sector before making it active, preventing data loss even if power fails during the update process. The status register swap is the final atomic operation that completes the update safely.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If security data is updated in place without backup sector, then the update process is fast, but power failure causes data corruption

Engineering Contradiction:
Improvedata validityVSAvoidupdate cycle time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system creates a copy of security data in the second sector before activating it. The status register stores the address of the valid security data sector, allowing the system to switch between copies atomically. This copying mechanism ensures data validity because the updated copy is fully written before becoming active, while the original remains intact as a backup until the swap is complete.

Inventive Principle:
Principle #26Copying

3Reliability

If multiple status registers are used to track sector validity, then data integrity is improved, but processing overhead increases

Engineering Contradiction:
Improvesector status trackingVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system extracts the sector address information from complex multi-register status tracking and consolidates it into a single status register that stores only the address of the valid security data sector. This extraction simplifies the status tracking mechanism while maintaining reliability, as the single register provides all necessary information to identify the active sector without the overhead of multiple status indicators.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP4657301A1Method for updating a security data stored in a memory of a microcontroller
Publication Date: 2025.12.03 STMICROELECTRONICS INT NV
  • EP4657301A1 patent drawingFigure 1
  • EP4657301A1 patent drawingFigure 2
  • EP4657301A1 patent drawingFigure 3

AI summary

This description relates to a method for updating a security data (Key 20) stored in a first sector (200) of a non-volatile memory (104) of a microcontroller (100), a first status (OBK_Sel_1, OBK_Sel_2) being assigned to the first sector (200), the method comprising the following successive steps: - erase (alternate_OBK_erase) the contents of a second sector (220) of the non-volatile memory, different from the first sector (200), - write a new version of the security data (Key 20 update) in the second sector (220); and - assign the first status (OBK_Sel_1, OBK_Sel_2) to the second sector (220).