Method for rewriting control devices and control programs

KR103002536B1Active Publication Date: 2026-08-11FDK CORP
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
KR1020227031529
Authority / Receiving Office
KR · KR
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-03-16
Filing Date
2021-02-16
Publication Date
2026-08-11
Estimated Expiration
2041-02-16

Smart Images

  • Figure 112022095442080-PCT00001_ABST
    Figure 112022095442080-PCT00001_ABST
Patent Text Reader

Abstract

The control unit (2) is configured to determine whether the rewrite process is successful or unsuccessful after the rewrite process is completed, and to write success or failure indicator data (32) according to the success or failure result in the success or failure result memory area, and after the electronic device is started, to read the success or failure indicator data in the success or failure result memory area, and if it is determined that the success or failure indicator data indicates success in the rewrite process, to execute the control program (31) without performing the rewrite process.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to a control device and a method for rewriting a control program. Background Technology

[0002] In recent years, control devices such as microprocessors installed in electronic devices have been equipped with a memory device capable of storing a control program for controlling the operation of said electronic device, as shown in Patent Documents 1 to 3 below, and are capable of rewriting said control program. The said control device performs a verification operation to check whether the rewriting of the control program has been performed normally every time the electronic device starts up. The reason for performing said verification operation is that the control program is not rewritten normally due to factors such as the power being cut off or communication failures occurring during the rewriting of the control program. In this case, it is necessary to perform the rewriting of the control program once more. However, if said verification operation is performed every time the electronic device starts up, there is a problem that the start-up of the electronic device is delayed for said verification operation. Prior art literature

[0003] Japanese Patent Publication No. 2004-318933, Japanese Patent Publication No. Hei 08-055068, Japanese Patent Publication No. Hei 10-063497 The problem to be solved

[0004] The present invention has been made in consideration of these circumstances, and its purpose is to provide a control device and a method for rewriting a control program that can execute the rewriting of a control program more flexibly while suppressing the delay in startup caused by the verification operation. means of solving the problem

[0005] The present invention is made to solve at least some of the aforementioned problems and can be realized in the following embodiments.

[0006] A control device according to the present embodiment comprises a control unit configured to control the operation of an electronic device to be controlled by executing a control program, a memory unit configured to store the control program, and a communication unit configured to receive an update program from the outside. The control unit is capable of executing a rewrite process in which the control program stored in the memory unit is rewritten into the update program received through the communication unit. The memory unit has a success / failure determination result memory area that stores success / failure indicator data indicating the success or failure of the rewrite process. After the rewrite process is completed, the control unit determines the success or failure of the rewrite process and writes the success / failure indicator data to the success / failure determination result memory area according to the success or failure. After the electronic device is started, the control unit reads the success / failure indicator data from the success / failure determination result memory area, and if it is determined that the success / failure indicator data indicates the success of the rewrite process, the control device is configured to execute the control program without performing the rewrite process.

[0007] According to the above configuration, the control device according to the present embodiment can omit processing such as rewriting the control program and checksum based on the success or failure indication data, thereby enabling high-speed startup of the electronic device.

[0008] A method for rewriting a control program according to the present embodiment is a method for rewriting a control program for controlling the operation of an electronic device stored in a memory unit, comprising: a first step of determining whether there is an execution instruction for rewriting the control program; a second step of rewriting the control program into an update program; a third step of determining whether the rewriting from the control program to the update program is successful or unsuccessful; a fourth step of writing success or failure indicator data indicating the success or failure of the rewriting into a success or failure determination result memory area provided in the memory unit according to the success or failure of the rewriting; and a fifth step of reading the success or failure indicator data in the success or failure determination result memory area. After the electronic device starts up, if it is determined in the first step that there is no execution instruction for the rewriting process, the fifth step is performed directly, and if it is determined in the fifth step that the success or failure indicator data indicates success of the rewriting process, the control program is executed without going through the second to fourth steps.

[0009] Accordingly, the method for rewriting a control program according to the present embodiment can omit processing such as rewriting the control program and checksum processing based on the success or failure indication data, thereby enabling high-speed operation of the electronic device. Effects of the invention

