Upgrading method and device for micro-control unit of vehicle and electronic equipment

By setting effective area identification information in the vehicle microcontroller unit, the problem of inability to ensure business continuity during the OTA upgrade process is solved, and the MCU can effectively control other components of the vehicle during the upgrade process.

CN119556952APending Publication Date: 2025-03-04CHINA AUTOMOTIVE INNOVATION CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411701598.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

During the OTA upgrade of the vehicle microcontroller unit, the business continuity of other components cannot be guaranteed, resulting in the MCU being unable to effectively control other components of the vehicle during the upgrade process.

Method used

By setting valid area identification information, the control program in the area to be run based on these identification information, and at the same time, the control program in the area to be upgraded, and after the upgrade is successful, switch to running the most recent version of the control program to ensure the continuous operation of the MCU.

Benefits of technology

It realizes the control of other components of the vehicle during the MCU upgrade process, ensures business continuity, and solves the problem that the MCU cannot effectively control other components during the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119556952A_ABST
    Figure CN119556952A_ABST
Patent Text Reader

Abstract

The invention discloses an upgrading method and device for a micro-control unit of a vehicle and electronic equipment, and the method comprises the steps: obtaining effective region identification information in response to a control program upgrading instruction; the partition, matched with the effective area identification information, in the first partition and the second partition is determined as a to-be-operated area, and the other partition is determined as a to-be-upgraded area; controlling the control program stored in the to-be-run area to start running; updating a control program stored in the to-be-upgraded area according to control program updating information corresponding to the control program upgrading instruction to obtain a target control program; and under the condition that the target control program runs normally, switching to run the target control program, and updating the effective area identification information. The control program of the to-be-run area is run based on the effective area identification information, the control program of the to-be-upgraded area is upgraded at the same time, and the control program of the latest version is switched to run after upgrading succeeds, so that the problem of how to enable the MCU to control other components in the upgrading process is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a method, device, and electronic device for upgrading a microcontroller unit of a vehicle. Background Art

[0002] In the field of vehicle technology, "intelligence, connectivity, electrification, and sharing" have become inevitable trends in the automotive industry's transformation. Automotive products are gradually evolving from traditional mechanical means of transportation to a new generation of intelligent terminals with sensing and decision-making capabilities. The domain controller (DC) within the vehicle assumes key functions of these four new trends, processing various sensor data, controlling vehicle functions, and enabling intelligent operation. Automotive DCs typically upgrade various components via OTA (Over-the-Air) technology, with upgrades of the MCU (Micro Controller Unit) being particularly important, as the MCU, to a certain extent, assumes control of other components.

[0003] In existing technologies, OTA upgrades to the MCU require disconnecting communications with other vehicle components, making it impossible to guarantee service continuity for these components. Therefore, ensuring that the MCU maintains control of the vehicle while other components remain unaware of the upgrade is crucial. Ensuring that the MCU maintains control of other vehicle components during the upgrade process is a pressing issue. Summary of the Invention

[0004] In order to solve the problems of the prior art, the present application provides a method, device and electronic device for upgrading a microcontroller unit of a vehicle. By setting valid area identification information, the control program of the area to be run is run based on the valid area identification information, and the control program of the area to be upgraded is upgraded at the same time. After the upgrade is successful, it switches to running the latest version of the control program, ensuring the continuous operation of the MCU during the upgrade process, and solving the problem of how to enable the MCU to ensure control of other components of the vehicle during the upgrade process.

[0005] According to one aspect of the present application, a method for upgrading a microcontroller unit of a vehicle is provided, wherein the microcontroller unit includes a first partition and a second partition, wherein the first partition is used to store a first control program of the microcontroller unit, and the second partition is used to store a second control program of the microcontroller unit. The method includes:

[0006] In response to a control program upgrade instruction, obtaining valid area identification information;

[0007] Determine the partition of the first partition and the second partition that matches the valid area identification information as a waiting-for-operation area, and determine the partition of the first partition and the second partition other than the target partition as a waiting-for-upgrade area;

[0008] Controlling the control program stored in the waiting-to-run area to start running;

[0009] Based on the control program upgrade instruction, obtaining control program update information;

[0010] updating the control program stored in the area to be upgraded according to the control program update information to obtain a target control program;

[0011] Testing the running state of the target control program to obtain a running test result;

[0012] When the operation test result indicates that the target control program is running normally, the operation is switched to the target control program stored in the area to be upgraded, and the valid area identification information is updated.

[0013] In a possible implementation, the micro control unit includes a data storage area, wherein the data storage area stores the valid area identification information.

[0014] The obtaining of valid area identification information in response to the control program upgrade instruction includes:

[0015] In response to the control program upgrade instruction, running a startup program of the micro control unit;

[0016] reading the valid area identification information from the data storage area based on the startup program;

[0017] Accordingly, the updating of the valid area identification information includes:

[0018] The updated valid area identification information is written into the data storage area.

[0019] In a possible implementation, determining a partition in the first partition and the second partition that matches the valid area identification information as a waiting-for-operation area, and determining a partition in the first partition and the second partition other than the target partition as a waiting-for-upgrade area includes:

[0020] Querying a pre-built identification information database based on the valid area identification information to obtain an address of the waiting area corresponding to the valid area identification information;

[0021] Perform matching based on the address of the waiting area to be run to obtain a matching result;

[0022] If the matching result indicates that the address of the waiting area matches the address of the first partition, determining the first partition as the waiting area, and determining the waiting area to be upgraded as the second partition;

[0023] If the matching result indicates that the address of the to-be-run area matches the address of the second partition, the second partition is determined to be the to-be-run area, and the to-be-upgraded area is determined to be the first partition.

[0024] In one possible implementation, the method for constructing the identification information database includes:

[0025] Setting identification information of partitions corresponding to the first control program and the second control program based on the running status of the first control program and the second control program;

[0026] If the running states of both the first control program and the second control program are not upgraded, setting the identification information to the first identification information;

