Burning method of board card, electronic equipment and storage medium

Wireless broadcast burning of multiple elevator boards is realized on the CAN bus through IAP technology, which solves the problems of cumbersome upgrade process and limited space in ISP technology, realizes automatic burning and identity authentication, and improves the efficiency of elevator board upgrades. efficiency and reliability.

CN118860431APending Publication Date: 2024-10-29SHANGHAI STEP ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410903953.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

The ISP technology upgrade process for existing elevator boards is cumbersome, requires on-site operations and has limited space, making it difficult to achieve efficient multi-board programming.

Method used

Using IAP technology, the board group to be burned is selected through the CAN bus, and the main control board forwards the burning command of the host computer to realize wireless broadcast burning of multiple boards, reducing manual intervention and avoiding message congestion through response time management. , enhance system flexibility and scalability.

Benefits of technology

It realizes the automated burning process, reduces manual intervention, solves the problems of cumbersome burning process and limited space in ISP technology, and improves the efficiency and reliability of elevator board upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860431A_ABST
    Figure CN118860431A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of board card firmware upgrading, and discloses a board card burning method, electronic equipment and a storage medium. According to the method, a group of target board cards to be burnt are selected based on an IAP address, and the target board cards are mounted on a CAN bus; sending a burning command to a main control board, so that the main control board sends the command to the plurality of target board cards belonging to the same group at the same time; receiving response messages which correspond to the burning command and are respectively sent by the plurality of target board cards forwarded by the main control board; after it is confirmed that burning of the target board cards is completed, a working mode jump command is sent to the main control board, so that the main control board sends the working mode jump command to the multiple target board cards belonging to the same group at the same time, and the target board cards exit the IAP mode and recover the normal working state. According to the invention, broadcast burning of the board card mounted on the communication bus is realized through the IAP technology, the board card burning cost is greatly reduced, and the usability of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiment of the present invention relates to the technical field of board firmware upgrade, and in particular to a board firmware burning method, an electronic device and a storage medium. Background Art

[0002] The elevator hardware is composed of hardware boards with different functions. During the normal operation of the elevator, different hardware boards will be used to execute the expected operation status. The program has been burned into each hardware board before the product leaves the factory. However, during the use of the elevator, due to new requirements in actual applications or its own existing plans, its functions will be continuously expanded, which will lead to the corresponding firmware upgrade of the underlying hardware.

[0003] At present, the main form of upgrading the elevator control system board is ISP. This technology requires that when burning the board, the burning program needs to be burned to the corresponding board through a download line and a burning device. However, there are many boards that make up the elevator control system, and this method requires a cumbersome burning process. In addition, because the ISP technology requires a wired connection with the board to be upgraded through a download line, the maintenance personnel must arrive at the equipment site to upgrade the firmware. If the equipment is widely distributed and if the board is installed in a narrow space or other difficult-to-reach places, the existing ISP technology has obvious defects in the program burning process of the elevator control system board. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method for burning a board to solve the problems that the burning process of the existing elevator board is complicated, requires on-site operation and is space-limited when upgrading the board through ISP technology.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a method for burning a board card, which is applied to a host computer, and the method comprises:

[0006] A group of target boards to be burned is selected based on the IAP address, and the target boards are mounted on the CAN bus; a burning command is sent to the main control board, so that the main control board sends the command to multiple target boards belonging to the same group at the same time;

[0007] Receiving response messages corresponding to the burning command respectively sent by the plurality of target boards forwarded by the main control board;

[0008] After confirming that the target board is burned, sending a working mode jump command to the main control board, so that the main control board sends the working mode jump command to multiple target boards belonging to the same group at the same time, so that the target board exits the IAP mode and resumes normal working state;

[0009] The burning command includes:

[0010] The attribute information query command is used to obtain the target board status information;

[0011] IAP mode jump command, used to switch the target board to IAP mode;

[0012] The program writing command is used to write the upgrade program into the target board.

[0013] The embodiment of the present invention further provides a method for burning a board, which is applied to the board, and the method comprises:

[0014] Receive the burning command forwarded by the main control board;

[0015] Execute the burning command forwarded by the main control board, and send a response message corresponding to the burning command to the main control board, so that the main control board sends the response message to the host computer;

[0016] After the program is burned, the operating mode jump command forwarded by the main control board is received to restore the normal working state;

[0017] The burning command includes:

[0018] The attribute information query command is used to obtain the target board status information;

[0019] IAP mode jump command, used to switch the target board to IAP mode;

[0020] The program writing command is used to write the upgrade program into the target board.

[0021] An embodiment of the present invention further provides an electronic device, including:

[0022] at least one processor; and,

[0023] a memory communicatively connected to the at least one processor; wherein,

[0024] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned board burning method.

[0025] The embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned board burning method when executed by a processor.

[0026] In an embodiment of the present invention, a method for burning a board is provided, in which a host computer simultaneously selects a group of boards to be burned on the CAN bus based on the IAP address; the burning command of the host computer is forwarded by the main control board, and the main control board sends the command to a group of target boards at the same time; different burning commands are sent according to the response message of the board to be burned. Through the above method, wireless broadcast burning of multiple boards at one time based on IAP technology is realized through command sending and response, and manual intervention is reduced. At the same time, the burning command in the above method is not fixed, and different operations can be performed as needed, which enhances the flexibility and scalability of the system. It solves the problem that the burning process of existing elevator boards upgraded through ISP technology is cumbersome, requires on-site operation and is limited in space.

[0027] In addition, the receiving of response messages corresponding to the burning command respectively sent by the plurality of target boards forwarded by the main control board includes:

[0028] The response message sent by the target board at a response time and forwarded by the main control board is received; wherein the response time is determined based on the IAP address corresponding to the target board.

[0029] The determining the response time based on the IAP address corresponding to the target board includes:

[0030] The response time is obtained by adding the product of the board group number in the IAP address and the first coefficient to the product of the board address in the IAP address and the second coefficient. The response time of the board is set by the IAP address of the board, which effectively avoids the problem of message congestion caused by multiple boards sending response messages at the same time.

[0031] In addition, before executing the program writing command in the burning command forwarded by the main control board, the board also includes: receiving a first handshake command and a second encrypted handshake command forwarded by the main control board;

[0032] Record the random number, hardware type and chip ID contained in the first handshake command forwarded by the main control board, and compare the hardware model; send a first response message containing the first comparison result to the main control board, so that the main control board sends the first response message to the host computer;

[0033] The second encrypted handshake command forwarded by the main control board is decrypted based on the random number, and the chip ID is compared; a second response message containing a second comparison result is sent to the main control board, so that the main control board sends the second response message to the host computer.

[0034] By sending the first handshake command containing a random number, chip ID and hardware model, as well as the second encrypted handshake command to the main control board, the identity authentication and encrypted communication of the target board can be effectively achieved, ensuring the security and reliability of the system.

[0035] In addition, after confirming that the target board is burned, the method further includes: the host computer sends a working mode jump command to the main control board, and receives a verification message of each frame of data of the upgrade program from the target board forwarded by the main control board; wherein the verification message is used to confirm whether each frame of data of the upgrade program is correct and has been written by the board;

[0036] The host computer sends the working mode jump command to the main control board, so that the main control board sends the working mode jump command only to the target board card on which the upgrade program is burned. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0038] Figure 1 It is a flow chart of a board burning method applied to a host computer according to an embodiment of the present application;

[0039] Figure 2 It is a flow chart of a method for burning a board card applied to a board card according to an embodiment of the present application;

[0040] Figure 3 A visual interface for selecting a board to be burned is provided according to an embodiment of the present application;

[0041] Figure 4 It is an example interactive flow chart of a method for burning a board provided in an embodiment of the present application;

[0042] Figure 5 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0043] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.

[0044] First, before describing the embodiments of the present invention in detail, some concepts involved in the embodiments of the present invention are explained as follows:

[0045] Board: refers to the circuit board with a microcontroller (MCU) in the elevator control system.

[0046] Drive board: refers to the board of the drive part (frequency conversion drive device) of the control cabinet in the elevator control system.

[0047] Main control board: refers to the board of the main control part of the control cabinet in the elevator control system.

[0048] Car top panel: installed on the car top and connected to the door machine controller.

[0049] Car panel: divided into front door control box car panel, rear door control box car panel, disabled control box car panel and deputy control box car panel.

[0050] Outside call board: installed outside the hall, used to call elevators, display, etc.

[0051] Pit inspection panel: This panel is located in the pit and is used for pit inspection.

