From 7de46b8160daa3c808779b3b9af262eaaf820f01 Mon Sep 17 00:00:00 2001 From: Bastian de Byl Date: Fri, 8 May 2026 18:54:54 -0400 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20move=20SKUDAK=20telemetry=20frame=20?= =?UTF-8?q?from=200x210=20=E2=86=92=200x211=20(avoid=20bus=20contention)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bench capture on the green car showed a non-Polarity module also broadcasting at 0x210 (DLC=8 frame with mostly-zero payload, byte 5 = 0x85 static — likely a Tesla OEM DI module). Even after a clean reflash + 'can c' to clear persisted maps, the rogue 0x210 frame keeps appearing on the wire, racing our intended frame and intermittently corrupting the VCU's read. Confirmed via 'can p' on the OBC that this firmware's CanMap has exactly one 0x210 entry with the 5 expected fields — the conflict is external. Moves all five AddSends to 0x211, an adjacent free ID. The VCU's CHARGER_CAN_ID_OI_OBC_AUX constant is updated to match in a paired stm32-hal-vcu PR. Same 7-byte expanded layout (state/udc/idc/uaux@5/soc), same 100ms cadence — only the arbitration ID changes. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/chargercan.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/chargercan.cpp b/src/chargercan.cpp index eed043d..f289c29 100644 --- a/src/chargercan.cpp +++ b/src/chargercan.cpp @@ -100,7 +100,7 @@ void ChargerCAN::MapMessages(CanMap* can) can->AddSend(Param::idc, 0x109, 24, 16, 1); can->AddSend(Param::opmode, 0x109, 40, 3, 5); //Set charging and connlock at once - /***** SKUDAK VCU telemetry (0x210) — SKUDAK-448 expanded charger telemetry *****/ + /***** SKUDAK VCU telemetry (0x211) — SKUDAK-448 expanded charger telemetry *****/ // Byte 0: state (0=Off, 1=WaitStart, 2=Enable, 3=Activate, 4=Run, 5=Stop) // Bytes 1-2: udc (V, gain=1) // Bytes 3-4: idc (0.1A, gain=10) @@ -108,9 +108,9 @@ void ChargerCAN::MapMessages(CanMap* can) // Byte 6: soc (%, gain=1) // Byte 7: reserved // Consumed by stm32-hal-vcu Core/Src/main.c CHARGER_CAN_ID_OI_OBC_AUX handler. - can->AddSend(Param::state, 0x210, 0, 8, 1); - can->AddSend(Param::udc, 0x210, 8, 16, 1); - can->AddSend(Param::idc, 0x210, 24, 16, 10); - can->AddSend(Param::uaux, 0x210, 40, 8, 10); - can->AddSend(Param::soc, 0x210, 48, 8, 1); + can->AddSend(Param::state, 0x211, 0, 8, 1); + can->AddSend(Param::udc, 0x211, 8, 16, 1); + can->AddSend(Param::idc, 0x211, 24, 16, 10); + can->AddSend(Param::uaux, 0x211, 40, 8, 10); + can->AddSend(Param::soc, 0x211, 48, 8, 1); } From 00f359250c071fb4b3035be2550439eac800817e Mon Sep 17 00:00:00 2001 From: Bastian de Byl Date: Sat, 9 May 2026 17:57:45 -0400 Subject: [PATCH 2/2] chore: add SKUDAK -S1 version suffix to VERSTR The OpenInverter web UI displays the firmware version from the 'version' parameter (entry 2001), which expands VERSTR. Out of the box this reads '4=1.19.R' (upstream version, no Skudak indicator). With this change it reads '4=1.19.R-S1' so we can visually confirm we're running the Skudak fork and not stock OpenInverter firmware. Matches the convention already used in stm32-sine ('-sine-S6' / '-foc-S6') where the -S suffix bumps on each Skudak-side change. Verified: 'strings stm32_charger.bin | grep S1' shows '4=1.19.R-S1' in the built artifact. Co-Authored-By: Claude Opus 4.7 (1M context) --- include/param_prj.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/param_prj.h b/include/param_prj.h index 262d41e..6731ea7 100644 --- a/include/param_prj.h +++ b/include/param_prj.h @@ -124,7 +124,10 @@ #define CAT_CHARGER "Charger" #define CAT_COMM "Communication" -#define VERSTR STRINGIFY(4=VER) +// SKUDAK customization suffix: bump on every Skudak-side change so the OpenInverter +// web UI shows a distinct version (e.g. "4=1.19.R-S1") and we can visually confirm +// the right firmware is flashed. Match the stm32-sine -S convention. +#define VERSTR STRINGIFY(4=VER-S1) /***** enums ******/