[0027] If the running state of the first control program meets the preset waiting-to-run condition, setting the identification information to second identification information;

[0028] If the running state of the first control program meets the preset flashing condition, setting the identification information to third identification information;

[0029] If the control program last run is the first control program of the first partition, setting the identification information to fourth identification information;

[0030] If the running state of the second control program meets the preset waiting-to-run condition, setting the identification information to fifth identification information;

[0031] If the running state of the second control program meets the preset flashing condition, setting the identification information to sixth identification information;

[0032] If the control program last run is the second control program of the second partition, setting the identification information to seventh identification information;

[0033] Determine, according to the identification information, an address of the waiting-for-operation area corresponding to the identification information;

[0034] The identification information library is constructed based on the relationship between the identification information and the address of the waiting-to-run area corresponding to the identification information.

[0035] In a possible implementation, determining, according to the identification information, an address of the to-be-run area corresponding to the identification information includes:

[0036] In a case where the identification information is the first identification information, determining the address of the to-be-run area corresponding to the first identification information as the address of the first partition;

[0037] In a case where the identification information is the second identification information, determining the address of the to-be-run area corresponding to the second identification information as the address of the first partition;

[0038] In a case where the identification information is the third identification information, determining that the address of the waiting area corresponding to the third identification information is the address of the first partition;

[0039] In a case where the identification information is the fourth identification information, determining that the address of the to-be-run area corresponding to the fourth identification information is the address of the first partition;

[0040] In a case where the identification information is the fifth identification information, determining the address of the waiting area corresponding to the fifth identification information as the address of the second partition;

[0041] In a case where the identification information is the sixth identification information, determining that the address of the waiting area corresponding to the sixth identification information is the address of the second partition;

[0042] In a case where the identification information is the seventh identification information, the address of the to-be-run area corresponding to the seventh identification information is determined to be the address of the second partition.

[0043] In a possible implementation, updating the valid area identification information includes:

[0044] In a case where the normally running target control program is stored in the first partition, updating the valid area identification information to the fourth identification information;

[0045] In a case where the normally running target control program is stored in the second partition, the valid area identification information is updated to the seventh identification information.

[0046] In a possible implementation, the valid area identification information includes the address of the waiting area.

[0047] The controlling the control program stored in the waiting-to-run area to start running includes:

[0048] When the address of the waiting-for-execution area is the address of the first partition, executing the first control program of the first partition;

[0049] When the address of the to-be-run area is the address of the second partition, the second control program of the second partition is run.

[0050] In a possible implementation, the method further includes:

[0051] When the operation test result indicates that the target control program is operating abnormally, the control program stored in the waiting-to-operate area is kept operating, and the valid area identification information is kept unchanged.

[0052] In another aspect, a device for upgrading a microcontroller unit of a vehicle is provided, wherein the microcontroller unit includes a first partition and a second partition, wherein the first partition is used to store a first control program of the microcontroller unit, and the second partition is used to store a second control program of the microcontroller unit. The device includes:

[0053] an identification information acquisition module, configured to acquire valid area identification information in response to a control program upgrade instruction;

[0054] an area determination module, configured to determine a area among the first area and the second area that matches the valid area identification information as an area to be run, and to determine an area among the first area and the second area other than the target area as an area to be upgraded;

[0055] A control program running module, used for controlling the control program stored in the waiting-to-run area to start running;

[0056] An update information acquisition module, configured to acquire control program update information based on the control program upgrade instruction;

[0057] A program updating module, configured to update the control program stored in the to-be-upgraded area according to the control program updating information to obtain a target control program;

[0058] A program testing module, used to test the running status of the target control program to obtain a running test result;

[0059] The program switching module is configured to switch to running the target control program stored in the area to be upgraded and update the valid area identification information when the running test result indicates that the target control program runs normally.

[0060] In a possible implementation, the micro control unit includes a data storage area, wherein the data storage area stores the valid area identification information.

[0061] The identification information acquisition module is used to:

[0062] In response to the control program upgrade instruction, running a startup program of the micro control unit;

[0063] reading the valid area identification information from the data storage area based on the startup program;

[0064] Accordingly, the program switching module includes:

[0065] The updated valid area identification information is written into the data storage area.

[0066] In a possible implementation, the region determination module is configured to:

[0067] Querying a pre-built identification information database based on the valid area identification information to obtain an address of the waiting area corresponding to the valid area identification information;

[0068] Perform matching based on the address of the waiting area to be run, and obtain a matching result;

[0069] If the matching result indicates that the address of the waiting area matches the address of the first partition, determining the first partition as the waiting area, and determining the waiting area to be upgraded as the second partition;

[0070] If the matching result indicates that the address of the to-be-run area matches the address of the second partition, the second partition is determined to be the to-be-run area, and the to-be-upgraded area is determined to be the first partition.

[0071] In a possible implementation, the apparatus further includes an identification information database construction module, wherein the identification information database construction module is configured to:

[0072] Setting identification information of partitions corresponding to the first control program and the second control program based on the running status of the first control program and the second control program;

[0073] If the running states of both the first control program and the second control program are not upgraded, setting the identification information to the first identification information;

[0074] If the running state of the first control program meets the preset waiting-to-run condition, setting the identification information to second identification information;

[0075] If the running state of the first control program meets the preset flashing condition, setting the identification information to third identification information;

[0076] If the control program last run is the first control program of the first partition, setting the identification information to fourth identification information;

[0077] If the running state of the second control program meets the preset waiting-to-run condition, setting the identification information to fifth identification information;

[0078] If the running state of the second control program meets the preset flashing condition, setting the identification information to sixth identification information;

[0079] If the control program last run is the second control program of the second partition, setting the identification information to seventh identification information;

[0080] Determine, according to the identification information, an address of the waiting-for-operation area corresponding to the identification information;

[0081] The identification information library is constructed based on the relationship between the identification information and the address of the waiting-to-run area corresponding to the identification information.

