Vehicle control device
11467865 ยท 2022-10-11
Assignee
Inventors
- Tsunamichi Tsukidate (Tokyo, JP)
- Tasuku ISHIGOOKA (Tokyo, JP)
- Tomohito Ebina (Ibaraki, JP)
- Kazuyoshi Serizawa (Ibaraki, JP)
Cpc classification
B60W50/0205
PERFORMING OPERATIONS; TRANSPORTING
G06F11/07
PHYSICS
F02D45/00
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
B60R16/023
PERFORMING OPERATIONS; TRANSPORTING
International classification
F02D45/00
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
B60W50/02
PERFORMING OPERATIONS; TRANSPORTING
G05D1/00
PHYSICS
B60R16/023
PERFORMING OPERATIONS; TRANSPORTING
Abstract
In the present invention, when an abnormality occurs in a task, regardless of whether a critical section is being executed, timeout detection is realized by determining whether the critical section (CS) is necessary for the design in a preset task execution time and a certain period of time to distinguish between necessary interrupt disable and abnormal interrupt disable. A vehicle control device includes task execution means for causing a system to execute a task, and interrupt processing means for performing an interrupt process at the time of execution of the task. A maskable interrupt and a non-maskable interrupt that is commanded to execute after the maskable interrupt are included, the maskable interrupt is commanded to execute during an interrupt disable time, and then the non-maskable interrupt is executed.
Claims
1. A vehicle control device, comprising: an interrupt processor configured to perform an interrupt process at a time of execution of a task, wherein the interrupt processor includes a first non-maskable interrupt, a maskable interrupt that is commanded to execute after a predetermined time from the first non-maskable interrupt, and a second non-maskable interrupt that is commanded to execute after the maskable interrupt that is after a predetermined time from the first non-maskable interrupt, and includes a case where the first non-maskable interrupt is commanded to execute during an interrupt disable time, and the maskable interrupt is executed after the interrupt disable time is released, and wherein the interrupt processor is configured to command the first non-maskable interrupt and the maskable interrupt to execute during the interrupt disable time, and to cause the second non-maskable interrupt to be executed.
2. The vehicle control device according to claim 1, wherein the non-maskable interrupt is executed when the maskable interrupt cannot be executed.
3. The vehicle control device according to claim 1, wherein the interrupt processor is further configured to perform the interrupt process when a failure of a system, for which the task is executed, is monitored.
4. A vehicle control device, comprising: an interrupt processor configured to perform an interrupt process at a time of execution of a task, wherein the interrupt processor includes a first non-maskable interrupt, a maskable interrupt that is commanded to execute after a predetermined time from the first non-maskable interrupt, and a second non-maskable interrupt that is commanded to execute after the maskable interrupt that is after a predetermined time from the first non-maskable interrupt, and includes a case where the first non-maskable interrupt is commanded to execute during an interrupt disable time, and the maskable interrupt is executed after the interrupt disable time is released, and the interrupt processor is configured to command the first non-maskable interrupt and the maskable interrupt to execute during the interrupt disable time, and to cause the second non-maskable interrupt to be executed.
5. The vehicle control device according to claim 4, wherein the second non-maskable interrupt is executed when maskable interrupt cannot be executed.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
DESCRIPTION OF EMBODIMENTS
First Embodiment
(10)
(11) The calculation unit 3 is a processor core (Central Processing Unit) that executes a program stored in the program area 2. The program area 2 stores a software control unit 201, a task execution unit 202, a non-maskable interrupt execution unit 203, and a software interrupt execution unit 204.
(12) The storage area 4 stores a data management table 401 described later with reference to
(13) The hardware timer 5 counts a clock, and an elapsed time can be known from the counter value of the clock. The timer has a comparison circuit. A numerical value stored in a timer register described later with reference to
(14) When the interrupt controller 6 receives the above-described non-maskable signal from the hardware timer 5, the interrupt controller 6 interrupts the process being executed by the calculation unit and generates a non-maskable interrupt (hereinafter, non-maskable interrupt).
(15) The configuration of the engine control unit ECU 1 in the first embodiment is not limited to this. For example, a non-volatile memory (backup RAM) for storing data, a shared memory for accessing each calculation unit, a different sensor, or the like may be provided.
(16) A table stored in the storage area 4 and the hardware timer 5 of the engine control unit ECU1 will be described below.
(17)
(18)
(19) The above-described table is stored in the storage area 4 and the hardware timer 5 of the engine control unit ECU 1 of the first embodiment, but the storage location of the table is not limited to this.
(20) The operation of the hardware timer 5 of the engine control unit ECU 1 and the operation flow of the program stored in the program area 2 and executed by the calculation unit 3 will be described.
(21)
(22) (
(23) The hardware timer 6 5 increments and updates a hardware timer counter value.
(24) (
(25) The hardware timer 5 proceeds to step 602 when the hardware timer counter value reaches the maximum value, and proceeds to step 603 otherwise.
(26) (
(27) The hardware timer 5 resets a counter and proceeds to step 40301.
(28) (
(29) When the compare match flag managed by the timer register table 500 is 1, the hardware timer 5 proceeds to step 604 if values match, and proceeds to step 606 otherwise.
(30) (
(31) The hardware timer 5 compares the hardware timer with the compare match counter managed by the timer register table 500, and the hardware timer 5 proceeds to step 604 if they match, and proceeds to step 606 otherwise.
(32) (
(33) The hardware timer 5 calls a non-maskable interrupt described later, and proceeds to step 606.
(34) (
(35) The hardware timer 5 determines whether or not end conditions are satisfied. If the end conditions are satisfied, the hardware timer 5 ends the process, or proceeds to step 601 if not satisfied.
(36)
(37) (
(38) The software control unit 201 initializes the storage area 4 and an HW timer 5, and proceeds to step 20101.
(39) (
(40) The software control unit 201 calls a task execution unit described later and proceeds to step 20102.
(41) (
(42) The software control unit 201 determines whether or not end conditions are satisfied, and ends the process if satisfied, or proceeds to step 20101 if not satisfied.
(43)
(44) (
(45) The task execution unit 202 sets a compare match setting value in the timer register table 500 and proceeds to Step 20201. Here, setting of the compare match setting value refers to the process of setting the compare match flag in the timer register table 500 to 1 to set the mode to generate a compare match, and the process of acquiring the current HW timer counter from an input capture register to set the period (compare match counter) until a compare match generates.
(46) (
(47) The task execution unit 202 executes the CS start process and proceeds to Step 20202. Here, the CS start process is an interrupt prohibition process for preventing the process in a critical section from being interrupted by other processes.
(48) (
(49) The task execution unit 202 executes the CS process and proceeds to Step 20203.
(50) (
(51) The task execution unit 202 executes a CS end process and proceeds to Step 20204. Here, the CS end process is a process for releasing an interrupt disable process and the like for preventing a critical section from being interrupted by other processes.
(52) (
(53) The task execution unit 202 executes a compare match end process and ends the process. Here, the compare match end process is a process for setting the compare match flag of the timer register table 500 to 0 and turning off the compare match function.
(54) (
(55) The NMI execution unit 203 determines the number of times of non-maskable interrupt execution in the data recording table 402. If it is the first time. The NMI execution unit 203 proceeds to step 20301, and proceeds to step 20304 otherwise.
(56) (
(57) The NMI execution unit 203 executes a compare match setting process and proceeds to step 20302. Here, the compare match setting process refers to a process of acquiring a second compare match time from the data management table 401 and setting it in the compare match counter of the timer register table 500.
(58) (
(59) The NMI execution unit 203 executes an SW interrupt call process and proceeds to Step 20303. Here, the SW interrupt process is an interrupt generation process for calling a software interrupt execution unit of
(60) (
(61) The NMI execution unit 203 executes an NMI execution counter update process and ends the process. Here, the NMI execution counter update process refers to a process of incrementing the number of times of non-maskable interrupt execution in the data recording table 402.
(62) (
(63) The NMI execution unit 203 executes a reset process and ends the process.
(64) (
(65) The software interrupt execution unit 204 executes a saving process and proceeds to step 20401. Here, the saving process refers to a process of storing a register value, a program counter value, and an HW timer counter value of the currently executing process in the storage area 4, but is not limited thereto.
(66) (
(67) The software interrupt execution unit 204 executes task stop process and proceeds to step 20401. The task stop process is a process for stopping a task in which an abnormality is detected by a compare match.
(68) (
(69) The software interrupt execution unit 204 executes a compare match end process and ends the process. The compare match end process is a process of setting the compare match flag of the timer register table 500 to 0 and turning off the compare match function.
(70) As described above, according to the first embodiment, when an abnormality occurs in a task, regardless of whether a critical section is being executed, timeout detection is realized by determining whether the critical section (CS) is necessary for the design in a preset task execution time and a certain period of time to distinguish between necessary interrupt disable and abnormal interrupt disable.
(71) The present embodiment can express the following configuration.
(72) A vehicle control device includes task execution means for causing a system to execute a task, and interrupt processing means for performing an interrupt process at the time of execution of the task. A maskable interrupt and a non-maskable interrupt that is commanded to execute after the maskable interrupt are included, the maskable interrupt is commanded to execute during an interrupt disable time, and then the non-maskable interrupt is executed.
(73) The non-maskable interrupt is executed when the maskable interrupt cannot be executed.
(74) The interrupt processing means performs the interrupt processing when monitoring a failure of the system.
(75) Task execution means for executing a task, and interrupt processing means for performing an interrupt process at the time of execution of the task are provided. The interrupt processing means includes a first non-maskable interrupt, a maskable interrupt that is commanded to execute after a predetermined time from the first non-maskable interrupt, and a second non-maskable interrupt that is commanded to execute after the maskable interrupt that is after a predetermined time from the first non-maskable interrupt. The interrupt processing means includes a case where the first non-maskable interrupt is commanded to execute during an interrupt disable time, and the maskable interrupt is executed after the interrupt disable time is released, and a case where the first non-maskable interrupt and the maskable interrupt are commanded to execute during the interrupt disable time, and then the second non-maskable interrupt is executed.
(76) The second non-maskable interrupt is executed when the maskable interrupt cannot be executed.