26 Commits
Author SHA1 Message Date
h3cx 7502b354dc Implemented "full" ignition timing system
This is a first implementation of a "full" timing system, with proper
handling for cases wher the ignition charge time overlaps with the
compression pulse, the spark has a more complex state machine system
with the option to defer charge from the intake pulse to the compression
pulse, and further defferal of the spark release schedule to the ISR
that triggers when the output compare triggers for the charge

Preliminary error counters have been put in place, they still require
handling error conditions that would force a soft shutdown on the
ignition IC. Alongside this the code still needs to be verified so that
all non critical errors (ie missed charge schedules) reset the state
machine and increment a global spark miss counter to avoid having these
errors breaking the state machine as they can easily be recovered from

Cases where the coil would already be charging and an error occurs
require as stated above a full recovery procedure with soft shutdown of
the ignition IC and a clean cycle of the state machine to ensure a full
recovery
2026-09-26 22:11:51 +02:00
h3cx 6f0009cfbb Fixed critical ring buffer underflow bug 2026-06-03 19:11:50 +02:00
h3cx f8b73ea1bc Broken spark implementation 2026-06-03 17:45:48 +02:00
h3cx f23f852b6c Merge branch 'dev' of git.h3cx.dev:Exergie/NeoECU-Firmware into dev 2026-06-03 14:21:29 +02:00
h3cx 16fd59535e Update config for CH3 output compare 2026-06-03 14:19:55 +02:00
Pierre Barbier 1771904eac Added Injection time and a phase macro 2026-06-03 13:52:01 +02:00
Pierre Barbier 31bdeeaf50 delat macros and crank miss filter 2026-06-03 12:02:17 +02:00
h3cx bacb144369 Fixed CRANK and CAM macros 2026-06-03 11:51:50 +02:00
Pierre Barbier e75f21ccf6 things 2026-06-03 11:44:27 +02:00
Pierre Barbier 0909c180e8 added cam double trigger and pragma once in GS 2026-06-03 11:35:21 +02:00
Pierre Barbier cfe15f2612 Added Crank and Cam macros 2026-06-03 11:20:26 +02:00
h3cx e346c67e00 Ring buffer fixes and spark time compute 2026-06-03 11:18:44 +02:00
h3cx 42e64b673c Initial sync implementation
Implemented system sync with crank and cam state and simple error
handling
2026-06-03 10:56:28 +02:00
h3cx 21f0b5a3ea Added ring buffer revert 2026-06-03 08:45:10 +02:00
h3cx 22c732be02 Refactor handler to external
Moved task handler functions to external functions, signatures are in
tasks.h, each function has its own .c file in Src/tasks
2026-06-02 20:11:07 +02:00
h3cx 8d1debd69a Added print on interrupt via task flag 2026-06-02 19:46:05 +02:00
h3cx 0e99868078 Added SEGGER RTT files 2026-06-02 19:45:49 +02:00
Pierre Barbier ce2b76e6c0 added a crank_state to general_state 2026-06-02 18:06:32 +02:00
Pierre Barbier bca9d8816c consistant naming for global_state and implemented 2026-06-02 17:54:15 +02:00
Pierre Barbier eba2bb6f99 Fixed ring_buffer's linking problems 2026-06-02 17:48:52 +02:00
h3cx e7e436affa Updated ring buffer
Updated ring buffer to match use case, one write head with negative read
index
2026-06-02 17:29:46 +02:00
Pierre Barbier e549ed9038 fixed typo 2026-06-02 17:02:52 +02:00
Pierre Barbier 1b3da3bf67 global state implementation + sync_states 2026-06-02 17:00:41 +02:00
h3cx cfc59a9593 Ring buffer impl
Implemented ring buffer with inline push and pop functions
Updated copyrights on main.c and ring_buffer files
2026-06-02 16:52:07 +02:00
h3cx b0152e2751 FreeRTOS config 2026-06-02 15:44:49 +02:00
h3cx 70ae757c33 Initial code generation 2026-06-02 15:07:37 +02:00