# US 2026/0064527 A1 · Memory controller and mcu chip

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0064527 A1
- Document ID: US20260064527A1
- Status: Published application
- Kind: A1
- Application number: 19/297,069
- Filed: 2025-08-12
- Published: 2026-03-05
- Earliest claimed: 2024-08-29
- Assignees: Gigadevice Semiconductor Inc.
- Applicants: Gigadevice Semiconductor Inc.
- Inventors: Yang GAO
- Web page: https://patentgrep.com/patent/US20260064527A1

## CPC

- G06F 11/1044: {with specific ECC/EDC distribution}
- G06F 11/1048: {using arrangements adapted for a specific error detection or correction feature}
- G06F 11/1064: {in cache or content addressable memories}
- G06F 11/1446: Point-in-time backing up or restoration of persistent data
- G06F 11/1456: {Hardware arrangements for backup}
- G11C 29/52: Protection of memory contents; Detection of errors in memory contents
- G11C 2029/0411: {Online error correction}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G11C: STATIC STORES (semiconductor memory devices H10B)

## Abstract

A memory controller (MC) and a microcontroller unit (MCU) chip are disclosed. The MC is obtained by adding a smart load control (SLC) module to an MC architecture with an ECC logic module. When a CPU is reading contents from first memory, the ECC logic module can accurately identify soft failure locations and correct 1, 2 or more bit errors, and when errors exceeding the error correction ability of the ECC logic module, the SLC module can select a suitable error correction mode for handling the soft failures in the first memory based on conditions of different ECC errors and soft failure locations as well as on the system's error correction need.

## Claims

### Claim 1

A memory controller, coupled to a central processing unit (CPU), a first memory and a second memory, the first memory being associated with a higher soft-failure probability than the second memory, one of the first memory and the second memory being a main memory and the other one of the first memory and the second memory being configured to back up at least a part of contents in the main memory, wherein the memory controller comprises:
an error checking and correction (ECC) logic module, configured to, during reading of contents by the CPU from the first memory, perform an ECC on the contents from the first memory to detect and correct error contents from the first memory in real time, wherein in case of errors exceeding an error correction ability, a soft-failure induced ECC error occurs; and
a smart load controller (SLC) module, configured to select different error correction modes for handling the soft failures in the first memory based on conditions of different ECC errors obtained by the ECC logic module and soft failure locations, wherein the handling comprises overwriting and refreshing or invalidating the soft failure locations in the first memory,
wherein a required address range of said different error correction modes varies in size.

### Claim 2 (depends on 1)

The memory controller of claim 1, wherein a minimum range of the required address range is an address of the soft failure location, and wherein a maximum range of the required address range is an entire address space of the first memory.

### Claim 3 (depends on 1)

The memory controller of claim 1, wherein the SLC module is further configured to copy correct contents in the required address range of the selected error correction mode from the second memory into the first memory, to accomplish the overwriting and refreshing of the first memory.

### Claim 4 (depends on 1)

The memory controller of claim 1, wherein the memory controller, the first memory and the CPU are integrated in a single chip, wherein the first memory is an on-chip memory of the chip, and wherein the second memory is non-volatile and is an on-chip memory or an off-chip memory of the chip.

### Claim 5 (depends on 4)

The memory controller of claim 4, wherein the second memory is the main memory and the first memory is a cache that is read and written faster than the second memory, wherein the SLC module is further configured for at least one of:
(1) upon a power-on reset (POR) or a system reset, or when the CPU reads the first memory and a cache miss occurs, backing up corresponding contents in the second memory to the first memory and storing an ECC code corresponding to the backup contents in the first memory, wherein when the CPU is reading corresponding contents in the first memory, the ECC logic module performs an ECC on the contents read from the first memory by checking whether the ECC code is correct or not;
(2) when the first memory with automatic content reread capabilities, selecting a corresponding error correction mode and configuring the required address range of the corresponding error correction mode based on: a pre-configured error correction mode and the required address range thereof; or conditions of the ECC error and the soft failure locations, to invalidate contents in the required address range in the first memory based on the selected error correction mode, wherein the required address range contains the soft failure locations;
(3) when the first memory without automatic content reread capabilities, selecting a suitable error correction mode, based on conditions of the ECC error and the soft failure locations, to copy correct contents in the required address range of the selected error correction mode from the second memory into the first memory, thereby overwriting and refreshing the soft failure locations in the first memory, wherein the error correction modes comprises a precise mode, a partial refreshing mode and a reset mode, wherein in the precise mode, the required address range is the soft failure locations in the first memory, wherein in the partial refreshing mode, the required address range is fixed, or configured in adaptation to the conditions of the ECC error and the soft failure locations, wherein in the reset mode, a system reset is triggered to enable the overwriting and refreshing of contents in the first memory, and wherein in the reset mode, the required address range is larger than a maximum range of the required address range in the partial refreshing mode and smaller than or as large as an entire address space of the first memory.

