Electronic Control Device and Stack Usage Method
The electronic control device includes a memory and a processor. The processor is configured to use, in executing a task, at least one stack region for the task, which is previously allocated to the task, out of a plurality of stack regions allocated in the memory.
1 - 15 . (canceled)
16 . An electronic control device comprising a memory and a processor,
the processor being configured to use, in executing a task, at least one stack region for the task, which is previously allocated to the task, out of a plurality of stack regions allocated in the memory, as well as configured to execute a stack monitoring task to monitor usage of the stack region at timing of detecting an edge in an engine rotational speed sensor.
17 . The electronic control device according to claim 16 , wherein the at least one stack region used by the task is set for each group to which tasks are classified based on a predetermined rule.
18 . The electronic control device according to claim 16 , wherein the processor is a multi-core processor and the memory is connected for each core.
19 . The electronic control device according to claim 16 , wherein the processor is configured to switch a pointer indicating an address of each stack region in the memory so as to use the at least one stack region previously allocated to the task.
20 . The electronic control device according to claim 16 , wherein a plurality of levels are set for the task according to a safety level, and
the processor is configured to select the at least one stack region according to a level of the task.
21 . The electronic control device according to claim 20 , wherein the processor is configured, when executing the task, to disallow usage of at least one stack region previously allocated to a task of higher level than the task.
22 . The electronic control device according to claim 20 , wherein the processor is configured, when executing a task of higher level than a task being executed, to generate an interrupt processing to execute the task.
23 . The electronic control device according to claim 16 , wherein the stack regions are classified by level of functional safety of a vehicle.
24 . A stack usage method in which when executing a task, a processor of an electronic control device uses at least one stack region for the task, which is previously allocated to the task, out of a plurality of stack regions allocated in a memory, as well as executes a stack monitoring task to monitor usage of the stack region at timing of detecting an edge in an engine rotational speed sensor.
25 . The stack usage method according to claim 24 , wherein the at least one stack region used by the task is set for each group to which tasks are classified based on a predetermined rule.
26 . The stack usage method according to claim 24 , wherein the processor switches a pointer indicating an address of each stack region in the memory so as to use the at least one stack region previously allocated to the task.
27 . The stack usage method according to claim 24 , wherein a plurality of levels are set for the task according to a safety level, and
the processor selects the at least one stack region according to a level of the task.
28 . The stack usage method according to claim 27 , wherein when executing the task, the processor disallows usage of at least one stack region previously allocated to a task of higher level than the task.
29 . The stack usage method according to claim 27 , wherein when executing a task of higher level than a task being executed, the processor generates an interrupt processing to execute the task.
30 . The stack usage method according to claim 24 , wherein the stack regions are classified by level of functional safety of a vehicle.