FOTA flashing system and method, medium and vehicle
By setting the high-voltage in-loop detection correlation controller as the last position in the restart sequence, and using independent flash bus and communication bus, the dual-zone structure and core design of the MCU are adopted, the high-voltage in-loop detection correlation controller is solved by solving the high-voltage in-loop detection correlation controller flushing The resulting small battery feeding problem achieves safe and stable FOTA brushing under high voltage power supply.
Patent Information
- Application Number
- CN202411020487.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-12
AI Technical Summary
When high-voltage in-loop detection associated controller performs FOTA brushing, high-voltage power supply must be disconnected, resulting in small battery feed, which may lead to failure in brushing or battery damage.
By setting the high-voltage in-loop detection correlation controller as the last position of the restart sequence, using independent flash bus and communication bus for FOTA flash write and high-voltage in-loop detection communication, the dual-zone structure and core design of the MCU ensure that Flash writing under high voltage power supply to avoid small battery power supply.
It realizes FOTA flashing under high voltage power supply, solves the problem of small battery power feeding, improves system stability and flashing success rate, meets functional safety requirements, and simplifies the flashing process of the entire vehicle.
Smart Images

Figure CN118939280A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of firmware remote update, and in particular to a FOTA flash writing system, method, medium and vehicle. Background Art
[0002] FOTA (Firmware Over-The-Air) refers to the process in which a vehicle connects to the remote service platform (TSP) server of the original equipment manufacturer (OEM) through a mobile network or WiFi network, downloads the latest controller software package, uses a certain electronic control unit (ECU) as the FOTA master node, and the remaining ECUs as slave nodes, and updates the software of the ECUs of the entire vehicle through communication protocols such as SOMEIP, DoIP, and UDSonCAN.
[0003] At present, when performing FOTA flashing on the high-voltage in-loop detection associated controller, the high voltage must be disconnected and the small battery will supply low voltage to the entire vehicle. If the flashing time of such ECU is too long, the small battery will be fed, resulting in FOTA flashing failure, and then the entire vehicle cannot be started. At the same time, the power loss of some small batteries may also cause irreversible damage to the battery. Summary of the invention
[0004] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to provide a FOTA flashing system, method, medium and vehicle, so that when the high-voltage in-loop detection associated controller is flashed with FOTA, there is no need to disconnect the high voltage and no longer rely on a small battery for power supply, thereby solving the problem of small battery power feeding caused by the flashing of the high-voltage in-loop associated controller and the possible battery attenuation problem.
[0005] To achieve the above purpose, the present invention adopts the following technical solution.
[0006] In the first aspect, the present invention provides a FOTA flash writing system, which adopts the following technical solution: The system comprises: The attribute configuration module is used to obtain at least the flashing order and restart group attributes of the vehicle controller, wherein the restart group attributes include setting the high-voltage in-loop detection associated controller to the last position of the restart order; A central gateway, at least used to remotely obtain a flash message and route the flash message to a flash bus based on the flash sequence; The flashing module is at least used to receive the flashing message through the flashing bus, and write the new version of the software corresponding to the flashing message into a preset area of the preset MCU; A high-voltage in-loop detection module, at least used for sending and receiving detection messages through a communication bus to implement a detection function of the high-voltage in-loop detection associated controller; and a restart module, at least for restarting the vehicle controller in a unified manner based on the restart group attribute to complete the activation of the new version of the software; The flashing module and the high-voltage in-loop detection module are configured on different cores of the MCU.
[0007] Further, as a possible implementation of the present invention, the high voltage in-loop detection associated controller is set to the last position in the restart sequence, including: The restart order of multiple high-voltage in-loop detection associated controllers is set to the same value to achieve parallel restart of each high-voltage in-loop detection associated controller.
[0008] Further, as a possible implementation of the present invention, the flashing module includes a firmware boot loading component, a diagnostic software component and a diagnostic communication management component; wherein, The firmware boot loader component is used to write the new version of the software into a preset area of the preset MCU; The diagnostic software component is used to diagnose and monitor various ECUs of the vehicle; The diagnostic communication management component is used to manage and process diagnostic communications of various ECUs of the vehicle based on the communication bus.
[0009] Furthermore, as a possible implementation of the present invention, the MCU includes at least core 1 and core 2, the flashing module is configured on core 1, and the high-voltage in-loop detection module is configured on core 2; the core 1 and core 2 each use independent clock scheduling.
[0010] Furthermore, as a possible implementation method of the present invention, the flash bus and the communication bus are respectively deployed on different external communication buses, the flash bus is used to realize the FOTA flash communication between the high-voltage in-loop detection associated controller and the central gateway, and the communication bus is used to realize the high-voltage in-loop detection communication between the high-voltage in-loop detection associated controller and the central gateway.
[0011] Furthermore, as a possible implementation method of the present invention, the refresh bus is deployed on an external communication bus, and the communication bus is deployed on an internal communication bus of each high-voltage in-loop detection associated controller; the refresh bus is used to realize FOTA flash communication between the high-voltage in-loop detection associated controller and the central gateway, and the communication bus is used to realize internal communication of each high-voltage in-loop detection associated controller.
[0012] Furthermore, as a possible implementation method of the present invention, the MCU includes area A and area B with the same structural design, area A is the area where the current software version runs, and area B is the area where the new version of the software is written. After the restart module completes the unified restart of the vehicle controller, area B becomes the area where the current version runs.
[0013] In a second aspect, the present invention provides a FOTA flashing method, which adopts the following technical solution: A FOTA flashing method, applied to the FOTA flashing system as described in any one of the first aspects above, the method comprising: Obtaining the flashing order and restart group attributes of the vehicle controller, wherein the restart group attributes include setting the high-voltage in-loop detection associated controller to the last position in the restart order; remotely acquiring a flashing message, and routing the flashing message to a flashing bus based on the flashing sequence; Receive the flash message through the flash bus, and write the new version of software corresponding to the flash message into a preset area of the preset MCU; Sending and receiving detection messages via a communication bus to implement a detection function of the high-voltage in-loop detection associated controller; And, based on the restart group attribute, the vehicle controller is restarted uniformly to complete the activation of the new version of the software.
[0014] In a third aspect, the present invention provides a readable storage medium, which adopts the following technical solution: A readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the FOTA flashing method as described in the second aspect above is implemented.
[0015] In a fourth aspect, the present invention provides a vehicle, which adopts the following technical solution: A vehicle, wherein the vehicle is equipped with a FOTA flashing system as described in any one of the first aspects above.
[0016] In summary, compared with the prior art, the present invention includes at least one of the following beneficial technical effects: 1. The flashing of the high-voltage in-loop associated controller can be carried out under the premise of high-voltage power supply, and no longer relies on small batteries for power supply. This solves the problem of small battery power feeding and possible battery attenuation caused by the flashing of the high-voltage in-loop associated controller. The flashing does not affect the high-voltage in-loop detection, meeting the functional safety requirements; 2. Because the high-voltage in-loop detection associated controllers can be flashed under high voltage, all ECUs of the vehicle can be flashed under high voltage, and no high-voltage up and down actions are required in the middle, which simplifies the FOTA flashing process of the whole vehicle and improves the stability of the system and the success rate of FOTA flashing of the vehicle controller. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 It is an OTA upgrade system architecture in the prior art.
[0019] Figure 2 It is a structural diagram of an embodiment of a FOTA flashing system of the present invention.
[0020] Figure 3 This is a communication topology diagram provided by an embodiment of the present invention.
[0021] Figure 4 This is another communication topology diagram provided by an embodiment of the present invention.
[0022] Figure 5 This is another communication topology diagram provided by an embodiment of the present invention.
[0023] Figure 6 It is a structural diagram of another embodiment of the FOTA flashing system of the present invention.
[0024] Figure 7 It is a flowchart of an embodiment of the FOTA refresh method of the present invention.
[0025] Figure 8 It is a flow chart of an embodiment of the FOTA refresh method of the present invention. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application. In addition, it should be understood that the specific implementation methods described herein are only used to illustrate and explain the present application, and are not used to limit the present application.
[0027] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments of the present application. In addition, in the following embodiments, the description of each embodiment has its own emphasis, and for parts not described in detail in one embodiment, reference can be made to the relevant description of other embodiments.
[0028] The method steps described in the embodiments of the present invention may be executed in the order described in the specific implementation manner, or the execution order of each step may be adjusted according to actual needs and on the premise that the technical problem can be solved, which will not be listed here one by one.
[0029] FOTA upgrade refers to the process in which a vehicle connects to the original equipment manufacturer's (OEM) remote service platform (TSP) server through a mobile network or WIFI network, downloads the latest controller software package, uses a certain ECU as the FOTA master node, and the remaining ECUs as FOTA slave nodes to perform software updates on the entire vehicle ECU through protocols such as SOMEIP / DoIP / UDSonCAN. Figure 1 , an OTA (Over-The-Air) system architecture for remotely updating the vehicle's electronic control unit (ECU). The central gateway communicates with the OTA master (OTA Master) and the human-machine interface (OTA HMI) through a remote communication channel. OTAMaster manages multiple OTA slave nodes (OTA Slave1 and OTA Slave2), where OTA Slave1 is connected to OTA Master through FlashingAdaptor, and OTA Slave2 is connected to multiple ECUs through Ethernet (Eth) and CAN / CANFD bus for firmware update operations. This architecture ensures that each ECU in the vehicle can perform efficient and reliable firmware updates through remote communication.
[0030] The whole vehicle high-voltage in-loop detection refers to the new energy vehicle battery management system's detection of the connection reliability, overcurrent, overvoltage, and connection abnormalities of the high-voltage connectors directly connected to the battery system, including the detection of the battery system cover, fuse box maintenance cover, PTC interface, and fast charging high-voltage interface. If an abnormality is detected, the controller will disconnect the high-voltage power supply through the controller's high-voltage relay switch, thereby avoiding safety risks caused by the abnormality.
[0031] High-voltage in-loop detection associated controllers generally refer to electronic control units (ECUs) that are closely related to the high-voltage power supply system. These controllers are responsible for managing and monitoring key electrical components of electric vehicles, including but not limited to motor controllers (MCUs), DC converters (DCDCs), battery management systems (BMSs), on-board chargers (OBCs), and vehicle control units (VCUs).
[0032] Based on the above prior art, refer to Figure 2 An embodiment of the present invention provides a FOTA flashing system, including a property configuration module 1, a central gateway 2, a flashing module 3, a high-voltage in-loop detection module 4 and a restart module 5.
[0033] The attribute configuration module 1 is at least used to obtain the flashing order and restart group attributes of the whole vehicle controller, wherein the restart group attributes include setting the high-voltage in-loop detection associated controller to the last position in the restart order. Specifically, the attribute configuration module 1 is used to obtain and configure the flashing order and restart group attributes of the whole vehicle controller. It interacts with each ECU through the communication bus, obtains the configuration status of the current system and the priority information of each controller, and sets the high-voltage in-loop detection associated controller to the last position in the restart order according to the preset strategy. The module can be operated through the software configuration interface or the remote management system, and the configuration results are stored in the configuration file of the central gateway 2 to ensure that the system operates in the correct order during the flashing process.
[0034] The central gateway 2 is at least used to remotely obtain the flash message and route the flash message to the flash bus based on the flash order. Specifically, the central gateway 2, as the core communication hub of the system, is responsible for remotely obtaining the flash message and routing it to the corresponding flash bus. The central gateway 2 communicates with the OEM's TSP server through a remote communication channel (such as a mobile network or WiFi) connected to the vehicle to download the latest firmware update package. According to the flash order provided by the attribute configuration module 1, the central gateway 2 distributes the downloaded flash messages to each ECU in an orderly manner to ensure the orderly progress of the update process.
[0035] The flashing module 3 is at least used to receive the flashing message through the flashing bus, and write the new version of the software corresponding to the flashing message into a preset area of the preset MCU. The flashing module 3 is deployed on a core of the preset MCU, and is specifically responsible for receiving the flashing message from the flashing bus and writing the new version of the software into the designated storage area. The flashing module 3 ensures the correct writing and activation of the new version of the software by performing the flashing operation and diagnostic functions. The flashing module 3 is also responsible for reporting the flashing results to the central gateway 2 after the flashing is completed, so as to facilitate subsequent system operations.
[0036] The high-voltage in-loop detection module 4 is at least used to send and receive detection messages through the communication bus to realize the detection function of the high-voltage in-loop detection associated controller. The high-voltage in-loop detection module 4 is deployed on another independent core of the MCU, responsible for sending and receiving detection messages through the communication bus to realize real-time monitoring and diagnosis of the high-voltage in-loop detection associated controller. This module monitors the status of key components such as motor controllers, DCDC, BMS, OBC and VCU through the high-voltage in-loop detection communication protocol to ensure that the high-voltage system is still safe and stable during and after the flashing process. The high-voltage in-loop detection module 4 can run independently of the flashing module 3 to ensure that the detection function is not affected by the flashing process.
[0037] The restart module 5 is at least used to uniformly restart the vehicle controller based on the restart group attributes to complete the activation of the new version of the software. The restart module 5 uniformly restarts the vehicle controller after the flashing is completed according to the restart group attributes provided by the attribute configuration module 1. This module coordinates the restart sequence of each ECU through a control signal to ensure that the high-voltage in-loop detection associated controller is restarted last to avoid interruptions in the high-voltage system during the update process. After receiving the confirmation signal that the flashing of all controllers is completed, the restart module 5 performs a unified restart operation to make the new version of the software effective and restore the normal operating state of the system.
[0038] The embodiment of the present invention ensures the efficiency, reliability and security of the FOTA flashing process through the preset configuration of the attribute configuration module 1, the remote communication and management of the central gateway 2, the parallel operation of the flashing module 3 and the high-voltage in-loop detection module 4, and the coordinated restart of the restart module 5.
[0039] Furthermore, as an embodiment of the present invention, setting the high-voltage in-loop detection associated controller to the last position in the restart order includes: setting the restart order of multiple high-voltage in-loop detection associated controllers to the same value to achieve parallel restart of each high-voltage in-loop detection associated controller.
[0040] Specifically, setting the high-voltage in-loop detection associated controller to the last position in the restart order means that in the attribute configuration module 1, the restart group attributes of all high-voltage in-loop detection associated controllers (such as motor controllers, DCDC, BMS, OBC, VCU, etc.) are set to the same last group value (for example, "3"), and these controllers are scheduled to restart synchronously and in parallel after other controllers complete the restart through the restart module 5, ensuring that the high-voltage system remains safe and stable during and after the FOTA flashing process. This implementation method includes unified attribute configuration, transmission of parallel restart signals, and appropriate network topology design.
[0041] Exemplarily, the attribute configuration module 1 encodes the FOTA flashing sequence and restart sequence of each ECU of the vehicle, as shown in the following table: Among them, 1 to 4 of the flash order attribute represent the flash order, and the same numbers represent parallel flashing; 1 to 3 of the restart group attribute represent different restart groups, and the same numbers represent the same restart group; the flash order of the example in Table 2 above is: Ecu_1→Ecu_2→Ecu_3→Ecu_4; The restart sequence of the example in Table 2 above is: Ecu_1→Ecu_4→Ecu_2 / Ecu_4 restart in parallel; Through the above design, it can be ensured that the FOTA flashing system can flexibly configure the flashing order and restart group properties of all ECUs in the vehicle, and can ensure that the high-voltage associated controller can be restarted at the end of the FOTA task. Through the control of the restart group property, the Ecu_1~Ecu_4 or all-in-one Ecu associated with the high-voltage in-loop detection is compiled as the last restart group of the vehicle FOTA flashing. After the flashing of all ECUs in the vehicle is completed, the vehicle is restarted uniformly, thereby avoiding the up and down high-voltage action caused by the restart of the high-voltage in-loop detection controller during the FOTA process.
[0042] Furthermore, as an embodiment of the present invention, the flashing module 3 includes a firmware boot loading component, a diagnostic software component and a diagnostic communication management component; wherein the firmware boot loading component is used to write the new version of the software into a preset area of a preset MCU; the diagnostic software component is used to diagnose and monitor each ECU of the vehicle; the diagnostic communication management component is used to manage and process the diagnostic communications of each ECU of the vehicle based on the communication bus.
[0043] Specifically, the firmware bootloader component (FBL SWC) is used to write the new version of the software into the preset area of the preset MCU, and detect and update the firmware when the system starts through the Bootloader mechanism; the diagnostic software component (Diagnostic SWC) is used to diagnose and monitor each ECU of the vehicle, and ensure the normal operation of the system by performing self-test and status reporting; the diagnostic communication management component (DCM) manages and processes the diagnostic communication of each ECU based on the communication bus, supports multiple diagnostic protocols (such as UDS, KWP2000) and schedules diagnostic requests and responses to ensure smooth and reliable communication during and after the flashing process. Through the collaborative work of these components, the flashing module 3 can achieve efficient and secure firmware updates and system diagnosis.
[0044] Furthermore, as an embodiment of the present invention, the MCU includes at least core 1 and core 2, the flashing module 3 is configured on the core 1, and the high-voltage in-loop detection module 4 is configured on the core 2; the core 1 and core 2 each use independent clock scheduling.
[0045] Specifically, the MCU includes at least core 1 and core 2. The flashing module 3 is configured on core 1, responsible for writing the new version of the software into the preset area through the firmware boot loader component, and diagnosing and monitoring the vehicle ECU through the diagnostic software component and the diagnostic communication management component; the high-voltage in-loop detection module 4 is configured on core 2, independently running the high-voltage in-loop detection program and the high-voltage power-on control program, and ensuring that the tasks of core 1 and core 2 do not interfere with each other through independent clock scheduling. Each core realizes efficient parallel processing and continuous monitoring of the high-voltage system during the flashing process through independent clock scheduling and resource allocation mechanisms, ensuring the safety and stability of the system during FOTA flashing.
[0046] Furthermore, as an embodiment of the present invention, the flash bus and the communication bus are respectively deployed on different external communication buses, the flash bus is used to realize the FOTA flash communication between the high-voltage in-loop detection associated controller and the central gateway 2, and the communication bus is used to realize the high-voltage in-loop detection communication between the high-voltage in-loop detection associated controller and the central gateway 2.
[0047] Specifically, refer to Figure 3 , the flash bus and the communication bus are respectively deployed on different external communication buses, wherein the flash bus is used to realize the FOTA flash communication between the high-voltage in-loop detection associated controller and the central gateway 2, and the communication bus is used to realize the high-voltage in-loop detection communication between the high-voltage in-loop detection associated controller and the central gateway 2. In practical applications, an independent Ethernet bus can be used as a flash bus to ensure high-bandwidth and low-latency firmware transmission; at the same time, the CAN / CANFD bus is used as a communication bus to specifically handle real-time data exchange of high-voltage in-loop detection. Through this separate bus architecture design, it is ensured that the real-time monitoring and safety of high-voltage in-loop detection are not affected during FOTA flashing, thereby improving the overall stability and reliability of the system.
[0048] Furthermore, as another embodiment of the present invention, the refresh bus is deployed on an external communication bus, and the communication bus is deployed on an internal communication bus of each high-voltage in-loop detection associated controller; the refresh bus is used to realize the FOTA flash communication between the high-voltage in-loop detection associated controller and the central gateway 2, and the communication bus is used to realize the internal communication of each high-voltage in-loop detection associated controller.
[0049] Specifically, refer to Figure 4 and Figure 5The flash bus is deployed on the external communication bus to realize the FOTA flash communication between the high-voltage in-loop detection associated controller and the central gateway 2, while the communication bus is deployed on the internal communication bus of each high-voltage in-loop detection associated controller to realize the internal communication of each high-voltage in-loop detection associated controller. Figure 4 The multi-in-one ECU shown in the figure is the high voltage in-loop detection Ecu_1~Ecu_n combined into one Ecu; Figure 5 The high-voltage in-loop detection module 4 shown in the figure combines the high-voltage in-loop detection Ecu_1~Ecu_n into one module and serves as only one of the software modules of a certain ECU. In practical applications, the FOTA flash bus can be designed as an independent Ethernet channel to provide high-bandwidth and low-latency firmware transmission; and the communication bus of the high-voltage in-loop detection is designed as an internal CAN / CANFD bus to ensure real-time performance and reliability. This architectural design ensures that when performing FOTA flashing, the high-voltage in-loop detection function can run independently without being affected by external flashing communications, thereby improving the overall stability and security of the system.
[0050] Furthermore, as an embodiment of the present invention, the MCU includes area A and area B with the same structural design, area A is the area where the current software version runs, and area B is the area where the new version of the software is written. After the restart module 5 completes the unified restart of the vehicle controller, area B becomes the area where the current version runs.
[0051] Specifically, during the FOTA flashing process, the firmware bootloader component writes the new version of the software to area B, while area A continues to run the existing software version; after the flashing is completed, the restart module 5 restarts the vehicle controller uniformly according to the preset restart sequence, so that the system loads and runs the new version of the software from area B, and switches area B to the current version running area. Through this dual-zone design, the stability and security of the system can be ensured during the software update process. Even if the new version fails to be flashed, the system can still run the original version of the software from area A. In addition, the dual-zone structure can also implement the version rollback function through the boot loader to improve the reliability of the system.
[0052] For example, refer to Figure 6, Area A and Area B have the same structure, both contain FBL (Firmware Bootloader) + DCM (Diagnostic Communication Manager) and Normal App (application), which are deployed on Core 1 and Core 2 / Core 3 of the MCU respectively. Before flashing, Area A is the area where the current software version runs, and FBL + DCM and Normal App are running (marked as running in the figure). During the FOTA flashing process, the new version of the software will be written to Area B, and Area B does not run any software at this time (marked as not running in the figure). The flashing is completed through the Bootloader, and the new version is written to Area B from the boot loader in Area A. After the flashing is completed, the restart module 5 restarts the vehicle controller uniformly according to the preset restart order. After restarting, the MCU switches to Area B to run the new software version (Area B becomes running in the figure), and Area A becomes non-running (Area A becomes not running in the figure).
[0053] Based on the FOTA flashing system described in the embodiment of the present invention, by setting the high-voltage in-loop detection associated controller to the last position of the restart sequence, using an independent flashing bus and communication bus to perform FOTA flashing and high-voltage in-loop detection communication respectively, adopting the dual-zone (A zone and B zone) structure design of the MCU and the split core (core 1 and core 2 / core 3) to run the flashing module 3 and the high-voltage in-loop detection module 4, a safe, stable and efficient firmware update of the vehicle ECU under high-voltage power supply is achieved. This design not only ensures the continuous monitoring and high-voltage safety of the system during the flashing process, but also avoids mutual interference during the flashing process through independent clock scheduling and resource allocation, improves the overall reliability of the system and the success rate of FOTA flashing, extends the service life of the low-voltage battery, and optimizes the update process of the vehicle controller.
[0054] Based on the FOTA flashing system described in any of the above embodiments, an embodiment of the present invention further discloses a FOTA flashing method.
[0055] Reference Figure 7 , a FOTA flashing method, comprising: S1, obtaining the flashing order and restart group attributes of the vehicle controller, wherein the restart group attributes include setting the high-voltage in-loop detection associated controller to the last position in the restart order; S2, remotely acquiring a flashing message, and routing the flashing message to a flashing bus based on the flashing sequence; S3, receiving the flashing message through the flashing bus, and writing the new version of the software corresponding to the flashing message into a preset area of the preset MCU; S4, sending and receiving detection messages through the communication bus to realize the detection function of the high-voltage in-loop detection associated controller; S5: restart the vehicle controllers in a unified manner based on the restart group attributes to complete activation of the new version of the software. Wherein, step S3 and step S4 can be performed simultaneously.
[0056] Specifically, first, the flashing order and restart group attributes of the vehicle controller are obtained through the attribute configuration module 1 to ensure that the high-voltage in-loop detection associated controller is at the end of the restart order; then, the central gateway 2 remotely obtains the flashing message and routes the message to the flashing bus according to the flashing order; then, the flashing module 3 receives the flashing message through the flashing bus and writes the new version of the software into the preset area of the MCU. At the same time, the high-voltage in-loop detection module 4 sends and receives the detection message through the communication bus to ensure the normal operation of the high-voltage in-loop detection function; finally, the restart module 5 uniformly restarts the vehicle controller according to the restart group attributes and activates the new version of the software, thereby realizing safe and efficient firmware updates and system detection under high-voltage power supply. In this way, the stability of the high-voltage system and the continuity of the detection function during the flashing process are ensured, and the success rate of FOTA flashing and the system reliability are effectively improved.
[0057] Step S3 and step S4 can be performed simultaneously, ensuring that during the firmware flashing process, the high-voltage in-loop detection module 4 can continue to operate and perform real-time monitoring to ensure the safety and stability of the high-voltage system. This not only improves the flashing efficiency and reduces system downtime, but also enhances the system security and stability, prevents safety accidents caused by high-voltage abnormalities, and ultimately improves the success rate of FOTA flashing and the reliability of the system.
[0058] For example, refer to Figure 8 ,by Figure 8 Taking the MCU in as an example, the FOTA flash writing method implementation steps described in the embodiment of the present invention include: Step 1: Configure the vehicle ECU according to the method in Table 2, or other similar sequence and restart group configuration; Step 2: Assuming that the MCU in the figure is currently running in area A, the CGW central gateway 2 routes the flash message to the flash bus 2 (refresh bus), and the FBL and DCM running on the MCU core 1 receive the flash message from the flash bus and feed back the flash result to bus 2. Through this process, the new version of the software is flashed to area B of the MCU; Step 3: During the MCU flashing process in Step 2, the high-voltage in-loop detection module 4 running on the core 2 / core 3 of the MCU can normally receive and send relevant messages through bus 1 (communication bus) to ensure the normal operation of the high-voltage in-loop detection function. If the network topology is Figure 4 or Figure 5 In the design, the high-voltage in-loop detection service communication is completed inside the MCU; Step 4: According to the configuration in Step 1, after all ECUs of the vehicle are flashed, the high-voltage in-loop detection associated controller is reset and activated at the end, and the flashing process ends; Step 5: After the flashing is completed, the programs running on cores 1 to 3 on the MCU are uniformly loaded from area B to complete the activation of the new version.
[0059] The above Step 2 and Step 3 can be performed simultaneously, thus ensuring that when the MCU is flashed, the vehicle is in a high-voltage power supply state, and that services such as high-voltage in-loop detection operate normally, meeting the functional safety requirements of high-voltage power-on. And from the above Step 1 to Step 5, it can be seen that when FOTA flashes all ECUs of the vehicle, the high voltage process no longer needs to be disconnected in the middle.
[0060] The embodiment of the present invention also discloses a readable storage medium.
[0061] A readable storage medium stores a computer program, which implements the steps of the FOTA flash writing method described in any one of the above embodiments when executed by a processor. Computer-readable storage media may include: any entity or device capable of carrying a computer program, a recording medium, a U disk, a mobile hard disk, a disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), and a software distribution medium, etc. The computer program includes a computer program code. The computer program code may be in source code form, object code form, an executable file, or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying a computer program code, a recording medium, a U disk, a mobile hard disk, a disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), and a software distribution medium, etc.
[0062] The embodiment of the present invention also discloses a vehicle.
[0063] A vehicle, the vehicle is configured with a FOTA flashing system as described in any one of the above embodiments. Specifically, a central gateway 2, an attribute configuration module 1, a flashing module 3, a high-voltage in-loop detection module 4 and a restart module 5 are integrated in the vehicle; the central gateway 2 is connected to the OEM's TSP server through a remote communication channel to obtain the flashing message, the attribute configuration module 1 obtains the flashing sequence and restart group attributes of the vehicle controller, the flashing module 3 runs on the core 1 of the MCU and is responsible for writing the new software to the B area, the high-voltage in-loop detection module 4 runs on the core 2 and performs real-time monitoring of the high-voltage system through the internal communication bus, and the restart module 5 uniformly restarts the vehicle controller after the flashing is completed according to the configuration, thereby realizing safe and efficient firmware updates and system monitoring of the vehicle under high-voltage power supply.
[0064] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0065] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.
[0066] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A FOTA flashing system, characterized in that: include: The attribute configuration module (1) is used to obtain at least the flashing sequence and restart group attribute of the vehicle controller, wherein the restart group attribute includes setting the high voltage in-loop detection associated controller as the last position in the restart sequence; A central gateway (2), at least used for remotely acquiring a flashing message, and routing the flashing message to a flashing bus based on the flashing sequence; A flashing module (3) is at least used to receive the flashing message via a flashing bus, and write the new version of software corresponding to the flashing message into a preset area of a preset MCU; A high-voltage in-loop detection module (4) is at least used for transmitting and receiving detection messages via a communication bus to implement a detection function of the high-voltage in-loop detection associated controller; and a restart module (5), at least used to uniformly restart the vehicle controller based on the restart group attribute to complete the activation of the new version of the software; The flashing module (3) and the high-voltage in-loop detection module (4) are configured on different cores of the MCU.
2. The FOTA flash writing system according to claim 1, characterized in that: The step of setting the high voltage in-loop detection associated controller to the last position in the restart sequence comprises: The restart order of multiple high-voltage in-loop detection associated controllers is set to the same value to achieve parallel restart of each high-voltage in-loop detection associated controller.
3. The FOTA flash writing system according to claim 1, characterized in that: The flashing module (3) comprises a firmware boot loading component, a diagnostic software component and a diagnostic communication management component; wherein: The firmware boot loader component is used to write the new version of the software into a preset area of the preset MCU; The diagnostic software component is used to diagnose and monitor various ECUs of the vehicle; The diagnostic communication management component is used to manage and process diagnostic communications of various ECUs of the vehicle based on the communication bus.
4. The FOTA flash writing system according to claim 1, characterized in that: The MCU comprises at least a core 1 and a core 2, the flashing module (3) is configured on the core 1, and the high-voltage in-loop detection module (4) is configured on the core 2; the core 1 and the core 2 each use independent clock scheduling.
5. The FOTA flash writing system according to claim 1, characterized in that: The flash bus and the communication bus are respectively deployed on different external communication buses, the flash bus is used to realize FOTA flash communication between the high-voltage in-loop detection associated controller and the central gateway (2), and the communication bus is used to realize high-voltage in-loop detection communication between the high-voltage in-loop detection associated controller and the central gateway (2).
6. The FOTA flash writing system according to claim 1, characterized in that: The refresh bus is deployed on an external communication bus, and the communication bus is deployed on an internal communication bus of each high-voltage in-loop detection associated controller; the refresh bus is used to realize FOTA flash communication between the high-voltage in-loop detection associated controller and the central gateway (2), and the communication bus is used to realize internal communication of each high-voltage in-loop detection associated controller.
7. The FOTA flash writing system according to claim 1, characterized in that: The MCU comprises an A area and a B area with the same structural design, wherein the A area is an area where the current software version runs, and the B area is an area where the new version software is written. After the restart module (5) completes the unified restart of the vehicle controller, the B area becomes the area where the current version runs.
8. A FOTA flashing method, applied to the FOTA flashing system as claimed in any one of claims 1 to 7, characterized in that: The method comprises: Obtaining the flashing order and restart group attributes of the vehicle controller, wherein the restart group attributes include setting the high-voltage in-loop detection associated controller to the last position in the restart order; remotely acquiring a flashing message, and routing the flashing message to a flashing bus based on the flashing sequence; Receive the flash message through the flash bus, and write the new version of software corresponding to the flash message into a preset area of the preset MCU; Sending and receiving detection messages via a communication bus to implement a detection function of the high-voltage in-loop detection associated controller; And, based on the restart group attribute, the vehicle controller is restarted uniformly to complete the activation of the new version of the software.
9. A readable storage medium, characterized in that: The readable storage medium stores computer instructions, and when the computer instructions are executed by the processor, the FOTA flashing method as described in claim 8 is implemented.
10. A vehicle, characterized in that: The vehicle is equipped with a FOTA flashing system as described in any one of claims 1-7.
