From 4c8371bb44d01eabb6901a7b9856f334d8fcf53f Mon Sep 17 00:00:00 2001 From: randogoth Date: Sun, 25 Oct 2026 17:48:20 +0200 Subject: [PATCH] fix: detach the charger's I2C pins from the SPI link's SERCOM --- arduino/libraries/StrixFPGA/src/StrixFPGA.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arduino/libraries/StrixFPGA/src/StrixFPGA.cpp b/arduino/libraries/StrixFPGA/src/StrixFPGA.cpp index 74e8c22..bc6a2a6 100644 --- a/arduino/libraries/StrixFPGA/src/StrixFPGA.cpp +++ b/arduino/libraries/StrixFPGA/src/StrixFPGA.cpp @@ -32,6 +32,12 @@ bool StrixFPGA::begin() { if (!vidor.begin(true)) return false; delay(100); // configuration and PLL lock + // The core configures the battery charger chip over I2C (SERCOM0 on D11/D12) at boot and leaves + // those pins assigned to SERCOM0. Detach them, or the SPI link's signals would also appear on + // the charger's I2C bus. + pinMode(PIN_WIRE_SDA, INPUT); + pinMode(PIN_WIRE_SCL, INPUT); + pinMode(STRIX_SS, OUTPUT); digitalWrite(STRIX_SS, HIGH); strixSpi.begin();