Vehicle-mounted BMS program flashing method based on UDS protocol

Through the on-board BMS program flashing method based on the UDS protocol, the problem of separately developing a dedicated flashing computer in BMS development and production is solved, and a general flashing framework is realized, saving costs and speeding up work efficiency.

CN119847556AInactive Publication Date: 2025-04-18BOZU TECH (SUZHOU) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411759570.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the development and production of BMS, it is necessary to develop a dedicated brushing computer for each project, resulting in waste of time and increased costs.

Method used

The on-board BMS program flashing method based on the UDS protocol is adopted to realize a general flashing framework by configuring the flashing process, setting CAN parameters, connecting the host computer and CAN tools, loading configuration files and HEX files.

Benefits of technology

There is no need to develop a dedicated computer for flashing, saving costs, speeding up work efficiency, and implementing flashing in different projects through manual configuration processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847556A_ABST
    Figure CN119847556A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle-mounted BMS program flashing method based on a UDS protocol, and the method comprises the steps: configuring a flashing process for a BMS program, and enabling the configured flashing process to generate a configuration file for storage; cAN parameters are set, a request ID and a response ID of UDS service are configured, and a CAN tool is initialized; an upper computer is connected with the CAN tool, the configuration file is loaded after connection succeeds, the flashing process file of the corresponding project is imported, and then the HEX file needing to be flashed is loaded; starting to flash and execute a configuration file flash process, and monitoring the flash process until the flash is successful after the process is executed; closing the CAN and quitting the flashing process to finish flashing; according to the application, a universal flashing framework can be used, flashing can be realized in different projects through a manual configuration process, the flashing process can be configured to generate a file for storage, and the configuration file can be directly loaded for flashing when software of the project is flashed next time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of BMS technology, and in particular to a method for flashing a vehicle-mounted BMS program based on the UDS protocol. Background Art

[0002] The battery management system BMS (BATTERY MANAGEMENT SYSTEM) consists of hardware and software. The software needs to run in the hardware, so a tool is needed to transfer the software to the MCU in the hardware so that the entire BMS can run. In the development process of BMS, it is generally necessary to develop a program to transfer the software to the MCU of the hardware to test and verify the reliability of the software and hardware, and when the BMS is offline, the normally used software needs to be transferred to the MCU. Generally, each project needs to develop a dedicated flashing host computer for the project's dedicated flashing program, which is a waste of time. Summary of the invention

[0003] In order to overcome the above shortcomings, the purpose of this application is to provide a vehicle-mounted BMS program flashing method based on the UDS protocol, thereby solving the above technical problems.

[0004] In order to achieve the above objectives, this application adopts the following technical solutions:

[0005] The present application provides a method for flashing a vehicle BMS program based on the UDS protocol, the method comprising the following steps:

[0006] Step 1: Configure the flashing process for the BMS program, and save the configured flashing process to generate a configuration file.

[0007] Step 2: Set CAN parameters, configure the request ID and response ID of the UDS service, and initialize the CAN tool.

[0008] Step 3: Connect the host computer to the CAN tool, load the configuration file after the connection is successful, import the flashing process file of the corresponding project, and then load the HEX file that needs to be flashed.

[0009] Step 4: Start flashing the configuration file and monitor the flashing process until the flashing is successful after the process is completed.

[0010] Step 5. Close CAN to exit the flashing process and complete the flashing.

[0011] Furthermore, the flashing process of the BMS program includes entering the default session, expanding the session, checking the refresh safety conditions, fault code control, prohibiting communication, entering the refresh session, secure access, writing the refresh date, writing the serial number, erasing the memory, requesting download, transmitting data, requesting exit, checking the refresh reliability, and resetting, wherein in step one, when configuring the flashing process of the BMS program, a different message ID is set for each process.

[0012] Furthermore, setting a different message ID for each process includes configuring a request message and a response message for each process.

[0013] Furthermore, after the corresponding request message and response message are configured for each process, a flashing interface is formed, and then the required process is selected according to the project requirements and dragged from the flashing interface to the configuration process interface, so that the configuration process interface forms a flashing process configuration list.

[0014] Furthermore, a location where the configuration file needs to be saved is input in the configuration process interface so that all processes in the configuration process interface are saved as configuration files.

[0015] Furthermore, after the host computer sends the request message to the BMS, it needs to receive the specified response message. If it is successfully received, it will proceed to the next step. If it fails, it will return the flash failure and exit the flash process.