[0052] CAN bus: Elevator control system, the communication method of the board adopts CAN communication. The patent applied for in this article is the implementation of IAP technology based on CAN bus communication method.

[0053] In addition, the IAP address involved in the implementation manner of the present invention is defined as follows:

[0054] Example Table 1

[0055]

[0056]

[0057] An embodiment of the present invention relates to a method for burning a board, which is applied to a host computer. The method comprises: selecting a group of target boards to be burned based on an IAP address, wherein the target boards are mounted on a CAN bus; sending a burning command to a main control board, so that the main control board sends the command to a plurality of target boards belonging to the same group at the same time; receiving response messages corresponding to the burning command respectively sent by the plurality of target boards forwarded by the main control board; after confirming that the burning of the target boards is completed, sending a working mode jump command to the main control board, so that the main control board sends the working mode jump command to a plurality of target boards belonging to the same group at the same time, so that the target boards exit the IAP mode and resume normal working state; wherein the burning command comprises: an attribute information query command, which is used to obtain the state information of the target boards; an IAP mode jump command, which is used to switch the target boards to the IAP mode; and a program write command, which is used to write an upgrade program to the target boards.

[0058] Compared with the related art, the board burning method of this embodiment is that the host computer selects a group of boards to be burned on the CAN bus at the same time based on the IAP address; the main control board forwards the burning command of the host computer, and the main control board sends the command to a group of target boards at the same time; according to the response message of the board to be burned, different burning commands are sent. Through the above method, the wireless broadcast burning of multiple boards at one time based on IAP technology is realized through command sending and response, which reduces manual intervention. At the same time, the burning command in the above method is not fixed, and different operations can be performed as needed, which enhances the flexibility and scalability of the system. It solves the problem that the burning process of existing elevator boards upgraded through ISP technology is cumbersome, requires on-site operation and is limited in space.

[0059] The implementation details of the board burning method of this embodiment are specifically described below. The following content is only provided for the convenience of understanding the implementation details and is not necessary for implementing this solution.

[0060] See also Figure 1 , Figure 1 This is a flow chart of a board burning method provided in this embodiment, which is applied to a host computer. The method includes:

[0061] Step 101: Select the board to be burned and send the burning command.

[0062] In an embodiment of the present application, the host computer selects a group of target boards to be burned based on the IAP address, and the target boards are mounted on the CAN bus; a burning command is sent to the main control board, and the main control board sends the command to multiple target boards belonging to the same group at the same time.

[0063] It is understandable that, in the embodiment of the present invention, the board is mounted on the CAN bus, and the target board to be burned can be the main control board, or any board except the main control board. If the board to be burned is the main control board, the host computer directly sends the burning command to the main control board, and the main control board responds. If the board to be burned is other boards other than the main control board, the burning command is forwarded by the main control board to other boards, and the board is waiting to reply the response message corresponding to the burning command at the preset corresponding time.

[0064] Specifically, the host computer first sends the attribute information query command in the burning command to the board to be upgraded to obtain the status information of the board, including the hardware model, software version number, and customer information, so as to confirm whether the board to be burned is selected correctly.

[0065] In addition, the host computer selects the board to be burned based on the IAP address. Here, the host computer can be any terminal device with wireless communication function. In this embodiment, a mobile terminal with a Bluetooth device is connected to the main control board, and the board to be burned is selected through a visual interface. For details, see Figure 3 .

[0066] It can be understood that, in the embodiment of the present invention, the IAP address of each board can be seen in the above IAP address definition table, which specifies the uniqueness of the address of each board and also enables broadcast burning to be implemented. For ease of understanding, an example is given here, for example: 4002 is the IAP address of the main control board, and 4002 is used to search for the main control board.

[0067] Step 102: Receive a response message for each burning command sent by the board, and send the next burning command.

[0068] In an embodiment of the present application, the host computer receives the response messages corresponding to the burning command respectively sent by the plurality of target boards forwarded by the main control board, and sends the next burning command after receiving the response message each time. Among them, the host computer receives the response message of the target receiving board at the preset board response time. The response time is determined according to the IAP address corresponding to the target board, that is, the burning command is responded after 5ms*group number+20ms*address. The board rental number and board address are detailed in the above table.

[0069] It can be understood that the burning command of this embodiment is not unique, and the response message of the board corresponds to the burning command sent by the host computer one by one. When the host computer receives the response message, it sends the next burning command.