[0010] The control device and the method for rewriting the control program according to the present embodiment can execute the rewriting of the control program more flexibly while suppressing the delay in startup caused by the verification operation. Brief explanation of the drawing

[0011] FIG. 1 is a circuit diagram illustrating an electronic circuit having a control device according to the present embodiment. Figure 2 is a block diagram illustrating the configuration of the control device shown in Figure 1. FIG. 3 is a flowchart showing the flow of processing during the startup of an electronic device by a control device according to the present embodiment. Specific details for implementing the invention

[0012] Hereinafter, a control device and a method for rewriting a control program according to one embodiment will be described with reference to the drawings. Furthermore, this embodiment is not limited to the contents described below, and it may be implemented with arbitrary modifications within the scope of not altering the gist thereof. Additionally, the drawings used to describe the embodiment are all schematic representations of constituent components, and partial emphasis, enlargement, reduction, or omission may be performed to enhance understanding; therefore, the scale or shape of the constituent components may not be accurately represented.

[0013] (composition)

[0014] First, a control device (1) according to the present embodiment will be described with reference to FIGS. 1 and FIG. 2. FIG. 1 is a circuit diagram illustrating an electronic circuit EC equipped with a control device (1) according to the present embodiment. The control device (1) shown in FIG. 1 controls the operation of an electronic device (not shown) to be controlled by executing a control program stored internally. The control device (1) according to the present embodiment is provided, for example, in an electronic circuit EC mounted on the electronic device. The control device (1) shown in FIG. 1 is provided in an electronic circuit EC mounted on a generally known electronic device such as a storage device (including a battery pack), a power supply, a home appliance, an industrial PC, a server, a mobile phone, or a wireless router. More specifically, the control program is a program for controlling the charging and discharging of a battery pack (secondary battery) provided in the electronic device.

[0015] Here, the control device (1) can rewrite a control program stored internally into a control program stored in an external device EA. The control program stored in the external device EA (not shown) is, for example, a control program for updating (hereinafter referred to as an update program). The update program includes a version of the control program released later than the current control program or a version of the control program released before the current control program. A version of the control program released before the current control program is used, for example, as a rewrite program in case there is a problem with the current control program.

[0016] In addition, the electronic circuit EC shown in FIG. 1, under the control of the control device (1), has a first input / output terminal T H or 2nd input / output terminal T L It is a bidirectional converter that converts a voltage input from one side and outputs it from the other side. The electronic circuit EC is composed of circuit elements such as a switching element SW1 on the high side, a coil L, a switching element SW2 on the low side, a first capacitor C1, and a second capacitor C2. The control device (1) controls the on / off operation of each of the circuit elements, specifically the switching element SW1 on the high side and the switching element SW2 on the low side.

[0017] FIG. 2 is a block diagram illustrating the configuration of the control device (1) shown in FIG. 1. The control device (1) shown in FIG. 2 comprises a control unit (2), a memory unit (3), and a communication unit (4). The control unit (2), the memory unit (3), and the communication unit (4) are connected to each other through a bus (5).

[0018] The control unit (2) includes a predetermined processor as a hardware resource. The control unit (2) controls the operation of an electronic device to be controlled by executing the control program. Additionally, the control unit (2) can execute a rewrite process to rewrite the control program (31) stored in the memory unit (3) into an update program received through the communication unit (4). Additionally, the update program is received through the communication unit (4) from a device located outside the electronic device (e.g., external device EA).

[0019] The memory unit (3) includes non-volatile RAM (Random Access Memory) as a hardware resource. The memory unit (3) stores the control program (31). Additionally, the memory unit (3) has a success / failure determination result memory area (not shown) that stores success / failure indicator data (32) indicating whether the rewrite process was successful or not.

[0020] The communication unit (4) is intended to communicate with an external device EA via wired or wireless means. In this embodiment, the communication unit (4) is connected to the external device EA through a communication cable. Additionally, the communication unit (4) is connected to the external device EA through a network such as a LAN (Local Area Network) and a WAN (Wide Area Network). The communication unit (4) receives the update program from the outside.

[0021] (Flow of processing during the startup of an electronic device)