[0016] Furthermore, step 2 of setting CAN parameters includes setting the baud rate and selecting whether it is CANFD communication.

[0017] Furthermore, the host computer establishes a communication connection with the CAN tool via a USB cable, and the CAN tool establishes a communication connection with the BMS via a CAN_H signal line and a CAN_L signal line of the CAN bus.

[0018] Beneficial Effects

[0019] This application will use a universal flashing framework, and flashing can be achieved by manually configuring the process in different projects. The flashing process configuration can generate a file for saving. The next time you flash the software of this project, you can directly load the configuration file for flashing. There is no need to develop a dedicated flashing host computer separately, which saves costs and speeds up work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to provide an understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure. The shapes and sizes of the components in the accompanying drawings do not reflect the actual proportions and are only intended to illustrate the content of the present application.

[0021] Figure 1 This is a flow chart of the vehicle BMS program flashing method based on the UDS protocol in this application.

[0022] Figure 2 A screenshot of the flash process configuration interface provided in an embodiment of the present application.

[0023] Figure 3 A screenshot of a configuration file saved in an embodiment of the present application.

[0024] Figure 4 A screenshot of the flashing software interface provided in one embodiment of the present application.

[0025] Figure 5 A schematic diagram of the connection between the host computer, CAN tool and BMS provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] The above scheme is further described below in conjunction with specific examples. It should be understood that these examples are used to illustrate the present application and are not limited to the scope of the present application. The implementation conditions adopted in the examples can be further adjusted as the conditions of the specific manufacturer, and the unspecified implementation conditions are usually the conditions in conventional experiments.

[0027] Unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. In this article, "electrical connection" includes the situation where the constituent elements are connected together through an element with some electrical function. "Elements with some electrical function" are not particularly limited as long as they can transfer electrical signals between the connected constituent elements. "Elements with some electrical function" can be, for example, electrodes or wiring, or switching elements such as transistors, or other functional elements such as resistors, inductors or capacitors. "Up", "down", "left", "right", etc. are only used to indicate relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.

[0028] In this application, the directions or positional relationships indicated by the terms "upper", "lower", "inner", "middle", etc. are based on the directions or positional relationships shown in the drawings. These terms are mainly used to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific direction, or to be constructed and operated in a specific direction.

[0029] As described in the background technology, when the BMS is offline, the normally used software needs to be transferred to the single-chip microcomputer. Generally, each project needs to develop a dedicated flashing host computer for the project-specific flashing program, which is very time-consuming. To solve this problem, the inventor provides a vehicle-mounted BMS program flashing method based on the UDS protocol, such as Figure 1 As shown, the method comprises the following steps:

[0030] S1. Configure a flashing process for the BMS program, and save the configured flashing process to generate a configuration file.

[0031] S2. Set CAN parameters, configure the request ID and response ID of the UDS service, and initialize the CAN tool.

[0032] S3. Connect the host computer to the CAN tool, load the configuration file after the connection is successful, import the flashing process file of the corresponding project, and then load the HEX file that needs to be flashed.

[0033] S4. Start flashing the execution configuration file flashing process and monitor the flashing process until the flashing is successful after the process is completed.

[0034] S5. Close CAN to exit the flashing process and complete the flashing.

[0035] This application will use a universal flashing framework, and flashing can be achieved by manually configuring the process in different projects. The flashing process configuration can generate a file for saving. The next time you flash the software of this project, you can directly load the configuration file for flashing. There is no need to develop a dedicated flashing host computer separately, which saves costs and speeds up work efficiency.

[0036] Next, combine Figure 2-Figure 5 The present application is described exemplarily.

[0037] An embodiment of the present application provides a method for flashing a vehicle BMS program based on the UDS protocol, the method comprising:

[0038] Configure the flash process for the BMS program and save the configured flash process as a configuration file. Figure 2As shown in the figure, it is a UDS (Unified Diagnostic Service) communication protocol flashing process of a BMS program. The process is to enter the default session, expand the session, check the flash safety conditions, control the fault code, prohibit communication, enter the flash session, secure access, write the flash date, write the serial number, erase the memory, request download, transfer data, request exit, check the flash reliability, and reset. In different projects, these processes will be different, and the message IDs used will also be different. Set the above process as a self-configurable process to match different projects, such as Figure 2 As shown in the figure, it is a software configuration interface diagram. After completing the corresponding request message and response message for each process, a flashing interface is formed. Then, according to the project requirements, select the process to be used and drag it from the flashing interface to the configuration process interface, so that the configuration process interface forms a flashing process configuration list. In the configuration process interface, enter the location where the configuration file needs to be saved so that all the processes in the configuration process interface form configuration files for saving. The saved file format is as follows: Figure 3 shown.

