3 Commits

Author SHA1 Message Date
bastian f566427835 Merge pull request 'fix: move SKUDAK telemetry to 0x211 + add -S1 version suffix' (#3) from fix/skudak-448-move-telemetry-to-0x211 into main
Build Firmware / Build stm32-teslacharger (push) Successful in 59s
2026-05-09 17:59:39 -04:00
Bastian de Byl 00f359250c chore: add SKUDAK -S1 version suffix to VERSTR
Build Firmware / Build stm32-teslacharger (pull_request) Successful in 59s
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<N> 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) <noreply@anthropic.com>
2026-05-09 17:57:45 -04:00
Bastian de Byl 7de46b8160 fix: move SKUDAK telemetry frame from 0x210 → 0x211 (avoid bus contention)
Build Firmware / Build stm32-teslacharger (pull_request) Successful in 59s
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) <noreply@anthropic.com>
2026-05-08 18:54:54 -04:00
2 changed files with 10 additions and 7 deletions
+4 -1
View File
@@ -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<N> convention.
#define VERSTR STRINGIFY(4=VER-S1)
/***** enums ******/
+6 -6
View File
@@ -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);
}