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>
This commit is contained in:
Bastian de Byl
2026-05-08 18:54:54 -04:00
parent 20339b738b
commit 7de46b8160
+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);
}