[0039] Set CAN parameters, configure the request ID and response ID of the UDS service, and initialize the CAN tool, such as Figure 4 As shown, the first step is to set the CAN parameters, set the baud rate and whether it is CANFD communication, configure the request ID and response ID of the UDS service, and initialize the CAN tool. Click the BUS_ON button to connect the host computer to the CAN tool. If the connection is successful, the CAN status light will turn green. A red light indicates that CAN initialization failed. Then load the configuration file, import the flashing process file of the corresponding project, and then load the HEX file that needs to be flashed. Click the RUN button to start flashing the execution configuration file flashing process. The flashing process monitoring will show which step is currently executed. After the process is executed, the flashing is successful and CAN is closed to exit the flashing process.

[0040] like Figure 5 As shown, in some embodiments, the host computer establishes a communication connection with the CAN tool via a USB cable, and the CAN tool establishes a communication connection with the BMS via the CAN_H signal line and the CAN_L signal line of the CAN bus.

[0041] The above embodiments are only for illustrating the technical concept and features of the present application, and their purpose is to enable people familiar with the technology to understand the content of the present application and implement it accordingly, and they cannot be used to limit the protection scope of the present application. Any equivalent transformation or modification made according to the spirit of the present application shall be included in the protection scope of the present application.

Claims

1. A vehicle-mounted BMS program flashing method based on the UDS protocol, characterized in that: The method comprises the following steps: Step 1: Configure the flashing process for the BMS program, and save the configured flashing process to generate a configuration file. Step 2: Set CAN parameters, configure the request ID and response ID of the UDS service, and initialize the CAN tool. Step 3: Connect the host computer to the CAN tool, load the configuration file after the connection is successful, import the flashing process file of the corresponding project, and then load the HEX file that needs to be flashed. Step 4: Start flashing the configuration file and monitor the flashing process until the flashing is successful after the process is completed. Step 5. Close CAN to exit the flashing process and complete the flashing.

2. The vehicle-mounted BMS program flashing method based on the UDS protocol as claimed in claim 1 is characterized in that: The flashing process of the BMS program includes entering the default session, expanding the session, checking the flashing safety conditions, fault code control, prohibiting communication, entering the flashing session, secure access, writing the flashing date, writing the serial number, erasing the memory, requesting download, transmitting data, requesting exit, checking the flashing reliability, and resetting. In step one, when configuring the flashing process of the BMS program, different message IDs are set for each process.

3. The vehicle-mounted BMS program flashing method based on the UDS protocol as claimed in claim 2 is characterized in that: Setting a different message ID for each process includes configuring a request message and a response message for each process.

4. The vehicle-mounted BMS program flashing method based on the UDS protocol as claimed in claim 3 is characterized in that: After completing the configuration of the corresponding request message and response message for each process, a flashing interface is formed. Then, according to the project requirements, select the required process and drag it from the flashing interface to the configuration process interface, so that the configuration process interface forms a flashing process configuration list.

5. The vehicle-mounted BMS program flashing method based on the UDS protocol as claimed in claim 4 is characterized in that: Input the location where the configuration file needs to be saved in the configuration process interface so that all processes in the configuration process interface are saved as configuration files.

6. The vehicle-mounted BMS program flashing method based on the UDS protocol as claimed in claim 5 is characterized in that: After the host computer sends the request message to the BMS, it needs to receive the specified response message. If it is successfully received, it will proceed to the next step. If it fails, it will return the flash failure and exit the flash process.

7. The vehicle-mounted BMS program flashing method based on the UDS protocol as claimed in claim 1 is characterized in that: Step 2: Set CAN parameters including baud rate and select whether to use CANFD communication.

8. The vehicle-mounted BMS program flashing method based on the UDS protocol as claimed in claim 1 is characterized in that: The host computer establishes a communication connection with the CAN tool via a USB cable, and the CAN tool establishes a communication connection with the BMS via a CAN_H signal line and a CAN_L signal line of the CAN bus.

Citation Information

Cited By

  • Software rapid configuration method and system for electronic control system of new energy automobile

    CN121680961A