# US 2025/0147772 A1 · Microcontroller unit, method, and computer program for changing applications

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

- Number: US 2025/0147772 A1
- Document ID: US20250147772A1
- Status: Published application
- Kind: A1
- Application number: 18/937,943
- Filed: 2024-11-05
- Published: 2025-05-08
- Earliest claimed: 2023-11-08
- Assignees: Hyundai Autoever Corp.
- Applicants: Hyundai AutoEver Corp.
- Inventors: Jae Hyun LIM
- Web page: https://patentgrep.com/patent/US20250147772A1

## CPC

- G06F 9/4401: Bootstrapping (security arrangements therefor G06F21/57)
- G06F 8/654: using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
- G06F 8/656: while running
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Devices and methods for changing applications in a microcontroller unit (MCU) are described. According to one embodiment, an MCU comprises a flash memory with a single partition comprising a first memory area for a boot manager, a second memory area for a first application, and a third memory area for a second application. The MCU also comprises a random access memory (RAM), where the boot manager is loaded, and a central processing unit (CPU) to lock interrupts for preventing an occurrence of Read-While-Write (RWW) for the flash memory when performing a re-programming for the second application while executing codes of the first application, to unlock the interrupts after the re-programming has been completed, and to cause the boot manager to activate the second application having a higher priority value when the MCU boots up, by recording the higher priority value for the second application.

## Claims

### Claim 1

A microcontroller unit (MCU), the MCU comprising:
a flash memory with a single partition comprising a first memory area for a boot manager, a second memory area for a first application, and a third memory area for a second application;
a random access memory (RAM) where the boot manager is loaded; and
a central processing unit (CPU) to lock interrupts for preventing an occurrence of Read-While-Write (RWW) for the flash memory when performing a re-programming for the second application while executing codes of the first application, to unlock the interrupts after the re-programming has been completed, and to cause the boot manager to activate the second application having a higher priority value when the MCU boots up, by recoding the higher priority value for the second application.

### Claim 2 (depends on 1)

The MCU of claim 1, wherein the CPU is configured to lock the interrupts for preventing the occurrence of the RWW before the recording the higher priority value for the second application.

### Claim 3 (depends on 1)

The MCU of claim 1, wherein the CPU is configured to conduct an integrity check for the second application, for which the re-programming has been completed, before the recording the higher priority value for the second application and, when the second application is determined to be normal in the integrity check, to record the higher priority value for the second application.

### Claim 4 (depends on 1)

The MCU of claim 1, wherein, when locking the interrupts, the CPU is configured to transmit, to a superior application through communication, a signal indicating that the interrupts are locked.

### Claim 5 (depends on 1)

The MCU of claim 1, wherein, when locking the interrupts, the CPU is configured to inactivate a watchdog function.

### Claim 6 (depends on 1)

The MCU of claim 1, wherein the CPU is configured to read priority values in predetermined locations of the first application and the second application and to compare the priority values to activate one of the first application and the second application which has a higher priority value.

### Claim 7 (depends on 6)

The MCU of claim 6, wherein, when the priority value of the one of the first application and the second application is determined to be invalid, the CPU is configured to activate the other application.

### Claim 8 (depends on 1)

The MCU of claim 1, wherein priority values are recorded in variables, each of the priority values having a size smaller than or equal to a size of a page unit in each of the first application and the second application.

### Claim 9 (depends on 1)

The MCU of claim 1, wherein each of the first application and the second application is configured to store a plurality of priority value variables, and wherein the CPU is configured to sequentially record the plurality of priority values in variables where the plurality of priority values has not been recorded.

### Claim 10 (depends on 9)

The MCU of claim 9, wherein the CPU is configured to scan the plurality of priority value variables and to determine a highest priority value as a priority value of a corresponding one of the first application the second application.

### Claim 11

A microcontroller unit (MCU), the MCU comprising:
a flash memory with a single partition comprising a first memory area for a boot manager, a second memory area for a first application, and a third memory area for a second application;
a random access memory (RAM) where the boot manager is loaded; and
a central processing unit (CPU) to verify a priority value for the first application when a roll-back to the second application is requested while executing codes of the first application, to lock interrupts for preventing an occurrence of Read-While-Write (RWW) for the flash memory, to record a priority value for the second application to be higher than the priority value for the first application, to unlock the interrupts, and to cause the boot manager to activate the second application having a higher priority value when the MCU boots up.

### Claim 12 (depends on 11)

The MCU of claim 11, wherein the flash memory is configured to be erased by block and be written by page, and wherein a priority value of each of the first application and the second application has a size smaller than or equal to a size of a page unit.

### Claim 13 (depends on 11)

The MCU of claim 11, wherein each of the first application and the second application is configured to store a plurality of priority value variables, and wherein the CPU is configured to sequentially record the plurality of priority values in variables where the plurality of priority values has not been recorded.

### Claim 14 (depends on 13)

The MCU of claim 13, wherein the CPU is configured to scan the plurality of priority value variables and to determine a highest priority value as a priority value of a corresponding one of the first application and the second application.

### Claim 15 (depends on 11)

The MCU of claim 11, wherein, when locking the interrupts, the CPU is configured to transmit, to a superior application through communication, a signal indicating that the interrupts are locked.

### Claim 16 (depends on 11)

The MCU of claim 11, wherein, when locking the interrupts, the CPU is configured to inactivate a watchdog function.

### Claim 17

A method for changing applications in a microcontroller unit (MCU), the method including operations or steps of:
loading a boot manager located in a first memory area of a flash memory with a single partition to execute the boot manager;
verifying, by the boot manager, priority values in predetermined locations of a first application in a second memory area of the flash memory and a second application in a third memory area of the flash memory;
comparing, by the boot manager, a priority value of the first application and a priority value of the second application to activate one of the first application and the second application having a higher priority value;
locking interrupts for preventing an occurrence of Read-While-Write (RWW) for the flash memory while the first application is executed and unlocking the interrupts after having recorded the priority value of the second application to be higher than the priority value of the first application; and
activating, by the boot manager, the second application having the higher priority value when the MCU boots up.

### Claim 18 (depends on 17)

The method of claim 17, further comprising an operation or step of locking the interrupts before the priority value of the second application is recorded to be higher, and subsequently unlocking the interrupts after a re-programming for the second application has been completed.

### Claim 19 (depends on 17)

The method of claim 17, further comprising an operation or step of requesting a roll-back to the second application before the priority value of the second application is recorded to be higher.

### Claim 20

A non-transitory computer-readable medium, comprising a set of instructions stored thereon, that when executed by a processor, perform a method comprising:
loading a boot manager located in a first memory area of a flash memory with a single partition to execute the boot manager;
verifying priority values in predetermined locations of a first application in a second memory area of the flash memory and a second application in a third memory area of the flash memory;
comparing a priority value of the first application and a priority value of the second application to activate one of the first application and the second application having a higher priority value;
locking interrupts for preventing an occurrence of Read-While-Write (RWW) for the flash memory while the first application is executed and unlocking the interrupts after having recorded the priority value of the second application to be higher than the priority value of the first application; and
activating the second application having the higher priority value when a system boots up.