[0070] The following is a detailed description of the burning command sent by the host computer and the response of the board.

[0071] a) The host computer sends the attribute information query command M0 to obtain the hardware and status information of the board.

[0072] b) After the host computer receives the response message m0 from the board containing the board hardware model, software version number and customer information, the host computer confirms that the board selection is correct and sends the IAP mode jump command M1A to make the board jump to IAP mode, that is, burning mode.

[0073] c) After the host computer receives the response message m1A indicating that the board has completed the jump, the host computer sends a first handshake command M2 to query the board chip ID. The first handshake command M2 also includes a random number and a hardware model for the board to be burned to confirm that the hardware model matches and record the random number.

[0074] d) After the host computer receives the response message m2 of the first handshake command of the board, the host computer sends a second encrypted handshake command M3, for the board to be burned to use the random number in the M2 command to decrypt the second encrypted handshake command M3, confirming that the verification is successful and the hardware type and chip ID match.

[0075] e) After the host computer receives the response message m3 of the second encrypted handshake command of the board, the host computer sends a program erasing program M4 to enable the board to erase the flash content in bootloader mode, so as to enable the target board to release the flash space occupied by the existing program.

[0076] f) After the host computer receives the response message m4 from the board that the program file has been successfully erased, it sends the program write command M5.

[0077] The above steps a)-f) are performed sequentially, so that the host computer receives the response message of the board card to each burning information and sends the next burning command.

[0078] Step 103: After confirming that the board burning is complete, send a working mode jump command to make the board exit the IAP mode and resume normal working state.

[0079] In this embodiment, after the host computer confirms that the burning of the target board is completed, it sends a working mode jump command to the main control board, so that the main control board can simultaneously send the working mode jump command to multiple target boards belonging to the same group, so that the target boards exit the IAP mode and resume normal working state.

[0080] Specifically, after the host computer receives the response message of the program written by the board, it sends a program verification command to the board to be burned.

[0081] For ease of understanding, a verification process for verifying that the file is received correctly is given here. For example, if the upgrade file length is 76 frames of data, each time the upper computer sends a frame of data, the lower computer will verify whether the frame of data is correct after receiving it and reply with a program verification response message. Only after the program data is verified to be received correctly, the upper computer will send the next frame of data. It can be understood that here the program verification command and the program verification response message are repeated alternately until the last frame of data is confirmed to be received correctly.

[0082] After the host computer receives all program verification commands of the board, the host computer sends a normal mode jump command to the board to make the board exit the mode and resume normal working state.

[0083] Another embodiment of the present invention provides a method for burning a board card, which is applied to the board card, and the method includes: receiving a burning command forwarded by a main control board; executing the burning command forwarded by the main control board, and sending a response message corresponding to the burning command to the main control board, so that the main control board sends the response message to a host computer; after the program burning is completed, receiving a working mode jump command forwarded by the main control board to restore the normal working state.

[0084] See also Figure 2 , Figure 2 Another flow chart of the burning method of the board provided by the embodiment of the present invention, another embodiment of the present application provides a burning method of the board, the method is applied to the board, the method is designed to broadcast burning to a group of multiple boards at the same time, the method includes:

[0085] Step 201: Receive a burning command and reply with status information.

[0086] In the embodiment of the present application, all boards are mounted on the CAN bus, the main control board directly receives the burning command, and the boards other than the main control board receive the burning command forwarded by the main control board, and the above burning commands are all sent by the host computer.

[0087] It can be understood from the above another embodiment of the present application that the host computer selects a group of target boards to be burned based on the IAP address, and sends a burning command to the main control board, so that the main control board simultaneously sends the command to multiple target boards belonging to the same group.

[0088] Specifically, the board first receives the attribute information query command in the burning command sent by the host computer, and sends its own hardware model, software version number, customer information and other information to the host computer in the form of a response message to check whether the board is selected correctly.

[0089] In addition, since this embodiment involves broadcasting and burning the upgrade program to a group of multiple boards at the same time, there is a conflict when multiple boards respond to the burning command at the same time. In order to smoothly send the burning command and the response message, this application determines the response time according to the IAP address of each board, and sends the response message to any board at the response time.

