Driveline component control and fault diagnostics
Methods and systems are provided for driveline control and diagnostics. In one example, a vehicle system may include a controller with instructions stored in a first memory unit and when executed by a first processing unit cause the controller to write mechanical vehicle component operating data to a shared memory unit. The controller further includes instructions stored in a second memory unit that when executed by a second processing unit cause the controller to read the mechanical vehicle component operating data to determine data validity.
1. A vehicle system, comprising:
a controller in electronic communication with a mechanical vehicle component, the controller comprising:
a processor including a first processing unit and a second processing unit;
wherein the first processing unit is independent from the second processing unit such that a diagnostic module which is executed by the second processing unit does not influence execution of a nominal control module that is executed by the first processing unit;
a memory management unit (MMU) that comprises instructions that when executed cause the controller to:
restrict access to a first memory unit by the second processing unit;
restrict access to a second memory unit by the first processing unit;
set an access to a shared memory unit as a write-only access from the first processing unit; and
set an access to the shared memory unit as a read-only access from the second processing unit;
instructions stored in the first memory unit that when executed by the first processing unit, during a first condition, cause the controller to:
directly write mechanical vehicle component operating data to the shared memory unit;
instructions stored in the second memory unit that when executed by the second processing unit via the diagnostic module, during a second condition, cause the controller to:
cyclically execute a fault function which includes directly reading the mechanical vehicle component operating data that is stored in the shared memory unit to determine data validity according to a predetermined cycle, independent from the nominal control module; and
instructions stored in the second memory unit that when executed by the second processing unit via the diagnostic module, when data invalidity is determined, cause the controller to:
operate the mechanical vehicle component in an active fault state.
2. The vehicle system of claim 1 , wherein operating the mechanical vehicle component in the active fault state includes overriding at least a portion of a plurality of nominal control commands sent to the mechanical vehicle component by the first processing unit.
3. The vehicle system of claim 1 , wherein writing the mechanical vehicle component operating data to the shared memory unit includes:
at the first processing unit, redirecting an input/output (IO) value and/or a controller area network (CAN) value sent to a board support package (BSP) using a hook function; and
at the first processing unit, writing the redirected IO value and/or the CAN value to the shared memory unit.
4. The vehicle system of claim 3 , wherein writing the redirected IO value and/or the CAN value to the shared memory unit includes writing a timestamp corresponding to the IO value and/or the CAN value.
5. The vehicle system of claim 4 , wherein reading the mechanical vehicle component operating data to determine data validity includes accessing the mechanical vehicle component operating data using the timestamp.
6. The vehicle system of claim 1 , further comprising:
instructions stored in the second memory unit that when executed by the second processing unit cause the controller to:
trigger a watchdog feed function that updates a watchdog status in the shared memory unit; and
instructions stored in the second memory unit that when executed by the second processing unit, when a fault logic execution error occurs, cause the controller to:
discontinue the watchdog feed function;
trigger a watchdog timer in response to discontinuing the watchdog feed function; and
operate the mechanical vehicle component in the active fault state in response to triggering the watchdog timer.
7. The vehicle system of claim 1 , wherein the first processing unit includes a first core and the second processing unit includes a second core.
8. The vehicle system of claim 1 , wherein the first processing unit and the first memory unit are physically separated from the second processing unit and the second memory unit.
9. A method for operation of a vehicle system, comprising:
at a memory management unit (MMU), restricting access to a first memory unit by a second core;
a processor including a first core and the second core;
wherein the first core is independent from the second core such that a diagnostic module which is executed by the second core does not influence execution of a nominal control module that is executed by the first core;
at the MMU, restricting access to a second memory unit by a first core;
at the MMU, setting an access to a shared memory unit as a write-only access from the first core;
at the MMU, setting an access to the shared memory unit as a read-only access from the second core;
at the first core in a multi-core processor, sending vehicle control data to a mechanical vehicle component;
at the first core, redirecting the vehicle control data to the shared memory unit using a hook function;
at the second core in the multi-core processor,
cyclically execute a fault function which includes reading the vehicle control data using a timestamp value associated with the vehicle control data and determining a validity of the vehicle control data according to a predetermined cycle, independent from the nominal control module; and
in response to determining the vehicle control data is invalid, operating the mechanical vehicle component in an active fault state.
10. The method of claim 9 , wherein the vehicle control data includes an input/output (IO) value and/or a controller area network (CAN) value sent through a board support package (BSP).
11. The method of claim 9 , further comprising:
at the second core, triggering a watchdog feed function that updates a watchdog status in the shared memory unit; and
in response to determining a fault logic execution error, discontinuing the watchdog feed function, triggering a watchdog timer, and operating the mechanical vehicle component in the active fault state.
12. The method of claim 9 , wherein instructions for sending and redirecting the vehicle control data are stored in a first memory unit and wherein instructions for reading the vehicle control data are stored in a second memory unit.
13. A vehicle driveline system, comprising:
a controller in electronic communication with a mechanical driveline component, the controller comprising:
a processor including a first core and a second core;
wherein the first core is independent from the second core such that a diagnostic module which is executed by the second core does not influence execution of a nominal control module that is executed by the first core;
a memory management unit (MMU) that comprises instructions that when executed cause the controller to:
restrict access to a first memory unit by the second core;
restrict access to a second memory unit by the first core;
set an access to a shared memory unit as a write-only access from the first core; and
set an access to the shared memory unit as a read-only access from the second core;
a multi-core processor including the first core and the second core;
instructions stored in the first memory unit that when executed by the first core, during a first condition, cause the controller to:
redirect driveline control data with an associated timestamp value to the shared memory unit using a hook function;
instructions stored in the second memory unit that when executed by the second core via a diagnostic module, during a second condition, cause the controller to:
cyclically execute a fault function which includes directly reading the mechanical vehicle component operating data that is stored in the shared memory unit to determine data validity according to a predetermined cycle, independent from the nominal control module; and
instructions stored in the second memory unit that when executed by the second core, when the driveline control data is invalidated, cause the controller to:
operate the mechanical driveline component in an active fault state.
14. The vehicle driveline system of claim 13 , wherein the driveline control data includes an input/output (IO) value and/or a controller area network (CAN) value.
15. The vehicle driveline system of claim 13 , further comprising:
instructions stored in the second memory unit that when executed by the second core cause the controller to:
trigger a watchdog feed function that updates a watchdog status in the shared memory unit; and
instructions stored in the second memory unit that when executed by the second core, when a fault logic execution error is determined, cause the controller to:
discontinue the watchdog feed function; and
in response to discontinuing the watchdog feed function, trigger a watchdog timer to initiate operation of the mechanical driveline component in the active fault state.
16. The vehicle driveline system of claim 13 , wherein the driveline component is a multi-speed gearbox, a brake system, an engine, an electric motor, or an adjustable differential.