[0022] Here, the flow of processing executed in the control device (1) when the electronic device is started will be explained with reference to FIG. 3. FIG. 3 is a flowchart showing the flow of processing when the electronic device is started by the control device (1) according to the present embodiment.

[0023] First, the control unit (2) executes the operation of starting the electronic device (step S1). After the end of step S1, the control unit (2) determines whether there is an instruction to rewrite the control program (31) stored in the memory unit (3) or whether the control program (31) is not stored in the memory unit (3) (i.e., whether it is in a null state indicating that the control program (31) is not stored in the memory unit (3)) (step S2).

[0024] When there is an instruction to rewrite the control program (31) stored in the memory unit (3) or when it is in a null state ("Yes" in Step S2), the control unit (2) executes the rewrite process (Step S3). After Step S3 is completed, the control unit (2) determines whether the rewrite process is successful or not. More specifically, the control unit (2) determines whether the rewrite of the control program (31) is successful by whether the output voltage output to the input voltage input to the electronic circuit EC is output as a predetermined value (i.e., whether a checksum is executed and the result of the checksum is "Success (OK)") (Step S4). When the rewriting of the control program (31) is successful (i.e., when the output voltage is output at a predetermined value (when the checksum result is "OK")) ("Yes" in Step S4), the control unit (2) writes "Success (OK)" as the success / failure indication data (32) to the success / failure determination result memory area (Step S5). After Step S5 is completed, the control unit (2) normally starts the electronic device (Step S6). After Step S6 is completed, the series of processes is terminated.

[0025] Additionally, if the rewriting of the control program (31) fails (i.e., if the output voltage is not output at a predetermined value (if the result of the checksum is "NG")) ("No" in step S4), the control unit (2) writes "Failure (NG)" as the success / failure indicator data (32) to the success / failure determination result memory area (step S7).

[0026] After the completion of Step S7, the control unit (2) determines whether a predetermined branching condition is satisfied (Step S8). Here, the branching in Step S8 is provided to prevent the control unit (2) from executing rewrite processing and checksum processing, etc., whenever the rewrite of the control program (31) fails (i.e., an infinite loop). More specifically, the predetermined branching condition includes at least one of "(i) whether a predetermined number of rewrite processings were executed without transitioning to the normal startup when the electronic device starts" or "(ii) whether a predetermined time elapsed without transitioning to the normal startup when the electronic device starts". That is, in Step S8, the control unit (2) determines whether at least one of (i) or (ii) is satisfied.

[0027] If the above-mentioned predetermined branching condition is not satisfied ("No" in Step S8), the control unit (2) again determines whether there is a rewrite execution instruction (Step S9). If there is a new rewrite execution instruction ("Yes" in Step S9), the control unit (2) returns to Step S3 and executes the rewrite process. That is, the control unit (2) determines that the rewrite process failed based on the checksum result and executes the rewrite process again.

[0028] When the above-mentioned branching conditions are satisfied ("Yes" in Step S8) or when there is no instruction to execute a new rewrite ("No" in Step S9), the control unit (2) generates an abnormality notification and presents the abnormality notification to the user (Step S10). In addition, the abnormality notification may be a display including text information or drawing information, etc., or a sound indicating an abnormality.

[0029] Additionally, if there is no instruction to rewrite the control program (31) stored in the memory unit (3) or if it is not in a null state (i.e., the control program (31) is stored in the memory unit (3)) ("No" in Step S2), the control unit (2) reads the success / failure indicator data (32) in the memory area of ​​the success / failure determination result and determines whether the rewrite process executed previously is successful according to the success / failure indicator data (32) (i.e., whether the success / failure indicator data (32) is "OK") (Step S11). If the success / failure indicator data (32) is "OK" ("Yes" in Step S11), the control unit (2) proceeds to Step S6 and normally starts the electronic device. That is, in this embodiment, the control unit (2) omits the processing in Steps S3 to S10 when the success / failure indicator data (32) is "OK". If the success / failure indicator data (32) is not "OK" (i.e., if the success / failure indicator data (32) is "NG") ("No" in step S11), the control unit (2) proceeds to step S4, executes the checksum, and determines the result of the checksum.