[0090] For ease of understanding, here is a response time calculation method and a board response example. Please refer to the IAP address definition table. The IAP address consists of the board group number and the board address. For any board, the board is delayed by 5ms*group number+20ms*address before responding to the burn command. For example, 4001 is the IAP address of the driver board, and its response time is: 5ms*4+20ms*1=40ms. Therefore, the main control board responds to each burn command 40ms after receiving the burn command. Setting the response time of each board response message according to the IAP address of the board can effectively avoid message conflicts caused by broadcasting burn commands.

[0091] Step 202: Execute the burning command and send a response message corresponding to the burning command.

[0092] In an embodiment of the present application, the main control board directly executes the burning command sent by the host computer, and directly sends a response message to the host computer; the non-main control board executes the burning command forwarded by the main control board, and sends a response message corresponding to the burning command to the main control board, so that the main control board sends the response message to the host computer.

[0093] Specifically, after receiving each burning command, the board sends a response command. The burning command of the present embodiment is not unique, and the response message of the board corresponds to the burning command sent by the host computer. The board will respond to the burning command only after receiving the burning command.

[0094] The following is a detailed description of the host computer sending end burning command and the board card's response. It is worth mentioning that this embodiment involves broadcast burning of multiple boards in the same group. Therefore, in the following process, in order to smoothly send the burning command and the response message, this embodiment determines its response time according to the IAP address of each board card, and sends the response message at the response time for any board card. For the specific response time setting method, please refer to step 201.

[0095] a) Receive the attribute information query command M0 sent by the host computer, and reply with the response information m0 containing the board hardware model, software version number and customer information within the response time, so that the host computer can confirm whether the board selection is correct.

[0096] b) Receive the IAP mode jump command M1A sent by the host computer, so that the board jumps to the IAP mode, and replies with the response message m1A indicating that the jump has been completed within the response time.

[0097] c) Receive the first handshake command M2 sent by the host computer, query the board chip ID, the first handshake command M2 also includes a random number and a hardware model, the board confirms that the hardware model matches and records the random number; after the hardware model matches, reply to the response message m2 of the first handshake command at the response time.

[0098] d) Receive the second encrypted handshake command M3 sent by the host computer, use the random number in the M2 command to decrypt the second encrypted handshake command M3, confirm that the verification is successful and the hardware type and chip ID match, and reply to the response message m3 of the second encrypted handshake command within the response time.

[0099] e) Receive the program erasing program M4 sent by the host computer, erase the flash content in bootloader mode, release the flash space occupied by the existing program, and reply with a response message m4 indicating that the program file has been successfully erased within the response time.

[0100] f) Receive and send the program writing command M5, write the program, and reply with a response message m5 indicating that the program writing has started at the response time.

[0101] Execute the above steps a)-f) in sequence to realize that each board will reply to send a response command within the response time after receiving each burning command, and the response message of the board corresponds to the burning command sent by the host computer. The board will respond to the burning command only after receiving the burning command.

[0102] Step 203: After the burning is completed, exit the burning mode.

[0103] In this embodiment, after the host computer confirms that the target board is burned, it sends a working mode jump command to the main control board, so that the main control board only sends the working mode jump command to multiple boards belonging to the same group at the same time, so that the board to which the program is written is exited from IAP mode and resumes normal working state.

[0104] Specifically, after receiving the response message m5 written by the program of the board card, the host computer sends a program verification command to the board card.

[0105] Here is a verification process for verifying that the file is received correctly. For example, if the upgrade file length is 76 frames of data, each time the upper computer sends a frame of data, the lower computer will verify whether the frame of data is correct after receiving it and reply with a program verification response message. Only after the program data is verified to be received correctly, the upper computer will send the next frame of data. It can be understood that here the program verification command and the program verification response message are repeated alternately until the last frame of data is confirmed to be received correctly.

[0106] After the board sends the response message of all program verification commands to the host computer, it receives the normal mode jump command sent by the host computer, exits the mode according to the command and resumes normal working state.

[0107] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0108] See also Figure 4 , Figure 4 This is an example interactive flow chart of the board burning method provided by the present invention.

[0109] This application provides an example, in which a broadcast upgrade program is burned for a group of outbound call boards based on a mobile phone. The specific implementation process includes:

[0110] a) Get the program of the board to be burned on the mobile phone APP;

[0111] b) The mobile phone APP selects the burning board based on the IAP address among all the boards on the bus, and connects to the board through the Bluetooth device;