[0082] In a possible implementation, the identification information database construction module is further used to:

[0083] In a case where the identification information is the first identification information, determining the address of the to-be-run area corresponding to the first identification information as the address of the first partition;

[0084] In a case where the identification information is the second identification information, determining the address of the to-be-run area corresponding to the second identification information as the address of the first partition;

[0085] In a case where the identification information is the third identification information, determining that the address of the waiting area corresponding to the third identification information is the address of the first partition;

[0086] In a case where the identification information is the fourth identification information, determining that the address of the to-be-run area corresponding to the fourth identification information is the address of the first partition;

[0087] In a case where the identification information is the fifth identification information, determining the address of the waiting area corresponding to the fifth identification information as the address of the second partition;

[0088] In a case where the identification information is the sixth identification information, determining that the address of the waiting area corresponding to the sixth identification information is the address of the second partition;

[0089] In a case where the identification information is the seventh identification information, the address of the to-be-run area corresponding to the seventh identification information is determined to be the address of the second partition.

[0090] In a possible implementation, the program switching module is configured to:

[0091] In a case where the normally running target control program is stored in the first partition, updating the valid area identification information to the fourth identification information;

[0092] In a case where the normally running target control program is stored in the second partition, the valid area identification information is updated to the seventh identification information.

[0093] In a possible implementation, the valid area identification information includes the address of the waiting area.

[0094] The control program running module is used to:

[0095] When the address of the waiting-for-execution area is the address of the first partition, executing the first control program of the first partition;

[0096] When the address of the to-be-run area is the address of the second partition, the second control program of the second partition is run.

[0097] In a possible implementation, the program switching module is further configured to:

[0098] When the operation test result indicates that the target control program is operating abnormally, the control program stored in the waiting-to-operate area is kept running, and the valid area identification information is kept unchanged.

[0099] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for upgrading the microcontroller unit of a vehicle according to any of the above aspects.

[0100] On the other hand, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement a method for upgrading a microcontroller unit of a vehicle as described in any of the above aspects.

[0101] In another aspect, a computer program product or computer program is provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the method for upgrading a micro-control unit of a vehicle according to any of the above aspects.

[0102] The embodiment of the present application obtains valid area identification information in response to a control program upgrade instruction; determines the partition in the first partition and the second partition that matches the valid area identification information as a waiting area, and determines the partition in the first partition and the second partition other than the target partition as a waiting area for upgrade; controls the control program stored in the waiting area to start running; obtains control program update information based on the control program upgrade instruction; updates the control program stored in the waiting area for upgrade according to the control program update information to obtain a target control program; tests the running status of the target control program to obtain a running test result; and switches to running the target control program stored in the waiting area for upgrade and updates the valid area identification information when the running test result indicates that the target control program is running normally. By setting the valid area identification information, running the control program in the waiting area for operation based on the valid area identification information, and upgrading the control program in the waiting area for upgrade at the same time, switching to running the latest version of the control program after the upgrade is successful, ensuring the continuous operation of the MCU during the upgrade process, and solving the problem of how to ensure the MCU to control other components of the vehicle during the upgrade process. BRIEF DESCRIPTION OF THE DRAWINGS

[0103] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0104] Figure 1 This is a flow chart of a method for upgrading a micro control unit of a vehicle provided in an embodiment of the present application;

[0105] Figure 2 This is a block diagram of an OTA upgrade framework for an MCU provided in an embodiment of the present application;

[0106] Figure 3 1 is a flow chart of a method for determining a waiting-for-operation area and a waiting-for-upgrade area provided in an embodiment of the present application;

[0107] Figure 4 This is a flowchart of a method for upgrading a micro control unit of a vehicle provided in an embodiment of the present application;

[0108] Figure 5 This is a structural block diagram of an upgrading device for a micro control unit of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION

[0109] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0110] The automotive domain controller (DCU) is the core of each functional domain in a vehicle. It primarily consists of three parts: a domain master processor, an operating system, and application software and algorithms. Leveraging a high-performance domain master processor, a rich hardware interface library, and powerful software features, the domain controller improves system integration. Combined with standardized interfaces for data exchange, it effectively reduces development and manufacturing costs.

[0111] Automotive domain controllers often require OTA upgrades for various components, with the MCU (Micro Controller Unit) being particularly crucial. Because the MCU largely controls other components, it must maintain continuous operation during the upgrade process, oblivious to other components. This solution effectively coordinates the entire controller to complete OTA upgrades of the MCU, avoiding MCU startup failures caused by version issues and reducing maintenance costs. The MCU OTA upgrade in this solution is based on the Renesas RH850 platform chip.

[0112] Over-the-Air (OTA) is a method for remotely updating device firmware or software via wireless communication. This technology is widely used in modern IoT devices, smartphones, automobiles, embedded systems, and other fields, providing a convenient update method without the need for physical connection. The core of OTA updates is to enable devices to automatically, reliably, and securely retrieve and apply updates from a remote server to improve device performance, add new features, or fix security vulnerabilities.

[0113] The embodiment of the present application provides a method for upgrading a microcontroller unit of a vehicle. The microcontroller unit includes a first partition and a second partition. The first partition is used to store a first control program of the microcontroller unit, and the second partition is used to store a second control program of the microcontroller unit. By setting valid area identification information, the control program of the waiting area is run based on the valid area identification information, and the control program of the waiting area is upgraded at the same time. After the upgrade is successful, the control program of the latest version is switched to run, ensuring the continuous operation of the MCU during the upgrade process. Figure 1 The method for upgrading the micro control unit of the vehicle includes steps S101 to S1013.

[0114] In step S101 , in response to a control program upgrade instruction, valid area identification information is acquired.

[0115] In a possible implementation, the microcontroller unit is an MCU of a vehicle domain controller, and the microcontroller unit includes a first partition and a second partition, the first partition and the second partition are two logical partitions respectively, and the first partition and the second partition correspond to different addresses respectively.

