Task processing method and control device
The method and control device ensure the second task processing is initiated only after the first task processing is finished, addressing the issue of incomplete diagnostic result saving by using a dual-processing unit system to manage task sequences effectively.
Patent Information
- Application Number
- JP2024039128
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2025-09-29
AI Technical Summary
Diagnostic information is not always successfully saved due to the second task process starting before the first task process, which saves the diagnostic result, is completed.
A method and control device that includes a first processing unit and a second processing unit, with a determination step to ensure the first task processing is completed before starting the second task processing, using acquisition units to check the status of the first processing unit.
Ensures the second task processing is started only after the first task processing is completed, preventing the shutdown sequence from occurring before diagnostic results are stored.
Smart Images

Figure 2025140000000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a task processing method and a control device. [Background technology]
[0002] Patent Document 1 discloses an on-vehicle electronic control device and a method for handling the device when an abnormality occurs. According to the disclosure, when it is determined that the ignition switch has been turned off, diagnostic information from the main microcomputer is stored in an EEPROM, and a self-shutoff process is performed. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] International Publication No. 2019 / 058607 Summary of the Invention [Problem to be solved by the invention]
[0004] In the disclosure of Patent Document 1, the diagnostic information indicating the diagnostic result is not necessarily saved successfully. The second task process, which performs the shutdown sequence, may start before the first task process, which saves the diagnostic result, is completed.
[0005] The present invention aims to solve the above-mentioned problems. [Means for solving the problem]
[0006] A first aspect of the present invention is a task processing method executed by a control device having a first processing unit that performs a first task processing and a second task processing, and a second processing unit different from the first processing unit, and includes: a determination step of determining whether the first processing unit has received an instruction for the first task processing from the second processing unit; a first task processing step of causing the first processing unit to start the first task processing if the instruction for the first task processing is received in the determination step; an acquisition step of acquiring a status of the first processing unit if the first task processing is started in the first task processing step; and a second task processing step of causing the first processing unit to start the second task processing based on the status acquired in the acquisition step.
[0007] A second aspect of the present invention is a control device comprising: a first processing unit having a first task processing unit that performs a first task processing and a second task processing unit that performs a second task processing; a determination unit that determines whether the first processing unit has received an instruction for the first task processing from a second processing unit different from the first processing unit; and an acquisition unit that acquires a status of the first processing unit when the first task processing is started by the first task processing unit; wherein the first task processing unit starts the first task processing when the instruction for the first task processing is received by the determination unit, and the second task processing unit starts the second task processing based on the status acquired by the acquisition unit. [Effects of the Invention]
[0008] According to the present invention, the second task processing can be started after the first task processing is completed. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is a diagram schematically illustrating the configuration of a vehicle. [Figure 2] FIG. 2 is a diagram illustrating an example of how the second task processing is started based on the control status of the memory. [Figure 3]FIG. 3 is a flowchart showing a task processing procedure performed by the control device. DETAILED DESCRIPTION OF THE INVENTION
[0010] 1 is a diagram showing a schematic configuration of a vehicle 10. The vehicle 10 has a control device 12, a battery 14, an ignition switch 16, and a relay 18. The control device 12 performs various controls, such as drive control and safety control, of the vehicle 10 based on sensor signals from sensors (not shown).
[0011] When the ignition switch 16 is operated to turn it on, power is supplied from the battery 14 to the control device 12. The control device 12 controls a drive circuit (not shown) to turn on the relay 18. When the ignition switch 16 is operated to turn it off, the control device 12 uses the power supplied from the battery 14 to the control device 12 via the relay 18 to execute a first task process and a second task process, which will be described later.
[0012] When the first task process and the second task process are completed, the control device 12 controls a drive circuit (not shown) to turn off the relay 18. Thereafter, the power supply from the battery 14 to the control device 12 is cut off until the ignition switch 16 is turned on again.
[0013] The control device 12 includes a calculation unit 30 and a memory 32. The calculation unit 30 includes a processor such as a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit). That is, the calculation unit 30 includes processing circuitry.
[0014] The memory 32 includes volatile memory such as RAM (Random Access Memory) and non-volatile memory such as ROM (Read Only Memory) or flash memory. The volatile memory is used as the working memory of the processor. The non-volatile memory stores programs executed by the processor and other necessary data.
[0015] The calculation unit 30 has a relay control unit 50, a first processing unit 52, a second processing unit 54, a diagnosis unit 56, a determination unit 58, and an acquisition unit 60. When the calculation unit 30 executes a program stored in the memory 32, the relay control unit 50, the first processing unit 52, the second processing unit 54, the diagnosis unit 56, the determination unit 58, and the acquisition unit 60 are realized.
[0016] At least some of the relay control unit 50, the first processing unit 52, the second processing unit 54, the diagnosis unit 56, the determination unit 58, and the acquisition unit 60 may be realized by an integrated circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field Programmable Gate Array), or an electronic circuit including a discrete device.
[0017] When the relay control unit 50 detects that the ignition switch 16 is turned on, it turns on the relay 18. After the ignition switch 16 is turned off, when the first task processing and the second task processing described below are completed, the relay control unit 50 turns off the relay 18. Note that, hereinafter, turning off the ignition switch 16 is also simply referred to as "ignition off."
[0018] The first processing unit 52 has a first task processing unit 70, a second task processing unit 72, and a third task processing unit 74. The first task processing unit 70 performs a first task processing. In this embodiment, the first task processing is a process of storing the diagnosis results of the diagnosis of the control device 12 after the ignition is turned off in a non-volatile memory of the memory 32. As will be described later, the first task processing is performed based on a first task processing instruction issued from the second processing unit 54. The diagnosis of the control device 12 is performed by a diagnosis unit 56.
[0019] The second task processing unit 72 performs second task processing. In this embodiment, the second task processing is processing to shut down the control device 12. That is, in the second task processing, a shutdown sequence of the control device 12 is executed. In the shutdown sequence, for example, processing is performed to store in the memory 32 learning values used for the various controls described above performed by the control device 12.
[0020] The third task processing unit 74 performs third task processing. In this embodiment, the third task processing is, for example, processing for saving the results of a diagnosis performed in response to an abnormality that occurs in the control device 12 while the ignition switch 16 is on, in a non-volatile memory of the memory 32. If the abnormality occurs immediately before the ignition switch 16 changes from on to off, there is a possibility that the third task processing will continue even after the ignition is turned off.
[0021] The second processing unit 54 performs processing different from that of the first processing unit 52. As will be described later, the second processing unit 54 is notified of the diagnosis result of the control device 12 from the diagnosis unit 56. The second processing unit 54 issues a first task processing instruction to the first processing unit 52. The first task processing instruction issued from the second processing unit 54 to the first processing unit 52 is called a first task instruction. As described above, the first task processing unit 70 of the first processing unit 52 performs the first task processing based on the first task instruction from the second processing unit 54.
[0022] After the ignition switch 16 is turned off, the diagnosis unit 56 diagnoses the control device 12 before the shutdown sequence described above. The diagnosis unit 56 diagnoses the control device 12 based on predetermined diagnostic items. When the diagnosis of the control device 12 is completed, the diagnosis unit 56 notifies the second processing unit 54 of the diagnosis result.
[0023] The second processing unit 54, which has been notified of the diagnosis result of the control device 12 by the diagnosis unit 56, issues a first task instruction to the first processing unit 52. As described above, the first task instruction is an instruction to process the first task. The first task processing is a storage process that stores the diagnosis result of the control device 12 by the diagnosis unit 56 in the memory 32. In other words, the second processing unit 54 instructs the first processing unit 52 to store the diagnosis result of the control device 12 in the memory 32. The diagnosis result stored in the memory 32 is used during the startup process of the control device 12 after the ignition switch 16 is turned on again.
[0024] The determination unit 58 determines whether the first task processing unit 70 of the first processing unit 52 has acquired a first task instruction from the second processing unit 54. If the determination unit 58 determines that the first task processing unit 70 has acquired a first task instruction, the first task processing unit 70 is expected to perform first task processing based on the acquired first task instruction.
[0025] The acquisition unit 60 acquires the status of the first processing unit 52 from the first processing unit 52. In this embodiment, the control status of the memory 32 by the first processing unit 52 is acquired as the status of the first processing unit 52. When the first processing unit 52 is executing memory access to the nonvolatile memory of the memory 32, the control status of the memory 32 becomes "executing." When the first processing unit 52 is not executing memory access to the nonvolatile memory, the control status of the memory 32 becomes "waiting." A variable value indicating the control status of the memory 32 is stored in the volatile memory of the memory 32 by the first processing unit 52.
[0026] 2 is a diagram illustrating an example of how the second task processing is started based on the control status of the memory 32. In this embodiment, the second task processing is a shutdown sequence of the control device 12. In FIG. 2, time progresses from time t1 to t13. At time t1, the ignition switch 16 changes from on to off.
[0027] As described above, the third task processing may be started before the ignition is turned off, and the third task processing may continue even after the ignition is turned off. In this embodiment, the third task processing is processing for saving a diagnosis result in the memory 32 in the event of an abnormality. In the example shown in FIG. 2, at time t1, the third task processing unit 74 of the first processing unit 52 is executing the third task processing. In the third task processing, the first processing unit 52 executes memory access to the memory 32. Therefore, the control status of the memory 32 at time t1 is "executing."
[0028] As described above, the diagnosing unit 56 diagnoses the control device 12 after the ignition switch 16 is turned off. Because the ignition switch 16 is turned off at time t1, the diagnosing unit 56 starts diagnosing the control device 12 at a subsequent time t2. When the diagnosis is completed at time t3, the diagnosing unit 56 notifies the second processing unit 54 of the diagnosis result.
[0029] The second processing unit 54, which has been notified of the diagnosis result of the control device 12 by the diagnosis unit 56, attempts to issue a first task instruction Ui for the first task processing to the first processing unit 52 at time t4. The first task processing in this embodiment is processing for saving the diagnosis result of the control device 12 in the memory 32 after the ignition is turned off.
[0030] However, if the above-described third task processing is incomplete, the first processing unit 52 may not be able to accept the first task instruction Ui from the second processing unit 54, or the second processing unit 54 may not be able to issue the first task instruction Ui. In this case, after completing the third task processing, the first processing unit 52 may not be able to perform the first task processing and may even start the second task processing.
[0031] However, in this embodiment, the second task processing is not started until the third task processing is completed and the control status of the memory 32 corresponding to the first task processing is acquired. This will be further explained with reference to FIG. 2.
[0032] As described above, there is a case where the first task instruction Ui that is to be issued by the second processing unit 54 to the first processing unit 52 at time t4 is missing. At time t5, immediately after time t4, the acquisition unit 60 acquires the control status of the memory 32 by the first processing unit 52 from the first processing unit 52. The control status of the memory 32 at time t5 is "RUNNING." This control status corresponds to the fact that the third task processing by the first processing unit 52 has not been completed.
[0033] Based on the control status of memory 32 acquired by acquisition unit 60, determination unit 58 determines whether first task processing unit 70 of first processing unit 52 has acquired a first task instruction Ui from second processing unit 54. Because the control status of memory 32 at time t5 is “running,” determination unit 58 determines that first processing unit 52 has not acquired a first task instruction Ui from second processing unit 54.
[0034] In this case, as will be described later, at time t8, after a predetermined period Tc has elapsed since time t5, the acquisition unit 60 again acquires the control status of the memory 32. Therefore, when the memory 32 becomes capable of storing the diagnostic results of the control device 12, it can be detected that the memory 32 is capable of storing the diagnostic results of the control device 12.
[0035] 2, the third task processing by the first processing unit 52, which was not completed at time t5, is completed at time t6. As a result, the control status of the memory 32 changes from "running" to "standby" at time t6. As described above, acquisition of the control status of the memory 32 is scheduled again at a later time t8, and the second task processing by the first processing unit 52 will not start at least before time t8.
[0036] At time t7, after the predetermined period Tc has elapsed since time t4, the second processing unit 54 attempts to issue a first task instruction Ui again to the first processing unit 52. At time t7, the control status of the memory 32 is "standby." Therefore, the first task processing unit 70 of the first processing unit 52 accepts the first task instruction Ui from the second processing unit 54.
[0037] As described above, at time t8, the acquisition unit 60 acquires, from the first processing unit 52, the control status of the memory 32 by the first processing unit 52. Time t8 is the time immediately after time t7. Therefore, the control status of the memory 32 at time t8 is "standby." This control status corresponds to the completion of the third task processing by the first processing unit 52.
[0038] Based on the control status of memory 32 acquired by acquisition unit 60, determination unit 58 determines whether first task processing unit 70 of first processing unit 52 has acquired a first task instruction Ui from second processing unit 54. Because the control status of memory 32 at time t8 is "standby," determination unit 58 determines that first processing unit 52 acquired a first task instruction Ui from second processing unit 54 at time t7, immediately before that.
[0039] The first processing unit 52 is expected to perform the first task processing based on the first task instruction Ui acquired at time t7. When the first task processing starts, the control status of the memory 32 changes again from "standby" to "running." Therefore, as will be described later, at time t10, a predetermined period Tc after time t8, when the control status of the memory 32 was acquired, the acquisition unit 60 again acquires the control status of the memory 32.
[0040] Unlike the example shown in FIG. 2, if the control status of memory 32 is "running" at time t8 because the third task processing is incomplete, the acquisition unit 60 will again acquire the control status of memory 32 after a predetermined period Tc has elapsed from time t8.
[0041] 2, at time t9, the first processing unit 52 starts the first task processing. In the first task processing, the first processing unit 52 executes memory access to the memory 32. Therefore, at time t9, the control status of the memory 32 changes from "standby" to "running."
[0042] As described above, at time t10, the acquisition unit 60 acquires, from the first processing unit 52, the control status of the memory 32 by the first processing unit 52. Based on the control status of the memory 32 acquired by the acquisition unit 60, the second task processing unit 72 of the first processing unit 52 starts second task processing.
[0043] The control status of the memory 32 acquired at time t10 is "RUNNING." This control status corresponds to the fact that the first task processing started at time t9 has not yet been completed. Therefore, the second task processing is not started, and as will be described later, the acquisition unit 60 acquires the control status of the memory 32 again at time t12, after a predetermined period Tc has elapsed since time t10. This makes it possible to prevent the shutdown sequence of the control device 12 from being performed before the process of saving the diagnosis results of the control device 12 is completed.
[0044] 2, the first task processing by the first processing unit 52, which was not completed at time t10, is completed at time t11. As a result, the control status of the memory 32 changes from "running" to "standby" at time t11. As described above, acquisition of the control status of the memory 32 is scheduled again at a later time t12, and the second task processing by the first processing unit 52 will not start at least before time t12.
[0045] At time t12, the acquisition unit 60 acquires, from the first processing unit 52, the control status of the memory 32 by the first processing unit 52. The control status of the memory 32 at time t12 is "standby." This control status corresponds to the completion of the first task processing by the first processing unit 52. In response to the acquisition of the control status from the acquisition unit 60, the second task processing unit 72 of the first processing unit 52 starts the second task processing at time t12.
[0046] In this manner, in this embodiment, the second task processing can be started after the first task processing is completed, which prevents the shutdown sequence of the control device 12 from being performed without the diagnostic results of the control device 12 being stored in the memory 32.
[0047] Unlike the example shown in Figure 2, if the control status of memory 32 is "running" at time t12 because the first task processing is incomplete, the acquisition unit 60 will again acquire the control status of memory 32 after a predetermined period Tc has elapsed from time t12.
[0048] 2, when the second task processing is completed at time t13, the relay control unit 50 turns off the relay 18. This cuts off the power supplied from the battery 14 to the control device 12, and the control device 12 stops operating.
[0049] 3 is a flowchart showing a task processing procedure performed by the control device 12. This processing procedure is performed by the calculation unit 30 of the control device 12 executing a program stored in the memory 32. When this processing procedure starts, in step S1, the relay control unit 50 determines whether the ignition switch 16 is turned off. If the answer is YES in step S1, this processing procedure proceeds to step S2. If the answer is NO in step S1, this processing procedure returns to step S1.
[0050] In step S2, the diagnosis unit 56 starts diagnosing the control device 12. In step S3, the diagnosis unit 56 determines whether the diagnosis started in step S2 has ended. If the answer is YES in step S3, the process proceeds to step S4. If the answer is NO in step S3, the process returns to step S3.
[0051] In step S4, the diagnosis unit 56 notifies the second processing unit 54 of the diagnosis result of the diagnosis started in step S2. In step S5, the acquisition unit 60 acquires the control status of the memory 32 by the first processing unit 52 from the first processing unit 52. In step S6, the determination unit 58 determines whether the first task processing unit 70 of the first processing unit 52 has acquired the first task instruction Ui from the second processing unit 54, based on the control status of the memory 32 acquired in step S5. If the result in step S6 is YES, the process proceeds to step S7. If the result in step S6 is NO, the process returns to step S5.
[0052] In step S7, the first task processing unit 70 of the first processing unit 52 starts the first task processing. In step S8, the acquisition unit 60 acquires the control status of the memory 32 by the first processing unit 52 from the first processing unit 52. In step S9, the second task processing unit 72 of the first processing unit 52 determines whether the first task processing by the first task processing unit 70 has been completed, based on the control status acquired by the acquisition unit 60 in step S8. If the result in step S9 is YES, the process proceeds to step S10. If the result in step S9 is NO, the process returns to step S8.
[0053] If it is determined in step S9 that the first task processing is complete based on the control status acquired in step S8, the second task processing unit 72 starts the second task processing in step S10. In step S11, the relay control unit 50 determines whether the second task processing is complete. If the answer is YES in step S11, the process proceeds to step S12. If the answer is NO in step S11, the process returns to step S11. In step S12, the relay control unit 50 turns off the relay 18. When the process of step S12 is complete, the process ends.
[0054] The following additional notes are provided regarding the above-described embodiment.
[0055] (Appendix 1) A task processing method executed by a control device (12) having a first processing unit (52) that performs first task processing and second task processing and a second processing unit (54) different from the first processing unit includes: a determination step of determining whether the first processing unit has received an instruction (Ui) for the first task processing from the second processing unit; a first task processing step of causing the first processing unit to start the first task processing if the instruction for the first task processing has been received in the determination step; an acquisition step of acquiring a status of the first processing unit if the first task processing has been started in the first task processing step; and a second task processing step of causing the first processing unit to start the second task processing based on the status acquired in the acquisition step. With this configuration, the second task processing can be started after the first task processing is completed.
[0056] (Appendix 2) The task processing method described in Supplementary Note 1 may further include a diagnosis step of diagnosing the control device and notifying the second processing unit of the diagnosis result, wherein the determination step determines whether the first processing unit has received the instruction for a save process of saving the diagnosis result in a memory (32) of the control device as the first task processing, the acquisition step acquires a control status of the memory by the first processing unit as the status, and if the control status acquired in the acquisition step corresponds to completion of the first task processing, the second task processing step may start a shutdown sequence of the control device as the second task processing. With this configuration, it is possible to prevent the shutdown sequence of the control device from being performed without saving the diagnosis result of the control device in memory.
[0057] (Appendix 3) In the task processing method described in Supplementary Note 2, the diagnosis in the diagnosis step may be started when an ignition switch 16 of a vehicle 10 equipped with the control device is turned off. With this configuration, the diagnosis result of the control device can be used when starting up the control device after the ignition switch is turned on again.
[0058] (Appendix 4) In the task processing method described in Supplementary Note 2, in the determining step, whether the instruction has been acquired by the first processing unit may be determined based on the control status of the memory by the first processing unit after the instruction, and if the instruction has not been acquired in the determining step, the determining step may be performed again after a predetermined period has elapsed. With this configuration, when the memory becomes capable of storing the diagnostic results of the control device, it can be detected that the memory is capable of storing the diagnostic results of the control device.
[0059] (Appendix 5) In the task processing method described in Supplementary Note 2, if the control status acquired in the acquiring step corresponds to a state in which the first task processing has not been completed, the acquiring step may be performed again after a predetermined period of time has elapsed. With this configuration, it is possible to prevent a shutdown sequence of the control device from being performed before the process of saving the diagnosis result of the control device is completed.
[0060] (Appendix 6) The control device includes a first processing unit having a first task processing unit (70) that performs a first task processing and a second task processing unit (72) that performs a second task processing, a determination unit (58) that determines whether the first processing unit has received an instruction for the first task processing from a second processing unit different from the first processing unit, and an acquisition unit (60) that acquires a status of the first processing unit when the first task processing is started by the first task processing unit, wherein the first task processing unit starts the first task processing when the instruction for the first task processing is received by the determination unit, and the second task processing unit starts the second task processing based on the status acquired by the acquisition unit. With this configuration, the second task processing can be started after the first task processing is completed.
[0061] Although the present disclosure has been described in detail, the present disclosure is not limited to the individual embodiments described above. Various additions, substitutions, modifications, partial deletions, etc. are possible in these embodiments without departing from the gist of the present disclosure or the spirit of the present disclosure derived from the content of the claims and their equivalents. These embodiments can also be implemented in combination. For example, in the above-described embodiments, the order of each operation and the order of each process are shown as examples and are not limited to these. The same applies when numerical values or mathematical expressions are used in the description of the above-described embodiments. [Explanation of symbols]
[0062] 10... Vehicle 12... Control device 14... Battery 16... Ignition switch 18... Relay 30... Calculation unit 32... Memory 50... Relay control unit 52... First processing unit 54... Second processing unit 56... Diagnosis unit 58... Determination unit 60... Acquisition unit 70... First task processing unit 72... Second task processing unit 74... Third task processing unit
Claims
1. A task processing method executed by a control device having a first processing unit that performs a first task process and a second task process, and a second processing unit different from the first processing unit, a determining step of determining whether the first processing unit has received an instruction to process the first task from the second processing unit; a first task processing step of causing the first processing unit to start the first task processing when the instruction for the first task processing is acquired in the determining step; an acquisition step of acquiring a status of the first processing unit when the first task processing is started in the first task processing step; a second task processing step of causing the first processing unit to start the second task processing based on the status acquired in the acquisition step; A task processing method including:
2. 2. The task processing method according to claim 1, The method further includes a diagnosis step of diagnosing the control device and notifying the second processing unit of a diagnosis result of the diagnosis, In the determining step, it is determined whether or not the first processing unit has acquired the instruction for a storage process of storing the diagnostic result in a memory provided in the control device as the first task processing, In the acquiring step, a control status of the memory by the first processing unit is acquired as the status, A task processing method, wherein if the control status acquired in the acquisition step corresponds to the completion of the first task processing, in the second task processing step, a shutdown sequence of the control device is initiated as the second task processing.
3. 3. The task processing method according to claim 2, A task processing method, wherein the diagnosis in the diagnosing step is started when an ignition switch of a vehicle equipped with the control device is turned off.
4. 3. The task processing method according to claim 2, In the determining step, whether or not the instruction has been acquired by the first processing unit is determined based on the control status of the memory by the first processing unit after the instruction has been acquired, If the instruction is not acquired in the determining step, the determining step is performed again after a predetermined period of time has elapsed.
5. 3. The task processing method according to claim 2, A task processing method, wherein if the control status acquired in the acquiring step corresponds to a state in which the first task processing is not completed, the acquiring step is performed again after a predetermined period of time has elapsed.
6. a first processing unit having a first task processing unit that performs a first task processing and a second task processing unit that performs a second task processing; a determination unit that determines whether the first processing unit has received an instruction to process the first task from a second processing unit different from the first processing unit; an acquisition unit that acquires a status of the first processing unit when the first task processing unit starts the first task processing; Equipped with the first task processing unit starts the first task processing when the determination unit acquires the instruction to process the first task; the second task processing unit starts the second task processing based on the status acquired by the acquisition unit. Control device.
Citation Information
Patent Citations
On-vehicle electronic control device and abnormal state processing method
WO2019058607A1