Brushing method, system and device of controller, electronic equipment and storage medium
By setting the slave mode in the controller, it can only respond to the flash write command issued by the upper computer and actively obtain the software package from the external memory, which solves the problem of low flash write efficiency of the controller and achieves more efficient software package updates .
Patent Information
- Application Number
- CN202411134133.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-12-03
AI Technical Summary
The controller is less efficient when flashing software packages and cannot meet production needs, mainly due to the limited communication efficiency of the CAN bus.
In slave mode, the controller only responds to the commands issued by the upper computer, actively obtains the target software package from the external memory for flashing and updating, which reduces the push process of the software package and improves flashing efficiency.
By actively obtaining software packages, the refresh efficiency is improved, the update process is simplified, the user experience is enhanced, and the software package update time is reduced.
Smart Images

Figure CN119065696A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a controller flashing method, system, device, electronic device and computer-readable storage medium. Background Art
[0002] At present, when the controller needs to update the software package, the entire process of the controller uses CAN (Controller Area Network) communication to flash the software package into the controller. However, the communication efficiency of the CAN bus is limited, only 1 megabyte, and the software package in the flashing process is hundreds of megabytes, which will lead to low flashing efficiency and difficult to meet production needs.
[0003] It can be seen that the prior art has the problem of low efficiency in flashing the software package of the controller. Summary of the invention
[0004] In view of the above problems, the present application provides a controller flashing method, system, device, electronic device and computer-readable storage medium, which are used to solve the problem of low controller software package flashing efficiency existing in the prior art.
[0005] According to a first aspect of an embodiment of the present application, a flashing method for a controller is provided, the method comprising: in a slave mode, in response to a flashing command, obtaining a target software package from an external memory; wherein the slave mode represents a mode in which the controller only responds to commands issued by a host computer; and performing a flashing update based on the obtained target software package.
[0006] In an optional manner, before responding to the flash command, it further includes: transmitting the initial version information to the host computer; receiving the flash command; wherein the flash command is issued by the host computer when it determines that the type information of the controller is preset type information based on the initial version information.
[0007] In an optional manner, after the flash update is performed based on the acquired target software package, the method further includes: in response to a verification command, transmitting specific information to a host computer, so that the host computer verifies the updated target software package according to the specific information, obtains the verification result and outputs it; wherein the verification command is issued after the host computer issues the flash update command for a preset period of time.
[0008] In an optional manner, after the flash update based on the acquired target software package, the method further includes: in response to a version information read command, transmitting the updated version information to a host computer; wherein the version information read command is issued after a preset period of time after the host computer issues a flash command; in response to a verification command, transmitting specific information to the host computer, so that the host computer verifies the updated target software package according to the specific information, obtains a verification result and outputs it; wherein the verification command is issued when the host computer confirms that the updated version information is the target version information.
[0009] In an optional manner, the acquiring the target software package from the external memory further includes: acquiring target flag information of the software package from the external memory; if the target flag information of the software package is preset flag information, determining that the software package is the target software package, and acquiring the target software package; wherein the flag information includes: the format of the software package and / or the name of the software package.
[0010] In an optional manner, the acquiring the target software package from the external memory further comprises: acquiring the target software package from the external memory via a universal serial bus interface.
[0011] According to a second aspect of an embodiment of the present application, a controller flashing system is provided, the system comprising: a host computer and a plurality of sub-controllers connected in parallel; a target controller being any sub-controller in the system; the target controller being used to obtain a target software package from an external memory in response to a flashing command in a slave mode; wherein the slave mode represents a mode in which the controller only responds to commands issued by the host computer; and is also used to perform a flashing update based on the obtained target software package.
[0012] According to a third aspect of an embodiment of the present application, a flash writing device for a controller is provided, the device comprising:
[0013] An acquisition module is used to acquire a target software package from an external memory in response to a flash command in a slave mode; wherein the slave mode represents a mode in which the controller only responds to commands issued by a host computer;
[0014] The flashing module is used to perform flashing update based on the acquired target software package.
[0015] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; a memory for storing a computer program, wherein the computer program, when executed by the processor, implements the following steps of the flashing method of the controller: in a slave mode, in response to a flashing command, obtaining a target software package from an external memory; wherein the slave mode represents a mode in which the controller only responds to commands issued by a host computer; and performing a flashing update based on the obtained target software package.
[0016] According to a fifth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the following steps of the controller flashing method are implemented: in a slave mode, in response to a flashing command, a target software package is obtained from an external memory; wherein the slave mode represents a mode in which the controller only responds to commands issued by a host computer; and a flashing update is performed based on the obtained target software package.
[0017] The application has at least the following beneficial technical effects:
[0018] By setting the controller in slave mode, the controller only responds to commands related to the target software package flashing and updating issued by the host computer, and the controller will not start other programs, which can improve the flashing efficiency of the target software package; after responding to the flashing command, the controller actively obtains the target software package from the external memory. Compared with the prior art that requires an external controller to control the acquisition of the software package from the memory and push it to the controller that needs to be updated through the CAN line for passive reception, this solution actively obtains the target software package from the external memory, reduces the push process of the target software package, and has a higher efficiency in flashing and updating the software package; through the external memory, the version of the software package can be replaced according to the actual needs of the user, further improving the user experience during use.
[0019] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0021] Figure 1 A timing diagram of a controller flashing method provided in an embodiment of the present application is shown;
[0022] Figure 2A flowchart of a first embodiment of a controller flashing method provided by an embodiment of the present application is shown;
[0023] Figure 3 A flowchart of a second embodiment of a controller flashing method provided in an embodiment of the present application is shown;
[0024] Figure 4 A flowchart of a third embodiment of a controller flashing method provided in an embodiment of the present application is shown;
[0025] Figure 5 A flowchart of a fourth embodiment of a controller flashing method provided in an embodiment of the present application is shown;
[0026] Figure 6 A structural diagram of a flash writing system of a controller provided by the present application is shown;
[0027] Figure 7 A schematic diagram showing the structure of an embodiment of an electronic device provided by the present application is shown;
[0028] Figure 8 A schematic structural diagram of an embodiment of a flash writing device for a controller provided in the present application is shown. DETAILED DESCRIPTION
[0029] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0030] If there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features limited to "first" and "second" may explicitly or implicitly include at least one of the features. In addition, if the meaning of "and / or" appearing in the full text is to include three parallel schemes, taking "A and / or B" as an example, it includes scheme A, or scheme B, or a scheme that satisfies both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0031] Figure 1 A timing diagram of a controller flashing method provided in an embodiment of the present application is shown. Figure 2 A flowchart of a first embodiment of a controller flashing method provided by an embodiment of the present application is shown. Figure 1 and Figure 2 As shown, the method comprises the following steps:
[0032] Step S110: in slave mode, in response to a flash command, obtaining a target software package from an external memory;
[0033] Among them, the slave mode represents the mode in which the controller only responds to the command issued by the host computer; in the slave mode, the controller only responds to the command related to the target software package flash update issued by the host computer, and the controller will not start other programs, which can improve the flash efficiency. Specifically, after the host computer powers on the controller, the power-on time can be set to 1min, which is set according to the specific controller. The power-on time indicates the time required to establish the communication time, excluding the software package upgrade time. The host computer can send a communication establishment instruction to the controller through CAN communication to establish a communication connection between the host computer and the controller. The communication instruction can be CAN instruction 1001. After the host computer receives the CAN message replied by the controller, it sends a slave mode switching instruction to the controller to switch the controller from the host mode to the slave mode. After the controller switches to the slave mode, it sends a confirmation switch slave mode command to the host computer. It should be noted that the flash command can be specifically AT^UPDATESW=4. After receiving the command, the controller enters the flash mode.
[0034] Step S120: flashing and updating the acquired target software package.
[0035] The controller actively obtains the target software package from the external memory based on the response command, and the entire update process is actively obtained by the controller, further improving the transmission efficiency of the obtained software package.
[0036] In this embodiment, when the controller is in slave mode, the controller only responds to commands related to the target software package flashing and updating issued by the host computer, and the controller will not start other programs, which can improve the flashing efficiency of the target software package; after responding to the flashing command, the controller actively obtains the target software package from the external memory. Compared with the prior art that requires an external controller to control the acquisition of the software package from the memory and push it to the controller that needs to be updated through the CAN line for passive reception, this solution actively obtains the target software package from the external memory, reduces the push process of the target software package, and has a higher efficiency in flashing and updating the software package; through the external memory, the version of the software package can be replaced according to the actual needs of the user, further improving the user experience during use.
[0037] Figure 3A flowchart of a second embodiment of a controller flashing method provided in an embodiment of the present application is shown. Figure 1 and Figure 3 As shown, before responding to the flash command, the method further includes:
[0038] Step S210: transmitting the initial version information to the host computer;
[0039] Before the controller is updated, the controller stores the initial version information. After the host computer receives the response command for the controller to switch to the slave mode, it generates an initial version information reading command and sends it to the controller, so that the controller sends the initial version information to the host computer. It should be noted that the initial version information reading command can specifically be "AT^OEMSWVER?".
[0040] Step S220: receiving the flash command;
[0041] The flash command is issued by the host computer when it is determined that the type information of the controller is the preset type information according to the initial version information. The initial version information includes the type information of the controller. The host computer determines whether the type information of the controller is the preset type information. If the type information of the controller is the preset type information, it means that the controller needs to be flashed and updated. Then, a flash command is generated and issued to the controller, which can prevent the flashing mismatch between the software package and the controller.
[0042] In another embodiment of the present application, please refer to Figure 1 As shown, after the flash update based on the acquired target software package is performed, the method further includes:
[0043] In response to the verification command, the specific information is transmitted to the host computer, so that the host computer verifies the updated target software package according to the specific information, obtains the verification result and outputs it; wherein the verification command is issued after the host computer issues the flash command for a preset period of time.
[0044] In this embodiment, after the host computer issues the flash command for a preset period of time, it is assumed that the controller's software package has been flashed and updated. At this time, a verification command is sent to the controller to verify the updated software package of the controller. It should be noted that the flash update time of the controller and the size of the software package are related to the type of controller. The length of the preset period is set according to the flash update time and the size of the software package. For example, the controller can be set to issue a verification command 10 minutes after issuing the flash command. After the flash update is completed, the controller will automatically restart and reset, and switch to the host mode. The verification process is performed in the host mode.
[0045] By transmitting specific information to the host computer, the host computer verifies according to the specific information. If the received specific information is preset information, the verification result is that the software package is successfully updated. If the received specific information is non-target information, the verification result is that the software package fails to be updated. The user can determine whether the software package is successfully updated according to the verification result output by the host computer to investigate the cause and make corresponding corrections. Specifically, the verification method can be: the verification command is to obtain the pixel value of the target area of the display interface, and the controller sends the pixel value of the target area of the display interface to the host computer. If the host computer determines that the pixel value is a preset value, the verification result is determined to be a successful update. It should be noted that the controller can be a controller that projects a display interface, such as an audio-visual entertainment system, an instrument panel, etc.; Specifically, the verification method can also be: the verification command is to send a verification value to the controller, and the controller replies to the host computer target value according to the verification value. If the host computer determines that the target value is a preset value, the verification result is determined to be a successful update. It should be noted that the controller can be any controller, including a controller that does not contain a display interface.
[0046] Figure 4 A flowchart of a third embodiment of a controller flashing method provided in an embodiment of the present application is shown. Figure 1 and Figure 4 As shown, after the flash update based on the acquired target software package is performed, the following steps are further included:
[0047] Step S310: In response to the version information read command, the updated version information is transmitted to the host computer;
[0048] Among them, the version information reading command is issued after the host computer issues the flash command for a preset period of time; after the host computer issues the version information reading command to the controller, the controller responds to the version information reading command and transmits the updated version information to the host computer, so that the host computer confirms whether the updated version information is the target version information, that is, confirms whether it is the latest version information. If it is the target version information, it will be verified; if it is not the target version information, the host computer will notify the user to update the controller's software package again. It should be noted that the controller will automatically restart and reset after the flash update is completed, and switch to the host mode. The version information confirmation process and verification process are performed in the host mode.
[0049] Step S320: in response to the verification command, the specific information is transmitted to the host computer, so that the host computer verifies the updated target software package according to the specific information, obtains the verification result and outputs it;
[0050] The verification command is issued by the host computer when the updated version information is confirmed to be the target version information. After confirming that the updated version information is the target version information, the verification is performed to prevent the direct verification of the non-latest version of the software package, thereby preventing waste of resources.
[0051] By transmitting specific information to the host computer, the host computer verifies according to the specific information. If the received specific information is preset information, the verification result is that the software package is successfully updated. If the received specific information is non-target information, the verification result is that the software package fails to be updated. The user can determine whether the software package is successfully updated according to the verification result output by the host computer to investigate the cause and make corresponding corrections. Specifically, the verification method can be: the verification command is to obtain the pixel value of the target area of the display interface, and the controller sends the pixel value of the target area of the display interface to the host computer. If the host computer determines that the pixel value is a preset value, the verification result is determined to be a successful update. It should be noted that the controller can be a controller that projects a display interface, such as an audio-visual entertainment system, an instrument panel, etc.; Specifically, the verification method can also be: the verification command is to send a verification value to the controller, and the controller replies to the host computer target value according to the verification value. If the host computer determines that the target value is a preset value, the verification result is determined to be a successful update. It should be noted that the controller can be any controller, including a controller that does not contain a display interface.
[0052] Figure 5 A flowchart of a fourth embodiment of a controller flashing method provided by an embodiment of the present application is shown. Figure 1 and Figure 5 As shown, the step of obtaining the target software package from the external memory further includes the following steps:
[0053] Step S410: Acquire the target identification information of the software package from the external memory;
[0054] The target software package corresponding to the controller is stored in the external memory. After receiving the flash command, the controller searches for the target software package corresponding to the controller in the memory and determines the target software package corresponding to the controller by comparing the target flag information in the software package.
[0055] Step S420: If the target flag information of the software package is the preset flag information, determining that the software package is a target software package, and acquiring the target software package;
[0056] The flag information includes: the format of the software package and / or the name of the software package. By determining the format of the software package or the name of the software package, it can be confirmed whether the software package is a target software package that matches the controller. For example, if the format of the software package is the same as the format of the preset software package, the software package is determined to be the target software package; if the name of the software package is the preset name, the software package is determined to be the target software package; it can also be set that the above two conditions are met at the same time, then the software package is determined to be the target software. It should be noted that the preset flag information includes the format and preset name of the preset software package. The software packages in the memory can be one or more.
[0057] In another embodiment of the present application, the acquiring the target software package from the external memory further comprises: acquiring the target software package from the external memory via a universal serial bus interface.
[0058] In this embodiment, the controller obtains the target software package from the external memory through the interface of the universal serial bus. Compared with the prior art of obtaining the software package from the memory through CAN communication, another controller is required to push the software package in the memory into the memory to be updated. In this solution, after receiving the flash command, the controller actively obtains the target software package from the memory through the interface of the universal serial bus. The flash process is not controlled by another controller, and the flash update software package is more efficient, further improving the speed of flash update. It should be noted that the memory can be a USB flash drive, a hard disk, an SD card, etc.
[0059] Figure 6 A structural diagram of a controller flashing system provided by the present application is shown, see Figure 6 As shown, the system includes: a host computer and a plurality of sub-controllers connected in parallel; the target controller is any sub-controller in the system;
[0060] The target controller is used to obtain the target software package from the external memory in response to the flash command in the slave mode; wherein the slave mode represents a mode in which the controller only responds to commands issued by the host computer; and is also used to perform flash update based on the obtained target software package.
[0061] In this embodiment, if Figure 6As shown, each host computer can be connected to the sub-controller through CAN communication, and the system also includes multiple memory slots, each controller is connected to a memory slot, and each sub-controller is connected to a memory slot. The host computer can simultaneously perform flash updates on multiple sub-controllers to achieve batch flash updates to the controllers, further improving the flash update efficiency of the sub-controllers. When the host computer is only connected to the target controller, the target controller can also be controlled to be connected to multiple memories, each of which stores different software package versions. The target version to be updated is selected by the host computer, and the controller is connected from the memory where the target software package is located according to the flash command issued to obtain the target software package, thereby meeting the needs of users and further improving the user experience.
[0062] Figure 7 A schematic diagram of the structure of an embodiment of the electronic device provided by the present application is shown, which shows a schematic diagram of the structure of a computer system suitable for implementing the electronic device of the embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.
[0063] See also Figure 7 As shown, the electronic device 500 includes a central processing unit (CPU) 501 and a read-only memory (ROM) 502, wherein the central processing unit 501 is a processor and the read-only memory (ROM) 502 is a memory. The central processing unit 501 can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method in the above embodiment. In RAM 503, various programs and data required for system operation are also stored. CPU 501, ROM 502 and RAM 503 are connected to each other through bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0064] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
[0065] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 509, and / or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the system of the present application are executed.
[0066] Another aspect of the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the method for obtaining the motion direction as described above when the computer program is executed by a processor. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0067] Another aspect of the present application also provides a computer program product or a computer program, which includes at least one executable instruction. When the executable instruction is run on a motion direction acquisition device / electronic device, the motion direction acquisition device / electronic device executes the control flashing method as described above.
[0068] The executable instructions can be specifically used to enable the controlled flashing device / electronic device to perform the following operations:
[0069] In slave mode, in response to a flash command, the target software package is obtained from the external memory; wherein the slave mode represents a mode in which the controller only responds to commands issued by the host computer;
[0070] Flash update is performed based on the acquired target software package.
[0071] Figure 8 The schematic diagram of the structure of an embodiment of a flash writing device of a controller provided by the present application is shown. Figure 8 As shown, the device 600 includes: an acquisition module 610 and a flashing module 620;
[0072] The acquisition module 610 is used to acquire the target software package from the external memory in response to the flash command in the slave mode; wherein the slave mode represents a mode in which the controller only responds to the command issued by the host computer;
[0073] The flashing module 620 is used to perform a flashing update based on the acquired target software package.
[0074] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0075] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0076] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0077] According to one aspect of an embodiment of the present application, a computer system is also provided, including a central processing unit (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage portion into a random access memory (RAM), such as executing the method in the above embodiment. In RAM, various programs and data required for system operation are also stored. CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0078] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0079] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A controller flashing method, characterized in that: The method comprises: In slave mode, in response to a flash command, the target software package is obtained from the external memory; wherein the slave mode represents a mode in which the controller only responds to commands issued by the host computer; Flash update is performed based on the acquired target software package.
2. The controller flashing method according to claim 1, characterized in that: Before responding to the flash command, the method further comprises: Transmitting the initial version information to the host computer; Receive the flash command; wherein the flash command is issued when the host computer determines that the type information of the controller is preset type information according to the initial version information.
3. The controller flashing method according to claim 1, characterized in that: After the flash update based on the acquired target software package is performed, the method further includes: In response to the verification command, the specific information is transmitted to the host computer, so that the host computer verifies the updated target software package according to the specific information, obtains the verification result and outputs it; wherein the verification command is issued after the host computer issues the flash command for a preset period of time.
4. The controller flashing method according to claim 1, characterized in that: After the flash update based on the acquired target software package is performed, the method further includes: In response to a version information read command, the updated version information is transmitted to the host computer; wherein the version information read command is issued after the host computer issues a flash write command for a preset period of time; In response to the verification command, the specific information is transmitted to the host computer, so that the host computer verifies the updated target software package according to the specific information, obtains the verification result and outputs it; wherein the verification command is issued when the host computer confirms that the updated version information is the target version information.
5. The controller flashing method according to claim 1, characterized in that: The step of obtaining the target software package from the external memory further comprises: Obtain target identification information of the software package from the external storage; If the target flag information of the software package is preset flag information, the software package is determined to be a target software package, and the target software package is acquired; wherein the flag information includes: a format of the software package and / or a name of the software package.
6. The controller flashing method according to claim 1, characterized in that: The step of obtaining the target software package from the external memory further comprises: The target software package is obtained from the external memory through the interface of the universal serial bus.
7. A controller flashing system, characterized in that: The system comprises: a host computer and a plurality of sub-controllers connected in parallel; the target controller is any sub-controller in the system; The target controller is used to obtain the target software package from the external memory in response to the flash command in the slave mode; wherein the slave mode represents a mode in which the controller only responds to instructions issued by the host computer; and is also used to perform flash update based on the obtained target software package.
8. A flashing device for a controller, characterized in that: The device comprises: An acquisition module is used to acquire a target software package from an external memory in response to a flash command in a slave mode; wherein the slave mode represents a mode in which the controller only responds to instructions issued by a host computer; The flashing module is used to perform flashing update based on the acquired target software package.
9. An electronic device, characterized in that: include: processor; A memory for storing a computer program, wherein the computer program, when executed by the processor, implements the flashing method of the controller according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the flashing method of the controller according to any one of claims 1 to 6 is implemented.