[0112] c) The mobile APP sends the M0 command to obtain the board information of the outbound call board. After the outbound call board to be upgraded receives the query command, each outbound call board replies m0 to the mobile APP at its corresponding response time, including hardware model, software version number, customer information, etc.;

[0113] d) The mobile APP sends the M1A command to make the outbound call board jump to IAP mode, i.e., burning mode. The outbound call board to be burned and upgraded receives the command and executes the jump to IAP mode. Each outbound call board replies m1A to the mobile APP at its corresponding response time;

[0114] e) The mobile APP sends the M2 command to find the unique ID of the outbound call board chip. The M2 command contains a random number to confirm that the burned board is legal, which is the first handshake. After the outbound call board to be burned and upgraded receives the command, if the hardware model matches, it records the random number, and each outbound call board replies to the mobile APP with m2 at its corresponding response time;

[0115] f) The mobile APP sends the M3 command to perform an encrypted handshake with the outbound call board, which is the second handshake. After receiving the command, the outbound call board to be upgraded will use the random number recorded in the first handshake to decrypt the received command, confirming that the verification is successful, the hardware type is consistent, and the chip unique ID is correct. Each outbound call board will reply m3 to the mobile APP at its corresponding response time;

[0116] g) The mobile APP sends the M4 command to erase the program of the outbound call board. After receiving the command, the outbound call board to be upgraded executes the program erasing operation, and each outbound call board replies m4 to the mobile APP at its corresponding response time;

[0117] h) The mobile APP sends the M5 command to write the program to the outbound call board. After the outbound call board to be upgraded receives the command, each outbound call board replies m5 to the mobile APP at its corresponding response time to ensure that the program is written correctly;

[0118] i) The mobile APP sends the M6 ​​command to the outbound call board to confirm the completion of program writing. Each outbound call board replies m6 to the mobile APP at its corresponding response time;

[0119] j) After the burning is completed, the mobile phone APP sends the M1B command to make the main control board to be burned and upgraded jump to the APP application part, thus completing the burning process.

[0120] Those skilled in the art can understand that Bluetooth and the main control board communicate via serial ports, the outbound call board and the main control are on a CAN bus, and burning other boards also requires forwarding various commands initiated by the mobile phone through the main control board.

[0121] This application also provides another example of the board burning method, which realizes the burning of the upgrade program for the main control board based on the mobile phone. In other words, this application can also burn the upgrade program only for a specific board, which can be understood as a unicast burning implementation. The specific implementation process includes:

[0122] a) The mobile APP sends the M0 command to obtain the board information of the main control board. After receiving the query command, the main control board to be upgraded will reply with m0, including the hardware model, software version number, customer information, etc.

[0123] b) The mobile APP sends the M1A command to make the main control board jump to IAP mode, i.e., burning mode. The main control board to be burned and upgraded receives the command and executes the jump to IAP mode, and replies m1A;

[0124] c) The mobile APP sends the M2 command to find the unique ID of the main control board chip. The M2 command contains a random number to confirm that the burned board is legal, which is the first handshake. After the main control board to be burned and upgraded receives the command, if the hardware model matches, it records the random number and replies to m2;

[0125] d) The mobile APP sends the M3 command to perform an encrypted handshake with the main control board, which is the second handshake. After receiving the command, the main control board to be upgraded will use the random number recorded in the first handshake to decrypt the received command, confirm that the verification is successful, the hardware type is consistent, and the chip unique ID is correct, and reply m3;

[0126] e) The mobile APP sends the M4 command to erase the program on the main control board. After receiving the command, the main control board to be upgraded executes the program erase operation and replies m4;

[0127] f) The mobile APP sends the M5 command to write the program to the main control board. The main control board to be upgraded will reply with m5 after receiving the command to ensure that the program is written correctly;

[0128] g) The mobile APP sends the M6 ​​command to the main control board to confirm the completion of program writing, and the main control board to be burned and upgraded replies m6;

[0129] h) After the burning is completed, the mobile phone APP sends the M1B command to make the main control board to be burned and upgraded jump to the APP application part, thus completing the burning process for a single specific board.

[0130] Those skilled in the art can understand that the process of unicast burning is the same as that of broadcast burning. During unicast burning, the main control board only needs to shake hands with the board to be burned and upgraded, so there is no delayed response of "5ms*group number+20ms*address", and the board can directly reply to the command after receiving the burning command.