### Claim 6 (depends on 5)

The memory controller of claim 5, wherein the first memory is a static random-access memory (SRAM).

### Claim 7 (depends on 6)

The memory controller of claim 6, wherein the first memory is an SRAM buffer or an SRAM cache for backing up at least a part of contents in the second memory, or wherein the first memory comprising: a buffer for backing up a part of contents in the main memory; and a cache for backing up contents outside an address range of the buffer.

### Claim 8 (depends on 7)

The memory controller of claim 7, wherein the SLC module is further configured for at least one of:
(1) in case of the first memory comprising the cache and the buffer, firstly determining which one of the cache and the buffer contains the soft failure locations;
(2) in case of the soft failure locations being in the cache, selecting a suitable error correction mode and configuring the required address range of the error correction mode based on: a pre-configured error correction mode and the required address range thereof; or conditions of the ECC error and the soft failure locations, to invalidate contents in the required address range in the cache, wherein the required address range contains the soft failure locations, and wherein the invalidated required address range is: at least one cache line containing the soft failure locations; or at least one cache set containing the soft failure locations; or at least one cache way containing the soft failure locations; or an entire cache;
(3) in case of the soft failure locations being in the buffer, selecting a suitable error correction mode based on the conditions of the ECC error and the soft failure locations, to copy correct contents in the required address range of the selected error correction mode from the second memory into the buffer, thereby overwriting and refreshing the soft failure locations in the buffer, wherein the selected error correction modes comprises a precise mode, a partial refreshing mode and a reset mode, wherein in the precise mode, the required address range is the soft failure locations in the buffer, wherein in the partial refreshing mode, the required address range is at least one of: a row in the buffer, that contains at least the soft failure locations, a column in the buffer, that contains at least the soft failure locations; a sector in the buffer, that contains at least the soft failure locations; a page in the buffer, that contains at least the soft failure locations; a cluster in the buffer, that contains at least the soft failure locations; and a block in the buffer, that contains at least the soft failure locations, and wherein in the reset mode, a system reset is triggered to enable the overwriting and refreshing of contents in the buffer, and wherein the required address range of the reset mode is larger than a maximum range of the required address range in the partial refreshing mode and smaller than or as large as an entire buffer.

### Claim 9 (depends on 8)

The memory controller of claim 8, wherein when the memory controller is coupled to the cache, the SLC module further comprises a cache controller, wherein the cache controller is configured to accomplish the invalidation of corresponding contents in the cache, and wherein when the CPU or other master device unit reads the cache through the cache controller and a cache miss occurs, the cache controller is configured to automatically reread corresponding correct contents from the second memory and replenishing the correct contents into the cache.

### Claim 10 (depends on 4)

The memory controller of claim 4, wherein the first memory is the main memory and is non-volatile and the second memory is configured to back up at least a part of contents in the main memory, wherein the first memory is read and written faster than the second memory, and wherein the SLC module is further configured for at least one of:
(1) upon a POR or a system reset, backing up contents in the first memory to the second memory and storing an ECC code corresponding to the backup contents in the second memory and/or the first memory, wherein when the CPU is reading corresponding contents in the first memory, the ECC logic module is configured to perform the ECC on the contents read from the first memory by checking whether the corresponding ECC code is correct or not;
(2) selecting a suitable error correction mode, based on conditions of the ECC error and the soft failure locations, to copy correct contents in the required address range of the selected error correction mode from the second memory into the first memory, thereby overwriting and refreshing the soft failure locations in the first memory, wherein the error correction modes comprises a precise mode, a partial refreshing mode and a reset mode, wherein in the precise mode, the required address range is the soft failure locations in the first memory, wherein in the partial refreshing mode, the required address range is fixed or configured in adaptation to the conditions of the ECC error and the soft failure locations, wherein in the reset mode, a system reset is triggered to enable the overwriting and refreshing of contents in the first memory, and wherein the required address range of the reset mode is larger than a maximum range of the required address range in the partial refreshing mode and smaller than or as large as an entire address space of the first memory.

### Claim 11 (depends on 10)

The memory controller of claim 10, wherein the first memory comprises at least one of ferroelectric random-access memory (FRAM), resistive random-access memory (RRAM), magnetoresistive random-access memory (MRAM) and phase-change random-access memory (PRAM).

### Claim 12 (depends on 5)

The memory controller of claim 5, wherein the SLC module is further configured to determine whether an accumulated ECC error count and/or a bit error count exceeds a preset threshold and, if so, the reset mode is selected, or otherwise the precise mode or the partial refreshing mode is selected.

### Claim 13 (depends on 5)