[0030] (Overall)

[0031] As described above, the control device (1) according to the present embodiment comprises a control unit (2), a memory unit (3), and a communication unit (4). The control unit (2) controls the operation of an electronic device to be controlled by executing the control program (31). The memory unit (3) stores the control program (31). The communication unit (4) receives the update program from the outside. Additionally, the control unit (2) can perform a rewrite process to rewrite the control program stored in the memory unit (3) into the update program received through the communication unit (4). Additionally, the memory unit (3) has a success / failure determination result memory area that stores success / failure indicator data (32) indicating whether the rewrite process was successful or not.

[0032] In the above configuration, the control unit (2) determines whether the rewrite process is successful or unsuccessful after the rewrite process is completed, and writes success or failure indicator data (32) to the success or failure determination result memory area according to the success or failure result. Additionally, the control unit (2) reads the success or failure indicator data (32) written to the success or failure determination result memory area after the electronic device is started. If the control unit (2) determines that the success or failure indicator data (32) indicates success in the rewrite process, it executes the control program (31) without performing the rewrite process. That is, the control device (1) according to the present embodiment may omit the processing in steps S3 to S10 according to the success or failure indicator data (32). That is, the control device (1) according to the present embodiment can omit processing such as rewriting the control program (31) and checksum processing according to the success / failure indicator data (32), thereby enabling high-speed operation of the electronic device.

[0033] In this way, the control device (1) according to the present embodiment can execute the rewriting of the control program more flexibly while suppressing the delay in startup caused by the verification operation of whether the rewriting of the control program (31) has been performed normally. In addition, the control device (1) according to the present embodiment can realize high-speed startup without separately preparing non-volatile memory, etc. by forming a memory area for the success or failure determination result in the memory unit (3) built into itself.

[0034] In addition, the control device (1) according to the present embodiment can achieve high-speed operation in systems that want to output power quickly, because in the battery / power field, the relationship is that "starting the control program (31)" = "charging and discharging becomes possible." Also, the control device (1) according to the present embodiment starts the device after recognizing that the battery is started and there is no abnormality in the system attached to the battery in an industrial PC and server, so if the starting speed of the control program (31) is fast, the starting speed can be increased accordingly. Also, in the present embodiment, the calculation time may take approximately 2 seconds, depending on the processing speed of the microprocessor and the amount of the program. Therefore, by using the control device (1) according to the present embodiment, the original processing can be started about 2 seconds faster, and even if the rewriting of the control program (31) fails, rewriting can be performed.

[0035] Here, in the above embodiment, the control device (1) is provided in an electronic circuit EC mounted on an electronic device. However, the control device (1) according to the present embodiment is not limited thereto. For example, the control device (1) according to the present embodiment may be provided separately from the electronic circuit EC.

[0036] In addition, in the control device (1) according to the present embodiment, the combination of the success / failure indicator data (32) is a combination that indicates success in the case of success and indicates failure in the case of failure. However, the control device (1) according to the present embodiment is not limited thereto. For example, the combination of the success / failure indicator data (32) may be a combination that indicates null in the case of success and failure in the case of failure. In addition, the combination of the success / failure indicator data (32) may be a combination that indicates success in the case of success and null in the case of failure.

[0037] In addition, the control device (1) according to the present embodiment is applied to the bidirectional converter as an example. However, the control device (1) according to the present embodiment is not limited thereto. For example, the control device (1) according to the present embodiment can be appropriately installed in circuits such as a battery charge / discharge control circuit in addition to the bidirectional converter.

[0038] In addition, in this embodiment, the instruction to execute the rewrite of the control program (31) may be transmitted from the external device EA and received through the communication unit (4) when information that triggers the rewrite of the control program (31), such as information regarding the update of the control program (31) and information regarding the vulnerability of the control program (31), exists in the external device EA.

[0039] In addition, in this embodiment, the checksum may be performed by reading data from the program area and adding all data to check whether the calculated value is a valid value, in order to verify whether the control program (31) is entered correctly.