[0116] In a possible implementation, the first partition is used to store a first control program of the micro control unit, and the second partition is used to store a second control program of the micro control unit. The micro control unit runs the control program of the first partition or the control program of the second partition each time.

[0117] In a possible implementation, the control program upgrade instruction indicates the existence of upgrade information for the control program of the micro control unit. Specifically, the upgrade information is used to update the control program from a lower version to a higher version to optimize the performance of the micro control unit.

[0118] In a possible implementation, the micro control unit includes a data storage area, wherein the data storage area stores the valid area identification information.

[0119] The obtaining of valid area identification information in response to the control program upgrade instruction includes:

[0120] In response to the control program upgrade instruction, running a startup program of the micro control unit;

[0121] reading the valid area identification information from the data storage area based on the startup program;

[0122] Accordingly, the updating of the valid area identification information includes:

[0123] The updated valid area identification information is written into the data storage area.

[0124] In one possible implementation, Figure 2 As shown, the OTA upgrade framework of the microcontroller includes: data storage area DataFlash, user startup program UserBoot, partition A program BankAApp, partition A program BankB App, and system on chip SoC (acting as a host computer).

[0125] In a possible implementation, the data storage area DataFlash stores the valid area identification information, namely, the BankFlag status. Specifically, the BankFlag status represents the partition A program and the running status of the partition A program.

[0126] In one possible implementation, the user boot program, UserBoot, is entered after power-on (RESET). In UserBoot, the value of BankFlag can be read and modified, and the GCFU (Global Calibration Function Unit) component performs address mapping to jump to BankAApp or BankBApp. Specifically, the GCFU remaps one code flash to another.

[0127] In one possible implementation, the first partition is Partition A (BankA), and the second partition is Partition B (BankB). BankA App is the program stored in Partition A, namely the first control program; BankA App is the program stored in Partition B, namely the second control program. Specifically, App is the actual running MCU program, integrating the DoIP protocol stack to process upgrade requests sent by the SoC and flash the current version of the program. Specifically, the DoIP protocol stack is a diagnostic protocol based on the TCP / IP protocol, mainly used for vehicle inspection and maintenance, software flashing, etc.

[0128] In one possible implementation, the system-on-chip (SoC) is used to send an OTA upgrade request to the MCU via the Diagnostic Communication over Internet Protocol (DoIP).

[0129] In one possible implementation, in response to the control program upgrade instruction, the startup program of the microcontroller unit is run, that is, after receiving the control program upgrade instruction, the power is turned on, and the user startup program UserBoot is entered, and the value of BankFlag is read through UserBoot. The value of BankFlag read is the valid area identification information.

[0130] In a possible implementation, UserBoot may also write the updated valid area identification information into the data storage area.

[0131] In this implementation, in response to the control program upgrade instruction, the startup program of the microcontroller unit is run, and the valid area identification information is read from the data storage area based on the startup program. The startup program can also write the updated valid area identification information into the data storage area. The data storage area is read and written based on the startup program, which consumes little storage resources and is simple to maintain.

[0132] In step S103, the partition of the first partition and the second partition that matches the valid area identification information is determined as a waiting area, and the partitions of the first partition and the second partition other than the target partition are determined as waiting areas for upgrading.

[0133] In a possible implementation, determining a partition in the first partition and the second partition that matches the valid area identification information as a waiting-for-operation area, and determining a partition in the first partition and the second partition other than the target partition as a waiting-for-upgrade area includes:

[0134] Querying a pre-built identification information database based on the valid area identification information to obtain an address of the waiting area corresponding to the valid area identification information;

[0135] Perform matching based on the address of the waiting area to be run to obtain a matching result;

[0136] If the matching result indicates that the address of the waiting area matches the address of the first partition, determining the first partition as the waiting area, and determining the waiting area to be upgraded as the second partition;

[0137] If the matching result indicates that the address of the to-be-run area matches the address of the second partition, the second partition is determined to be the to-be-run area, and the to-be-upgraded area is determined to be the first partition.

[0138] In one possible implementation, Figure 3 As shown, the method for determining the area to be operated and the area to be upgraded includes steps S301 to S307.

[0139] In step S301, a pre-built identification information database is queried based on the valid area identification information to obtain the address of the waiting area corresponding to the valid area identification information.

[0140] In step S303, matching is performed based on the address of the waiting area to be executed to obtain a matching result.

[0141] In step S305 , when the matching result indicates that the address of the to-be-run area matches the address of the first partition, the first partition is determined to be the to-be-run area, and the to-be-upgraded area is determined to be the second partition.

[0142] In step S307 , if the matching result indicates that the address of the waiting area matches the address of the second partition, the second partition is determined to be the waiting area, and the area to be upgraded is determined to be the first partition.

[0143] In one possible implementation, a pre-built identification information database is queried based on the valid area identification information to obtain the address of the area to be run. When the address of the area to be run is the address of the first partition, the first partition is determined to be the area to be run, and the second partition is determined to be the area to be upgraded.

[0144] In a possible implementation, when the address of the waiting area is the address of the second partition, the second partition is determined to be the waiting area, and the first partition is determined to be the waiting area.

[0145] In one possible implementation, the method for constructing the identification information database includes:

[0146] Setting identification information of partitions corresponding to the first control program and the second control program based on the running status of the first control program and the second control program;

[0147] If the running states of both the first control program and the second control program are not upgraded, setting the identification information to the first identification information;

[0148] If the running state of the first control program meets the preset waiting-to-run condition, setting the identification information to second identification information;

[0149] If the running state of the first control program meets the preset flashing condition, setting the identification information to third identification information;

[0150] If the control program last run is the first control program of the first partition, setting the identification information to fourth identification information;

[0151] If the running state of the second control program meets the preset waiting-to-run condition, setting the identification information to fifth identification information;