The memory controller of claim 5, wherein the SLC module is further configured, when the selected error correction mode is the reset mode or the partial refreshing mode, to configure the required address range of the selected error correction mode by configuring a start address and an end address of an address range of the first memory to be overwritten and refreshed based on requirements.

### Claim 14 (depends on 1)

The memory controller of claim 1, wherein the SLC module is further configured to, after the overwriting and refreshing of the first memory is completed, cause the CPU to reread corresponding contents from the first memory and to cause the ECC logic module to perform the ECC on the contents reread by the CPU.

### Claim 15 (depends on 1)

The memory controller of claim 1, further comprising at least one of:
an interrupt register, configured to interrupt the CPU in response to an occurrence of a soft-failure induced ECC error;
an address record logic register, configured to record an ECC error count, a bit error count and addresses of the soft failure locations in real time depending on an ECC conducted by the ECC logic module;
an SLC enable register, configured to activate the SLC module once the bit error count in the address record logic register exceeds the error correction ability of the ECC logic module;
a mode select register, configured to pre-configure or pre-select a suitable error correction mode for the SLC module based on conditions of different ECC errors and the soft failure locations, such that the SLC module handles the soft failures in the first memory using corresponding error correction mode according to conditions of the ECC error and the soft failure locations; and
an address configuration register, configured for writing therein of a start address and an end address of the first memory that are to be overwritten and refreshed or invalidated in the error correction mode based on relevant information recorded in the address record logic register and a system need for error correction.

### Claim 16

A microcontroller unit (MCU) chip comprising: a central processing unit (CPU), a first memory and a memory controller, which are integrated in a single chip package, wherein a second memory is disposed inside or outside the MCU chip and is coupled to the memory controller,
wherein the first memory is associated with a higher soft-failure probability than the second memory, wherein one of the first memory and the second memory is a main memory and the other one of the first memory and the second memory is configured to back up at least a part of contents in the main memory under control of the memory controller,
wherein the memory controller comprises:
an error checking and correction (ECC) logic module, configured to, during reading of contents by the CPU from the first memory, perform an ECC on the contents from the first memory to detect and correct error contents from the first memory in real time, wherein in case of errors exceeding an error correction ability, a soft-failure induced ECC error occurs; and
a smart load controller (SLC) module, configured to select different error correction modes for handling the soft failures in the first memory based on conditions of different ECC errors obtained by the ECC logic module and soft failure locations, wherein the handling comprises overwriting and refreshing or invalidating the soft failure locations in the first memory,
wherein a required address range of said different error correction modes varies in size.

### Claim 17 (depends on 16)

The MCU chip of claim 16, wherein a minimum range of the required address range is an address of the soft failure location, and wherein a maximum range of the required address range is an entire address space of the first memory.

### Claim 18 (depends on 16)

The MCU chip of claim 16, wherein the SLC module is further configured to copy correct contents in the required address range of the selected error correction mode from the second memory into the first memory, to accomplish the overwriting and refreshing of the first memory.

### Claim 19 (depends on 16)

The MCU chip of claim 16, wherein the first memory is an on-chip memory of the MCU chip, and wherein the second memory is non-volatile and is an on-chip memory or an off-chip memory of the MCU chip.

### Claim 20 (depends on 19)

The MCU chip of claim 19, wherein the second memory is the main memory and the first memory is a cache that is read and written faster than the second memory, wherein the SLC module is further configured for at least one of:
(1) upon a power-on reset (POR) or a system reset, or when the CPU reads the first memory and a cache miss occurs, backing up corresponding contents in the second memory to the first memory and storing an ECC code corresponding to the backup contents in the first memory, wherein when the CPU is reading corresponding contents in the first memory, the ECC logic module performs an ECC on the contents read from the first memory by checking whether the ECC code is correct or not;
(2) when the first memory with automatic content reread capabilities, selecting a corresponding error correction mode and configuring a required address range of the corresponding error correction mode based on: a pre-configured error correction mode and a required address range thereof; or conditions of the ECC error and the soft failure locations, to invalidate contents in the required address range in the first memory based on the selected error correction mode, wherein the required address range contains the soft failure locations;
(3) when the first memory without automatic content reread capabilities, selecting a suitable error correction mode, based on conditions of the ECC error and the soft failure locations, to copy correct contents in the required address range of the selected error correction mode from the second memory into the first memory, thereby overwriting and refreshing the soft failure locations in the first memory, wherein said error correction modes comprises a precise mode, a partial refreshing mode and a reset mode, wherein in the precise mode, the required address range is the soft failure locations in the first memory, wherein in the partial refreshing mode, the required address range is fixed, or configured in adaptation to the conditions of the ECC error and the soft failure locations, wherein in the reset mode, a system reset is triggered to enable the overwriting and refreshing of contents in the first memory, and wherein in the reset mode, the required address range is larger than a maximum range of the required address range in the partial refreshing mode and smaller than or as large as an entire address space of the first memory.
