MCU Flash Bootloader Recovery for ECC Error Loops

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Infinite repetition occurs between power-on and application key reading processes due to CPU core exceptions caused by ECC errors when an application key is erased or written, leading to damage and software reset in flash memory systems.

Innovation Solution

A microcontroller unit (MCU) with flash memory configured to determine application key values and enter a reprogramming mode when invalid, allowing reprogramming and writing of valid key values, including a flash bootloader, application block, and application key block to manage reprogramming requests and ECC errors.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the application key is erased or written in flash memory, then the flash memory can be reprogrammed with new application data, but CPU core exceptions occur due to ECC errors causing infinite repetition between power-on and key reading processes

Engineering Contradiction:
Improvereprogramming capabilityVSAvoidsystem stability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The system performs preliminary validation of the application key before attempting to execute application code. The flash bootloader reads and validates the application key stored in flash memory before transferring control to the application block. This preliminary action prevents the system from entering an infinite loop state by ensuring the key is valid before proceeding with application execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The flash bootloader acts as an intermediary between the power-on event and the application execution. It mediates the transition by validating the application key and determining whether to proceed with application execution or remain in bootloader mode. This intermediary layer prevents direct execution of potentially corrupted or unauthorized applications, thereby maintaining system stability during reprogramming operations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If the flash memory enters reprogramming mode to write new application data, then new applications can be installed, but the application key becomes invalid requiring revalidation

Engineering Contradiction:
Improveapplication update capabilityVSAvoidrevalidation cycle time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The system maintains continuous operation by keeping the flash bootloader resident in memory throughout the reprogramming process. Instead of resetting or losing the bootloader during application updates, it remains active and continues to provide validation services. This continuity eliminates the need for repeated full system resets and revalidation cycles, reducing time loss while enabling application updates.

Inventive Principle:
Principle #20Continuity of useful action

Solution Approach 2:

The flash bootloader performs self-validation and automatically manages the reprogramming process. When new application data is written to flash memory, the bootloader automatically detects the update, validates the new application key, and transitions to the updated application without requiring external intervention or manual revalidation. This self-service capability reduces the time and complexity associated with application updates.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11899951B2Error restoring method, microcontroller unit using the same, and battery device including the microcontroller unit
Publication Date: 2024.02.13 LG ENERGY SOLUTION LTD
  • US11899951B2 patent drawing
  • US11899951B2 patent drawing
  • US11899951B2 patent drawing

AI summary

A micro controller unit (MCU) includes a flash memory, wherein the flash memory determines a key value of an application when the MCU is powered on, and, when the key value of the application is invalid, the flash memory enters a mode that enables reprogramming of the flash memory.