[0040] In addition, the term "predetermined processor" used in the above description refers to, for example, dedicated or general-purpose processors such as a CPU (Central Processing Unit), MPU (Micro Processing Unit), or GPU (Graphics Processing Unit), or application-specific integrated circuits (ASIC), programmable logic devices (for example, Simple Programmable Logic Device (SPLD), Complex Programmable Logic Device (CPLD), and Field Programmable Gate Arrays (FPGA). Furthermore, each component (each processing circuit) of the present embodiment is not limited to a single processor and may be realized by multiple processors. In addition, multiple components (multiple processing circuits) may be realized by a single processor.

[0041] Although embodiments have been described above, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments may be implemented in various other forms, and various omissions, substitutions, and modifications may be made within the scope of not departing from the essence of the invention. These embodiments and their variations are included within the scope and essence of the invention and are also included within the scope of equivalents to the invention described in the patent claims. Explanation of the symbols

[0042] 1: Control unit 2: Control unit 3: Memory 4: Communications Department 5: Bus EC: Electronic circuit EA: External device

Claims

Claim 1 A control unit configured to control the operation of an electronic device to be controlled by executing a control program, a memory unit configured to store said control program, and a communication unit configured to receive an update program from the outside; the control unit is capable of executing a rewrite process to rewrite said control program to a control program that has been updated based on the update program received through the communication unit, and the memory unit has a success / failure determination result memory area that stores success / failure indicator data indicating the success or failure of said rewrite process; the control unit determines, after the electronic device starts up, whether there is an execution instruction for rewriting said control program stored in the memory unit or whether said control program is not stored in the memory unit; if there is an execution instruction for rewriting said or if said control program is not stored in the memory unit, it executes said rewrite process; after the rewrite process is completed, it determines whether said rewrite process was successful or not, and writes said success / failure indicator data to the success / failure determination result memory area according to said success or failure; and if there is no execution instruction for rewrite said or if said control program A control device configured to execute the control program without performing the rewrite process when the above-mentioned memory unit is stored, read the above-mentioned success / failure indicator data in the above-mentioned success / failure determination result memory area, and when it is determined that the above-mentioned success / failure indicator data indicates the success of the above-mentioned rewrite process. Claim 2 A control device according to claim 1, wherein the combination of the success / failure indication data is a combination that indicates success in the case of success and indicates failure in the case of failure, a combination that indicates success in the case of success and is null in the case of failure, or a combination that is null in the case of success and indicates failure in the case of failure. Claim 3 A control device according to claim 1 or 2, wherein the rewrite process is executed when there is an instruction to execute the rewrite process and when the control program is not stored in the memory unit. Claim 4 A control device according to claim 1 or 2, wherein the control program is a program that controls the charging and discharging of a secondary battery provided in the electronic device. Claim 5 A method for rewriting a control program for controlling the operation of an electronic device stored in a memory unit, comprising: a first step of determining whether there is an execution instruction for rewriting the control program; a second step of rewriting the control program into an updated control program based on an update program; a third step of determining whether the rewriting from the control program to the update program is successful or unsuccessful; a fourth step of writing success or failure indicator data indicating the success or failure of the rewriting into a success or failure determination result memory area provided in the memory unit according to the success or failure of the rewriting; and a fifth step of reading the success or failure indicator data in the success or failure determination result memory area. After the electronic device starts up, if it is determined in the first step that there is no execution instruction for rewriting, the fifth step is performed directly, and if it is determined in the fifth step that the success or failure indicator data indicates success of the rewriting, the control program is executed without going through the second to fourth steps. Claim 6 A method for rewriting a control program according to claim 5, wherein the combination of the success / failure indication data is a combination that indicates success in the case of success and indicates failure in the case of failure, a combination that indicates success in the case of success and is null in the case of failure, or a combination that is null in the case of success and indicates failure in the case of failure.

Citation Information

Patent Citations

  • Electronic control apparatus for automobile

    JP2009026183A

  • Communication adapter

    JP2009134563A

  • Boot method of a system whose system BIOS has been disabled

    US20020066009A1

  • Apparatus and method for firmware upgrade in microprocessor-based processing units

    US20040236932A1

  • Power management scheme for external batteries

    US20060080051A1