[0152] If the running state of the second control program meets the preset flashing condition, setting the identification information to sixth identification information;

[0153] If the control program last run is the second control program of the second partition, setting the identification information to seventh identification information;

[0154] Determine, according to the identification information, an address of the waiting-for-operation area corresponding to the identification information;

[0155] The identification information library is constructed based on the relationship between the identification information and the address of the waiting-to-run area corresponding to the identification information.

[0156] In a possible implementation, BankFlag is used to represent the running status of the first control program and the second control program, and the value of BankFlag is the identification information of the partition corresponding to the first control program and the second control program.

[0157] In one possible implementation, the value of BankFlag may be INIT, BANKA_VALID, BANKA_FALSHED, BANKA_BOOT, BANKB_VALID, BANKB_FALSHED, or BANKB_BOOT.

[0158] In a possible implementation, if the running status of the first control program and the second control program are both not upgraded, the identification information is set to the first identification information INIT. Specifically, the value of BankFlag is INIT, indicating a non-upgraded state.

[0159] In one possible implementation, if the running state of the first control program meets a preset waiting-to-run condition, the identification information is set to the second identification information BANKA_VALID. Specifically, the value of BankFlag is BANKA_VALID, indicating that BankA (partition A) is valid, i.e., the control program stored in BankA is executable and will be started from BankA next time.

[0160] In one possible implementation, if the running state of the first control program meets the preset flashing condition, the identification information is set to the third identification information BANKA_FALSHED. Specifically, the value of BankFlag is BANKA_FALSHED, indicating that BankA is in the flashing state and will be started from BankA next time.

[0161] In one possible implementation, if the last running control program is the first control program of the first partition, the identification information is set to the fourth identification information BANKA_BOOT. Specifically, the value of BankFlag is BANKA_BOOT, indicating that the last startup was from BankA, and this state is switched from BANKA_FLASHED.

[0162] In one possible implementation, if the running state of the second control program meets a preset waiting-to-run condition, the identification information is set to the fifth identification information BANKB_VALID. Specifically, the value of BankFlag is BANKB_VALID, indicating that Bank B (partition B) is valid, i.e., the control program stored in Bank B is executable and will be started from Bank B next time.

[0163] In one possible implementation, if the running state of the second control program meets the preset flashing condition, the identification information is set to the sixth identification information. Specifically, the value of BankFlag is BANKB_FALSHED, indicating that BankB is in the flashing complete state and will be started from BankB next time.

[0164] In a possible implementation, if the control program last run is the second control program of the second partition, the identification information is set to the seventh identification information. Specifically, the value of BankFlag is BANKB_BOOT, indicating that the last boot was from BankB, and this state is switched from BANKB_FLASHED.

[0165] In a possible implementation, the identification information library is constructed based on the value of BankFlag and the relationship between the value of BankFlag and the address of the waiting area.

[0166] In this implementation, an identification information database is constructed to facilitate querying the pre-built identification information database based on the valid area identification information, obtaining the address of the area to be run, and confirming the area to be run and the area to be upgraded based on the valid area identification information. This allows the control program of the area to be upgraded to be upgraded while the MCU remains working, thereby ensuring the business continuity of other components and improving the user experience.

[0167] In a possible implementation, determining, according to the identification information, an address of the to-be-run area corresponding to the identification information includes:

[0168] In a case where the identification information is the first identification information, determining the address of the to-be-run area corresponding to the first identification information as the address of the first partition;

[0169] In a case where the identification information is the second identification information, determining the address of the to-be-run area corresponding to the second identification information as the address of the first partition;

[0170] In a case where the identification information is the third identification information, determining that the address of the waiting area corresponding to the third identification information is the address of the first partition;

[0171] In a case where the identification information is the fourth identification information, determining that the address of the to-be-run area corresponding to the fourth identification information is the address of the first partition;

[0172] In a case where the identification information is the fifth identification information, determining the address of the waiting area corresponding to the fifth identification information as the address of the second partition;

[0173] In a case where the identification information is the sixth identification information, determining that the address of the waiting area corresponding to the sixth identification information is the address of the second partition;

[0174] In a case where the identification information is the seventh identification information, the address of the to-be-run area corresponding to the seventh identification information is determined to be the address of the second partition.

[0175] In a possible implementation, when the valid area identification information is INIT, a pre-built identification information database is queried to obtain the address of partition A, determine partition A as the waiting area for operation, and determine partition B as the waiting area for upgrade.

[0176] In a possible implementation, when the valid area identification information is BANKA_VALID, a pre-built identification information library is queried to obtain the address of partition A, determine partition A as the area to be run, and determine partition B as the area to be upgraded.

[0177] In a possible implementation, when the valid area identification information is BANKA_FALSHED, a pre-built identification information library is queried to obtain the address of partition A, determine partition A as the area to be run, and determine partition B as the area to be upgraded.

[0178] In a possible implementation, when the valid area identification information is BANKA_BOOT, a pre-built identification information library is queried to obtain the address of partition A, determine partition A as the area to be run, and determine partition B as the area to be upgraded.

[0179] In a possible implementation, when the valid area identification information is BANKB_VALID, a pre-built identification information library is queried to obtain the address of partition B, determine partition B as the area to be run, and determine partition A as the area to be upgraded.

[0180] In a possible implementation, when the valid area identification information is BANKB_FALSHED, a pre-built identification information library is queried to obtain the address of partition B, determine partition B as the area to be run, and determine partition A as the area to be upgraded.

[0181] In a possible implementation, when the valid area identification information is BANKB_BOOT, a pre-built identification information library is queried to obtain the address of partition B, determine partition B as the area to be run, and determine partition A as the area to be upgraded.

[0182] In this implementation, different identification information is set according to different status scenarios, and the address of the to-be-run area corresponding to the identification information is determined according to the identification information, thereby improving the accuracy of partition operation and upgrade, and thus improving the working efficiency of the MCU.

[0183] In step S105 , the control program stored in the waiting area is controlled to start running.

