Vehicle-mounted controller firmware upgrading method and device based on common IO port
By adopting a firmware upgrade method based on ordinary IO port in the vehicle controller, using the serial port interface and ordinary IO port for data transmission, and adding data checksum comparison process, the problem of unused bus interface devices is solved, and a high reliability and simple firmware upgrade process is achieved.
Patent Information
- Application Number
- CN202510389354.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, program upgrades of on-board controllers need to rely on bus protocols supported by hardware devices, resulting in the inability to perform effective program upgrades for devices without bus interfaces, such as automotive electronic fan controllers.
The on-board controller firmware upgrade method based on ordinary IO port is adopted, and data transmission is carried out through the combination of PCBA circuit board and aluminum shell, and the serial port interface and ordinary IO port are used to realize online and offline fire recording and upgrade, and the data checksum comparison process is added during the data transmission process to ensure the reliability of data transmission.
It realizes high-reliability data transmission without bus peripheral requirements on hardware circuits, ensures the consistency and effectiveness of data transmission between the upper computer and the on-board controller, makes the operation of the automotive electronic water pump more reliable and stable, and simplifies the firmware upgrade process of on-board electronic equipment.
Smart Images

Figure CN119906526A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle-mounted controllers, and in particular to a method and a device for upgrading the firmware of a vehicle-mounted controller based on a common IO port. Background Art
[0002] At present, the controller program upgrade method needs to rely on bus protocols such as LIN, CAN, and UART for data transmission, which limits the scope of program upgrade to hardware devices. For example, for automotive electronic fan controller devices whose PWM control devices do not have bus interfaces, there is no effective means to upgrade the program.
[0003] For example, the method for upgrading the vehicle controller mentioned in application number: CN202410966699.0 does not discuss the process and method of data transmission.
[0004] For example, application number: CN202410720468.1 still requires data transmission and firmware upgrade through a bus protocol supported by hardware. Summary of the invention
[0005] In view of the above problems, the present invention provides a method and device for upgrading the firmware of an on-board controller with high-reliability data transmission and no limitation of hardware devices. The on-board controller in the present invention is an on-board water pump / fan controller.
[0006] The technical solution adopted by the present invention to solve the above technical problems is: a device for upgrading the firmware of a vehicle controller based on a common IO port, comprising a PCBA circuit board and an aluminum shell, one end of the aluminum shell is provided with a device power interface and a serial port interface, the other end of the aluminum shell is provided with a signal and power output interface, a control button and an upgrade result power indicator light, the aluminum shell is also provided with an LED display screen, and the device power interface, serial port interface, signal and power output interface, control button, and upgrade result power indicator light are all electrically connected to the PCBA circuit board.
[0007] Preferably, the PCBA circuit board distinguishes data in IO port communication into data 0 and data 1 by setting different high and low level cycles.
[0008] Preferably, the time of the high and low level cycle is set to 3t, wherein 1t of low level + 2t of high level is taken as data 1, and 2t of low level + 1t of high level is taken as data 0.
[0009] Preferably, the format of each frame of data transmitted by the PCBA circuit board in IO port communication is set to frame header + synchronization bit + frame data length + data + check, the frame header is a low level of time>4t, the synchronization bit is 0x55, the frame data length is 1 byte, the data is N bytes, and the check is 1 byte.
[0010] The present invention also includes a method for upgrading the firmware of a vehicle-mounted controller based on a common IO port, which uses the above-mentioned device for upgrading, and the upgrading method includes online burning upgrade and offline burning upgrade.
[0011] Preferably, the online burning upgrade comprises the following steps: Step S1: connect the host computer to the serial port interface of the device through the serial port, connect the device power interface of the device to the power supply, connect the signal output interface of the signal and power output interface of the device to the communication port of the vehicle controller to be upgraded, and connect the power supply to the power port of the vehicle controller normally. At the same time, set the data transmission and verification function on the host computer, set the data reading, data storage and data verification function on the vehicle controller, when the host computer sends data to the vehicle controller, the device enters the communication state as a communication relay board, and the host computer receives the external input data file, reads the data and sends it to the vehicle controller through the device; Step S2: The on-board controller verifies the reliability of the data through the data reading function and the data verification function. After the data is verified to be correct, the data is saved in the specified memory unit through the data storage. If an error occurs in the data verification, step S3 is entered. If the data is normal, this operation is repeated until all the data in the external data file input by the host computer are transmitted. After the transmission is completed, the data verification function will verify the data in the memory unit of the on-board controller again and compare it with the verification data sent by the host computer. If it is correct, it is considered that the data upgrade is successfully completed, and the power indicator light of the device upgrade result will light up; Step S3: Set the maximum number of communication failures. When the vehicle-mounted controller receives a communication abnormality signal and the number of receptions is less than the maximum number of communication failures, it sends a data request instruction to the host computer again to request the resending of the last data, and returns to step S2 to continue execution; if the vehicle-mounted controller receives a communication abnormality signal and the number of receptions reaches the maximum number of communication failures, the vehicle-mounted controller sends a stop command to stop the data transmission process.
[0012] Preferably, the offline burning upgrade comprises the following steps: Step S1: connect the host computer to the serial port interface of the device through the serial port, connect the device power interface of the device to the power supply, the host computer receives the external input data file to read the data and transmit the data to the device through the serial port, the device verifies the reliability of the data through the data reading function and the data verification function, and stores the data in the designated memory area after verifying that the data is correct, and repeats the whole process until all the data in the external data file input by the host computer are transmitted. After the transmission is completed, the data verification function will verify the data in the memory unit of the PCBA circuit board of the device again, and compare it with the verification data sent by the host computer. If it is correct, it is considered that the data upgrade is successfully completed. At the same time, the LED display screen of the device will display the name of the external data file, and confirm the use when the vehicle controller firmware is upgraded; Step S2: Connect the device power interface of the device to the female connector, and connect the signal and power output interface of the device to the male connector. When in use, unplug the vehicle controller and the car battery connector, connect the male end of the car battery to the female end of the device, and connect the male end of the device to the female end of the vehicle controller. Press the corresponding control button of the device to upgrade the program. The LED display screen displays the progress and results of the program upgrade. After the burning is completed, the upgrade result power indicator light of the device will light up.
[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. The data transmission method of the present invention has no bus peripheral requirements in the hardware circuit, and adds a data consistency comparison process. The transmitted data is verified through the controller verification function. The data transmission process is completed only when the controller verification value is consistent with the host computer verification value. When the comparison fails continuously until the set number of times is reached, the transmission is stopped, thereby ensuring that the data sent by the host computer and received by the controller are transmitted and stored with consistent data content, greatly improving the reliability and effectiveness of the data transmission between the host computer and the vehicle controller, making the operation process of the automotive electronic water pump more reliable and stable, or meeting the required operating performance requirements; 2. The offline burning upgrade of the present invention completes the burning preparation work of step S1 once before burning. When burning in step S2, only the device needs to be carried, without carrying a computer or other equipment, making it easier to flash the vehicle-mounted electronic water pump or vehicle-mounted electronic fan on the vehicle end. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a schematic diagram of the structure of the device of the present invention; Figure 2 It is a bit timing diagram of data transmission of the present invention; Figure 3 This is a schematic diagram of the online burning connection of the present invention; Figure 4 It is a schematic diagram of offline burning connection of the present invention. DETAILED DESCRIPTION
[0015] The following will be combined Figure 1-4 The present invention is described in detail. The exemplary embodiments and descriptions of the present invention are used to explain the present invention but are not intended to limit the present invention.
[0016] A method and device for upgrading the firmware of an on-board controller based on a common IO port, comprising a PCBA circuit board and an aluminum shell, wherein one end of the aluminum shell is provided with a device power interface 1 and a serial port interface 2, and the other end of the aluminum shell is provided with a signal and power output interface 4, a control button 5 and an upgrade result power indicator 6. Specifically, the control buttons can be designed in a corresponding number according to requirements, including an upgrade button start button, and there are two upgrade result power indicator lights, namely, an upgrade success power indicator light and an upgrade failure power indicator light. The aluminum shell is also provided with an LED display screen 3, and the device power interface, the serial port interface, the signal and power output interface, the control button, and the upgrade result power indicator light are all electrically connected to the PCBA circuit board.
[0017] A piece of data in IO port communication consists of high and low levels. Our PCBA circuit board distinguishes the data in IO port communication into data 0 and data 1 by setting different high and low level cycles. Specifically, the time of a data high and low level cycle is set to 3t, where 1t low level + 2t high level is used as data 1, and 2t low level + 1t high level is used as data 0. The bit timing diagram is as follows Figure 2 shown.
[0018] To ensure the reliability of the transmitted data, our PCBA circuit board sets the format of each frame of data transmitted in the IO port communication to frame header + synchronization bit + frame data length + data + checksum. The frame header is a low level with a time > 4t, the synchronization bit is 0x55, the frame data length is 1 byte, the data is N bytes, and the checksum is 1 byte, as shown in the following table: Frame Header Sync bit Frame data length data check Low level for time>4t 0x55 1 byte N bytes 1 byte .
[0019] The method for upgrading the firmware of the vehicle-mounted controller based on the common IO port provided by the present invention realizes the upgrading through the above-mentioned device, and the upgrading method in the implementation process includes online burning upgrading and offline burning upgrading.
[0020] Among them, the online burning upgrade includes the following steps: Step S1: connect the host computer to the serial port interface 2 of the device through the serial port, connect the device power interface 1 of the device to the power supply, connect the signal output interface in the signal and power output interface 4 of the device to the communication port of the vehicle controller to be upgraded, and connect the power supply to the power port of the vehicle controller normally. At the same time, set the data transmission and verification function on the host computer, set the data reading, data storage and data verification function on the vehicle controller, when the host computer sends data to the vehicle controller, the device enters the communication state as a communication relay board, and the host computer receives the external input data file, reads the data and sends it to the vehicle controller through the device; Step S2: The on-board controller verifies the reliability of the data through the data reading function and the data verification function. After the data is verified to be correct, the data is saved in the specified memory unit through the data storage. If an error occurs in the data verification, step S3 is entered. If the data is normal, this operation is repeated until all the data in the external data file input by the host computer are transmitted. After the transmission is completed, the data verification function will verify the data in the memory unit of the on-board controller again and compare it with the verification data sent by the host computer. If it is correct, it is considered that the data upgrade is successfully completed, and the power indicator light 6 of the device upgrade result will light up; Step S3: Set the maximum number of communication failures. When the vehicle-mounted controller receives a communication abnormality signal and the number of receptions is less than the maximum number of communication failures, it sends a data request instruction to the host computer again to request the resending of the last data, and returns to step S2 to continue execution; if the vehicle-mounted controller receives a communication abnormality signal and the number of receptions reaches the maximum number of communication failures, the vehicle-mounted controller sends a stop command to stop the data transmission process.
[0021] The data transmission of online burning and upgrading has no bus peripheral requirements in the hardware circuit, and adds a data consistency comparison process. The transmitted data is verified through the controller verification function. The data transmission process is completed only when the controller verification value is consistent with the host computer verification value. When the comparison fails continuously until the set number of times is reached, the transmission is stopped, thereby ensuring that the data sent by the host computer and received by the controller are transmitted and stored with consistent data content, greatly improving the reliability and effectiveness of the data transmission between the host computer and the vehicle controller, making the operation process of the automotive electronic water pump more reliable and stable, or able to meet the required operating performance requirements.
[0022] The offline burning upgrade includes the following steps: Step S1: connect the host computer to the serial port interface 2 of the device through the serial port, connect the device power interface 1 of the device to the power supply, the host computer receives the external input data file to read the data and transmit the data to the device through the serial port, the device verifies the reliability of the data through the data reading function and the data verification function, and stores the data in the designated memory area after verifying that the data is correct, and repeats the whole process until all the data in the external data file input by the host computer are transmitted. After the transmission is completed, the data verification function will verify the data in the memory unit of the PCBA circuit board of the device again, and compare it with the verification data sent by the host computer. If it is correct, it is considered that the data upgrade is successfully completed. At the same time, the LED display screen of the device will display the name of the external data file, and confirm the use when the vehicle controller firmware is upgraded; Step S2: Connect the device power interface 1 of the device to the female connector, and connect the signal and power output interface 4 of the device to the male connector. When in use, unplug the vehicle controller and the car battery connector, connect the male end of the car battery to the female end of the device, and connect the male end of the device to the female end of the vehicle controller. Press the corresponding control button 5 of the device to upgrade the program. The LED display screen displays the progress and results of the program upgrade. After the burning is completed, the upgrade result power indicator light 6 of the device will light up.
[0023] After completing the preparation work of step S1 before burning, the offline burning upgrade only needs to carry the device during step S2 burning, without carrying a computer or other equipment, making it easier to flash the vehicle electronic water pump or vehicle electronic fan on the vehicle end.
[0024] The technical solutions provided by the embodiments of the present invention are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the embodiments of the present invention. The description of the above embodiments is only applicable to help understand the principles of the embodiments of the present invention. At the same time, for those skilled in the art, according to the embodiments of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A device for upgrading the firmware of a vehicle controller based on a common IO port, characterized in that: The invention comprises a PCBA circuit board and an aluminum housing, wherein one end of the aluminum housing is provided with a device power interface (1) and a serial port interface (2), and the other end of the aluminum housing is provided with a signal and power output interface (4), a control button (5) and an upgrade result power indicator light (6), and the aluminum housing is also provided with an LED display screen (3), and the device power interface, serial port interface, signal and power output interface, control button, and upgrade result power indicator light are all electrically connected to the PCBA circuit board.
2. The device for upgrading the vehicle controller firmware based on a common IO port according to claim 1, characterized in that: The PCBA circuit board distinguishes the data in the IO port communication into data 0 and data 1 by setting different high and low level cycles.
3. The device for upgrading the vehicle controller firmware based on a common IO port according to claim 2, characterized in that: The time of the high and low level cycle is set to 3t, wherein 1t of low level + 2t of high level is taken as data 1, and 2t of low level + 1t of high level is taken as data 0.
4. The device for upgrading the vehicle controller firmware based on a common IO port according to claim 3, characterized in that: The format of each frame of data transmitted by the PCBA circuit board in the IO port communication is set to frame header + synchronization bit + frame data length + data + check, the frame header is a low level of time>4t, the synchronization bit is 0x55, the frame data length is 1 byte, the data is N bytes, and the check is 1 byte.
5. A method for upgrading the firmware of a vehicle controller based on a common IO port, characterized in that: The device described in any one of claims 1 to 4 is used for upgrading, and the upgrading method includes online burning upgrading and offline burning upgrading.
6. The method for upgrading the vehicle controller firmware based on a common IO port according to claim 5, characterized in that: The online burning upgrade includes the following steps: Step S1: connect the host computer to the serial port interface (2) of the device through the serial port, connect the device power interface (1) of the device to the power supply, connect the signal output interface of the signal and power output interface (4) of the device to the communication port of the vehicle controller to be upgraded, connect the power supply to the power port of the vehicle controller normally, and set the data transmission and verification function on the host computer, and set the data reading, data storage and data verification function on the vehicle controller. When the host computer sends data to the vehicle controller, the device enters the communication state as a communication relay board, and the host computer receives the external input data file, reads the data and sends it to the vehicle controller through the device; Step S2: The on-board controller verifies the reliability of the data through the data reading function and the data verification function. After the data is verified to be correct, the data is saved in the designated memory unit through the data storage. If an error occurs in the data verification, the process proceeds to step S3. If the data is normal, the process repeats this operation until all the data in the external data file input by the host computer are transmitted. After the transmission is completed, the data verification function will verify the data in the memory unit of the on-board controller again and compare it with the verification data sent by the host computer. If it is correct, the data upgrade is considered to be successfully completed, and the power indicator light (6) of the device will light up. Step S3: Set the maximum number of communication failures. When the vehicle-mounted controller receives a communication abnormality signal and the number of receptions is less than the maximum number of communication failures, it sends a data request instruction to the host computer again to request the resending of the last data, and returns to step S2 to continue execution; if the vehicle-mounted controller receives a communication abnormality signal and the number of receptions reaches the maximum number of communication failures, the vehicle-mounted controller sends a stop command to stop the data transmission process.
7. The method for upgrading the vehicle controller firmware based on a common IO port according to claim 5, characterized in that: The offline burning upgrade includes the following steps: Step S1: The host computer is connected to the serial port interface (2) of the device through the serial port, and the device power interface (1) of the device is connected to the power supply. The host computer receives the data file input from the outside and reads the data and transmits the data to the device through the serial port. The device verifies the reliability of the data through the data reading function and the data verification function. After the data is verified to be correct, the data is stored in the designated memory area. The whole process is repeated until all the data in the external data file input by the host computer is transmitted. After the transmission is completed, the data verification function will verify the data in the memory unit of the PCBA circuit board of the device and compare it with the verification data sent by the host computer. If it is correct, it is considered that the data upgrade is successfully completed. At the same time, the LED display screen of the device will display the name of the external data file, and confirm the use when the vehicle controller firmware is upgraded; Step S2: Connect the device power interface (1) of the device to the female connector, and connect the signal and power output interface (4) of the device to the male connector. When in use, unplug the vehicle controller and the vehicle battery connector, connect the male connector of the vehicle battery to the female connector of the device, and connect the male connector of the device to the female connector of the vehicle controller. Press the corresponding control button (5) of the device to upgrade the program. The LED display screen displays the progress and result of the program upgrade. After the burning is completed, the upgrade result power indicator (6) of the device will light up.
Citation Information
Patent Citations
Method for realizing on-chip flash upgrading through multi-bus interface
CN118796238A
Vehicle-mounted controller firmware upgrading method, vehicle-mounted controller and system
CN118819586A
MCU software upgrading method and system of vehicle-mounted multimedia device, and storage device
CN107577175A
High-speed programming device supporting various communication modes
CN107977212A
Software upgrading device and method for a vehicle-mounted controller
CN109614127A