[0131] All the steps in this application are divided only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0132] See also Figure 5 , another embodiment of the present invention relates to an electronic device, such as Figure 5As shown, it includes at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program or instruction that can be executed by the at least one processor, and the computer program or instruction is executed by the at least one processor so that the at least one processor can execute the board burning method as described above.

[0133] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.

[0134] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.

[0135] Another embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.

[0136] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0137] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0138] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0139] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.

Claims

1. A method for burning a board. It is characterized in that Applied to a host computer, the method includes: A group of target boards to be burned is selected based on the IAP address, and the target boards are mounted on the CAN bus; a burning command is sent to the main control board, so that the main control board sends the command to multiple target boards belonging to the same group at the same time; Receiving response messages corresponding to the burning command respectively sent by the plurality of target boards forwarded by the main control board; After confirming that the target board is burned, sending a working mode jump command to the main control board, so that the main control board sends the working mode jump command to multiple target boards belonging to the same group at the same time, so that the target board exits the IAP mode and resumes normal working state; The burning command includes: The attribute information query command is used to obtain the target board status information; IAP mode jump command, used to switch the target board to IAP mode; The program writing command is used to write the upgrade program into the target board.

2. The method for burning a board according to claim 1, It is characterized in that The receiving of the response messages corresponding to the burning command respectively sent by the plurality of target boards forwarded by the main control board comprises: Receiving the response message sent by the target board at the response time and forwarded by the main control board; wherein, The response time is determined based on the IAP address corresponding to the target board.

3. The method for burning a board according to claim 2, It is characterized in that The determining the response time based on the IAP address corresponding to the target board includes: The response time is obtained by adding the product of the board group number in the IAP address and the first coefficient to the product of the board address in the IAP address and the second coefficient.

4. The method for burning a board according to claim 1, It is characterized in that Before sending the program write command in the burning command to the main control board, the method further includes: Sending the first handshake command and the second encrypted handshake command to the main control board, so that the main control board simultaneously sends the first handshake command and the second encrypted handshake command to a plurality of target boards belonging to the same group; Wherein, the first handshake command includes a random number, a chip ID and a hardware model, so that the target board can record the random number and the chip ID and confirm that the hardware model matches; The second encrypted handshake command is used by the target board to decrypt the second encrypted handshake command according to the random number and confirm that the chip ID is correct.

5. The method for burning a board according to claim 4, It is characterized in that Before sending the first handshake command and the second encrypted handshake command to the main control board, the method further includes: The program erasing command is sent to the main control board, so that the main control board can send the program erasing command to multiple target boards at the same time; wherein the program erasing command is used to enable the target board to release the flash space occupied by the existing program.

6. The method for burning a board according to claim 1, It is characterized in that After confirming that the target board is burned, the method further includes: the host computer sends a working mode jump command to the main control board, and receives a verification message of each frame of data of the upgrade program from the target board forwarded by the main control board; wherein the verification message is used to confirm whether each frame of data of the upgrade program is correct and has been written by the board; The host computer sends the working mode jump command to the main control board, so that the main control board sends the working mode jump command only to the target board card on which the upgrade program is burned.

7. A method for burning a board. It is characterized in that Applied to a board, the method comprises: Receive the burning command forwarded by the main control board; Execute the burning command forwarded by the main control board, and send a response message corresponding to the burning command to the main control board, so that the main control board sends the response message to the host computer; After the program is burned, the operating mode jump command forwarded by the main control board is received to restore the normal working state; The burning command includes: The attribute information query command is used to obtain the target board status information; IAP mode jump command, used to switch the target board to IAP mode; The program writing command is used to write the upgrade program into the target board.

8. The method for burning a board according to claim 7, It is characterized in that Before executing the program writing command in the burning command forwarded by the main control board, the method further includes: Receiving a first handshake command and a second encrypted handshake command forwarded by the main control board; Record the random number, hardware type and chip ID contained in the first handshake command forwarded by the main control board, and compare the hardware model; send a first response message containing the first comparison result to the main control board, so that the main control board sends the first response message to the host computer; The second encrypted handshake command forwarded by the main control board is decrypted based on the random number, and the chip ID is compared; a second response message containing a second comparison result is sent to the main control board, so that the main control board sends the second response message to the host computer.

9. An electronic device, It is characterized in that include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a board burning method as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, a board burning method according to any one of claims 1 to 8 is implemented.