[0184] In a possible implementation, the valid area identification information includes the address of the waiting area.

[0185] The controlling the control program stored in the waiting-to-run area to start running includes:

[0186] When the address of the waiting-for-execution area is the address of the first partition, executing the first control program of the first partition;

[0187] When the address of the to-be-run area is the address of the second partition, the second control program of the second partition is run.

[0188] In a possible implementation, when the address of the to-be-run area is the address of partition A, the BankA App of partition A is run.

[0189] In a possible implementation, when the address of the to-be-run area is the address of partition B, the BankB App of partition B is run.

[0190] In this implementation, after the waiting area is confirmed, the control program stored in the waiting area is controlled to start running, so that the MCU supports the services of other components, ensuring service continuity while upgrading.

[0191] In step S107 , control program update information is acquired based on the control program upgrade instruction.

[0192] In a possible implementation, based on the control program upgrade instruction, the upgrade request and update information sent by the SoC are acquired through the DoIP protocol stack.

[0193] In step S109, the control program stored in the area to be upgraded is updated according to the control program update information to obtain a target control program.

[0194] In a possible implementation, the control program stored in the area to be upgraded is flashed according to the control program update information, and a target control program is obtained after the flashing is completed.

[0195] In a possible implementation, when the area to be upgraded is partition A, BankA App is flashed, and after the flashing is completed, the flashed BankA App is used as the target control program.

[0196] In a possible implementation, when the area to be upgraded is partition B, BankB App is flashed, and after the flashing is completed, the flashed BankB App is used as the target control program.

[0197] In step S1011, the running state of the target control program is tested to obtain a running test result.

[0198] In a possible implementation, when the target control program is BankA App, the operation of BankA App is tested to determine whether BankA App can operate normally.

[0199] In a possible implementation, when the target control program is BankB App, the operation of BankB App is tested to determine whether BankB App can operate normally.

[0200] In step S1013 , when the running test result indicates that the target control program runs normally, the process switches to running the target control program stored in the area to be upgraded, and updates the valid area identification information.

[0201] In a possible implementation, updating the valid area identification information includes:

[0202] In a case where the normally running target control program is stored in the first partition, updating the valid area identification information to the fourth identification information;

[0203] In a case where the normally running target control program is stored in the second partition, the valid area identification information is updated to the seventh identification information.

[0204] In a possible implementation, when the BankA App runs normally, BankFlag is updated to BANKA_VALID.

[0205] In a possible implementation, when the BankB App runs normally, BankFlag is updated to BANKB_VALID.

[0206] In this implementation, after the upgrade is successful, the target control program stored in the area to be upgraded is switched to run, and the valid area identification information is updated, thereby completing the upgrade task of the MCU and improving the function and performance of the MCU.

[0207] In a possible implementation, the method further includes:

[0208] When the operation test result indicates that the target control program is operating abnormally, the control program stored in the waiting-to-operate area is kept operating, and the valid area identification information is kept unchanged.

[0209] In a possible implementation, if the target control program runs abnormally, BankFlag will not be updated for reading by UserBoot after the next power-on.

[0210] In this implementation, after an exception occurs during the upgrade, the control program stored in the waiting area is kept running, and the valid area identification information is kept unchanged. The valid area identification information ensures that if an error occurs during the upgrade, it can be rolled back to the previous version in time to prevent the domain controller from being unable to start.

[0211] The beneficial effects of the present application are as follows: by responding to a control program upgrade instruction, obtaining valid area identification information; determining the partition in the first partition and the second partition that matches the valid area identification as the to-be-run area, and determining the partition in the first partition and the second partition other than the target partition as the to-be-upgraded area; controlling the control program stored in the to-be-run area to start running; obtaining control program update information based on the control program upgrade instruction; updating the control program stored in the to-be-upgraded area according to the control program update information to obtain a target control program; testing the running status of the target control program to obtain a running test result; if the running test result indicates that the target control program is running normally, switching to running the target control program stored in the to-be-upgraded area and updating the valid area identification information. By setting the valid area identification information, running the control program in the to-be-run area based on the valid area identification information, and upgrading the control program in the to-be-upgraded area at the same time, switching to running the latest version of the control program after the upgrade is successful, ensuring the continuous operation of the MCU during the upgrade process, and solving the problem of how to enable the MCU to ensure control of other components of the vehicle during the upgrade process.

[0212] Figure 4 A flowchart of a method for upgrading a microcontroller unit of a vehicle provided by an embodiment of the present application is shown. Figure 4 , the method for upgrading the micro control unit of the vehicle includes:

[0213] After powering on (Power) and performing RESET, start UserBoot to read the value of BankFlag. Assuming that the value of BankFlag is BANKA_VALID, the area to be run is determined to be partition A, and the area to be upgraded is determined to be partition B.

[0214] Use the GCFU component to map the address of the bank to be started to BankA for startup;

[0215] Jump to Bank A's startup address and run the BankA App;

[0216] SoC sends the OTA upgrade operation, MCU receives the OTA upgrade operation, and writes the address of Bank B through FlashDriver. After writing (Flash), BankFlag is updated to BANKB_FALSHED state

[0217] After flashing is completed, RESET is executed and the program jumps to UserBoot. UserBoot reads the BankFlag status as BANKB_FALSHED and changes it to BANKB_BOOT.

[0218] Through GCFU, map the address of the Bank to be started to BankB to start and run the BankB App;

[0219] If BankB App runs normally, update BankFlag to BANKB_VALID;

[0220] If BankB App runs abnormally, BankFlag will not be updated. When UserBoot reads BANKB_BOOT during the next RESET, BankFlag will be updated to BANKA_VALID and the system will start from BankA.

[0221] Figure 5 The schematic diagram of the structure of a vehicle micro-control unit upgrade device 500 provided in an embodiment of the present application is shown. The micro-control unit includes a first partition and a second partition. The first partition is used to store a first control program of the micro-control unit, and the second partition is used to store a second control program of the micro-control unit. The device has the function of implementing the vehicle micro-control unit upgrade method in the above method embodiment. The function can be implemented by hardware or by hardware executing corresponding software. Figure 5 As shown, the device may include:

[0222] The identification information acquisition module 501 is used to obtain valid area identification information in response to the control program upgrade instruction;

[0223] an area determination module 502 configured to determine, among the first and second areas, the area that matches the valid area identification information as an area to be run, and to determine, among the first and second areas, the area other than the target area as an area to be upgraded;

[0224] A control program running module 503 is used to control the control program stored in the waiting area to start running;

[0225] An update information acquisition module 504 is configured to acquire control program update information based on the control program upgrade instruction;

[0226] A program updating module 505 is configured to update the control program stored in the to-be-upgraded area according to the control program update information to obtain a target control program;

[0227] A program testing module 506 is used to test the running status of the target control program and obtain a running test result;

[0228] The program switching module 507 is configured to switch to running the target control program stored in the area to be upgraded and update the valid area identification information if the running test result indicates that the target control program runs normally.

[0229] In a possible implementation, the micro control unit includes a data storage area, wherein the data storage area stores the valid area identification information.

[0230] The identification information acquisition module 501 is used to:

[0231] In response to the control program upgrade instruction, running a startup program of the micro control unit;

[0232] reading the valid area identification information from the data storage area based on the startup program;

[0233] Accordingly, the program switching module 507 is used to:

[0234] The updated valid area identification information is written into the data storage area.

[0235] In a possible implementation, the region determination module 502 is configured to:

[0236] Querying a pre-built identification information database based on the valid area identification information to obtain an address of the waiting area corresponding to the valid area identification information;

[0237] Perform matching based on the address of the waiting area to be run, and obtain a matching result;

[0238] If the matching result indicates that the address of the waiting area matches the address of the first partition, determining the first partition as the waiting area, and determining the waiting area to be upgraded as the second partition;

[0239] If the matching result indicates that the address of the to-be-run area matches the address of the second partition, the second partition is determined to be the to-be-run area, and the to-be-upgraded area is determined to be the first partition.

[0240] In a possible implementation, the apparatus further includes an identification information database construction module 508, wherein the identification information database construction module 508 is configured to:

[0241] Setting identification information of partitions corresponding to the first control program and the second control program based on the running status of the first control program and the second control program;

[0242] If the running states of both the first control program and the second control program are not upgraded, setting the identification information to the first identification information;

[0243] If the running state of the first control program meets the preset waiting-to-run condition, setting the identification information to second identification information;

[0244] If the running state of the first control program meets the preset flashing condition, setting the identification information to third identification information;

[0245] If the control program last run is the first control program of the first partition, setting the identification information to fourth identification information;

[0246] If the running state of the second control program meets the preset waiting-to-run condition, setting the identification information to fifth identification information;

[0247] If the running state of the second control program meets the preset flashing condition, setting the identification information to sixth identification information;

[0248] If the control program last run is the second control program of the second partition, setting the identification information to seventh identification information;

[0249] Determine, according to the identification information, an address of the waiting-for-operation area corresponding to the identification information;

[0250] The identification information library is constructed based on the relationship between the identification information and the address of the waiting-to-run area corresponding to the identification information.

[0251] In a possible implementation, the identification information database construction module 508 is further configured to:

[0252] In a case where the identification information is the first identification information, determining the address of the to-be-run area corresponding to the first identification information as the address of the first partition;

[0253] In a case where the identification information is the second identification information, determining the address of the to-be-run area corresponding to the second identification information as the address of the first partition;

[0254] In a case where the identification information is the third identification information, determining that the address of the waiting area corresponding to the third identification information is the address of the first partition;

[0255] In a case where the identification information is the fourth identification information, determining that the address of the to-be-run area corresponding to the fourth identification information is the address of the first partition;

[0256] In a case where the identification information is the fifth identification information, determining the address of the waiting area corresponding to the fifth identification information as the address of the second partition;

[0257] In a case where the identification information is the sixth identification information, determining that the address of the waiting area corresponding to the sixth identification information is the address of the second partition;

[0258] In a case where the identification information is the seventh identification information, the address of the to-be-run area corresponding to the seventh identification information is determined to be the address of the second partition.

[0259] In a possible implementation, the program switching module 507 is configured to:

[0260] In a case where the normally running target control program is stored in the first partition, updating the valid area identification information to the fourth identification information;

[0261] In a case where the normally running target control program is stored in the second partition, the valid area identification information is updated to the seventh identification information.

[0262] In a possible implementation, the valid area identification information includes the address of the waiting area.

[0263] The control program running module 503 is used to:

[0264] When the address of the waiting-for-execution area is the address of the first partition, executing the first control program of the first partition;

[0265] When the address of the to-be-run area is the address of the second partition, the second control program of the second partition is run.

[0266] In a possible implementation, the program switching module 507 is further configured to:

[0267] When the operation test result indicates that the target control program is operating abnormally, the control program stored in the waiting-to-operate area is kept running, and the valid area identification information is kept unchanged.

[0268] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0269] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a method for upgrading a microcontroller unit of a vehicle as provided in any one of the above-mentioned method embodiments.

[0270] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.

[0271] An embodiment of the present application also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to a method for upgrading a microcontroller unit of a vehicle. The at least one instruction or the at least one program is loaded and executed by the processor to implement any one of the methods for upgrading the microcontroller unit of a vehicle provided in the above-mentioned method embodiments.

[0272] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0273] It should be noted that the order of the embodiments of the present application described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0274] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0275] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0276] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for upgrading a micro control unit of a vehicle, characterized in that: The micro control unit comprises a first partition and a second partition, the first partition is used to store a first control program of the micro control unit, and the second partition is used to store a second control program of the micro control unit, and the method comprises: In response to a control program upgrade instruction, obtaining valid area identification information; Determine the partitions in the first partition and the second partition that match the valid area identification information as the waiting-to-run area, and determine the partitions in the first partition and the second partition except the target partition as the waiting-to-upgrade area; Controlling the control program stored in the waiting-to-run area to start running; Based on the control program upgrade instruction, obtaining control program update information; The control program stored in the to-be-upgraded area is updated according to the control program update information to obtain a target control program; Testing the running state of the target control program to obtain a running test result; When the running test result indicates that the target control program runs normally, the running of the target control program stored in the area to be upgraded is switched to updating the valid area identification information.

2. The method for upgrading a micro control unit of a vehicle according to claim 1, characterized in that: The micro control unit includes a data storage area, wherein the data storage area stores the valid area identification information. The obtaining of valid area identification information in response to the control program upgrade instruction includes: In response to the control program upgrade instruction, running a startup program of the micro control unit; reading the valid area identification information from the data storage area based on the startup program; Accordingly, the updating of the valid area identification information includes: The updated valid area identification information is written into the data storage area.

3. The method for upgrading a micro control unit of a vehicle according to claim 1, characterized in that: The step of determining the partition in the first partition and the second partition that matches the valid area identification information as a waiting-to-run area, and determining the partition in the first partition and the second partition other than the target partition as a waiting-to-upgrade area includes: Based on the valid area identification information, a pre-built identification information database is queried to obtain an address of the waiting area corresponding to the valid area identification information; Perform matching based on the address of the waiting area to be run, and obtain a matching result; When the matching result indicates that the address of the to-be-run area matches the address of the first partition, determining the first partition as the to-be-run area, and determining the to-be-upgraded area as the second partition; When the matching result indicates that the address of the to-be-run area matches the address of the second partition, the second partition is determined to be the to-be-run area, and the to-be-upgraded area is determined to be the first partition.

4. The method for upgrading a micro control unit of a vehicle according to claim 3, characterized in that: The method for constructing the identification information database comprises: Based on the running states of the first control program and the second control program, setting identification information of the partitions corresponding to the first control program and the second control program; If the running states of the first control program and the second control program are both not upgraded, setting the identification information to the first identification information; If the running state of the first control program meets the preset waiting-to-run condition, setting the identification information to the second identification information; If the running state of the first control program meets the preset flashing condition, setting the identification information to third identification information; If the control program last run is the first control program of the first partition, setting the identification information to fourth identification information; If the running state of the second control program meets the preset waiting-to-run condition, setting the identification information to fifth identification information; If the running state of the second control program meets the preset flashing condition, setting the identification information to sixth identification information; If the control program last run is the second control program of the second partition, setting the identification information to the seventh identification information; Determine, according to the identification information, an address of the waiting-to-run area corresponding to the identification information; The identification information library is constructed based on the relationship between the identification information and the address of the waiting-to-run area corresponding to the identification information.

5. The method for upgrading a micro control unit of a vehicle according to claim 4, characterized in that: The determining, according to the identification information, an address of the waiting-to-run area corresponding to the identification information comprises: In a case where the identification information is the first identification information, determining that the address of the to-be-run area corresponding to the first identification information is the address of the first partition; In a case where the identification information is the second identification information, determining that the address of the to-be-run area corresponding to the second identification information is the address of the first partition; In a case where the identification information is the third identification information, determining that the address of the to-be-run area corresponding to the third identification information is the address of the first partition; In a case where the identification information is the fourth identification information, determining that the address of the to-be-run area corresponding to the fourth identification information is the address of the first partition; In a case where the identification information is the fifth identification information, determining that the address of the to-be-run area corresponding to the fifth identification information is the address of the second partition; In a case where the identification information is the sixth identification information, determining that the address of the to-be-run area corresponding to the sixth identification information is the address of the second partition; In a case where the identification information is the seventh identification information, the address of the to-be-run area corresponding to the seventh identification information is determined to be the address of the second partition.

6. The method for upgrading a micro control unit of a vehicle according to claim 4, characterized in that: The updating of the valid area identification information includes: In the case where the normally running target control program is stored in the first partition, updating the valid area identification information to the fourth identification information; In a case where the normally running target control program is stored in the second partition, the valid area identification information is updated to the seventh identification information.

7. The method for upgrading a micro control unit of a vehicle according to claim 1, characterized in that: The valid area identification information includes the address of the waiting area. The controlling the control program stored in the waiting-to-run area to start running includes: When the address of the waiting-to-run area is the address of the first partition, running the first control program of the first partition; When the address of the to-be-run area is the address of the second partition, the second control program of the second partition is run.

8. The method for upgrading a micro control unit of a vehicle according to claim 1, characterized in that: The method further comprises: When the operation test result indicates that the target control program is operating abnormally, the control program stored in the waiting-to-operate area is kept running, and the valid area identification information is kept unchanged.

9. An upgrading device for a micro control unit of a vehicle, characterized in that: The micro control unit comprises a first partition and a second partition, the first partition is used to store a first control program of the micro control unit, and the second partition is used to store a second control program of the micro control unit, and the device comprises: An identification information acquisition module, used to obtain valid area identification information in response to a control program upgrade instruction; an area determination module, configured to determine the area in the first partition and the second partition that matches the valid area identification information as an area to be run, and to determine the area in the first partition and the second partition other than the target partition as an area to be upgraded; A control program running module, used for controlling the control program stored in the waiting-to-run area to start running; An update information acquisition module, used to acquire control program update information based on the control program upgrade instruction; A program updating module, used for updating the control program stored in the to-be-upgraded area according to the control program updating information to obtain a target control program; A program testing module, used to test the running status of the target control program to obtain a running test result; The program switching module is used to switch to running the target control program stored in the area to be upgraded and update the valid area identification information when the running test result indicates that the target control program runs normally.

10. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the upgrade method of the micro control unit of the vehicle as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Program upgrading method, chip and vehicle

    CN121255250A