From 0f7e7f5e6eceb2b8287ae3cde6ff01c06b971490 Mon Sep 17 00:00:00 2001 From: TeTeHacko Date: Wed, 2 Dec 2026 13:23:44 +0100 Subject: [PATCH] All nRF52 images: a stuck I2C bus no longer freezes the node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog-cs: Všechny nRF52 obrazy: zaseknutá I2C sběrnice už uzel nezamrazí (Wire vrátí po 100 ms chybu a sběrnici obnoví) Changelog: All nRF52 images: a stuck I2C bus no longer freezes the node (Wire returns an error after 100 ms and resets the bus) Co-Authored-By: Claude Opus 5.5 --- README.md | 9 +++++++++ platformio.ini | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 55d26776..57dc0bbb 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,10 @@ Repeater navíc: až o 18 h napřed. Framework je proto náš fork [tth-pub/Adafruit_nRF52_Arduino](https://git.rfa.cz/tth-pub/Adafruit_nRF52_Arduino) (meshcore-dev + tahle oprava). +* **Zaseknutá I2C sběrnice už uzel nezamrazí.** Když čidlo drží linku dole, + `Wire` dřív čekal navždy. Teď po 100 ms vrátí chybu (ne falešné „zařízení + odpovědělo“) a sběrnici obnoví, takže čidla po uvolnění zase odpovídají bez + restartu. Adafruit PR #873 a naše oprava, ověřeno na XIAO se SCL na GND. * RSSI každého paketu se zaznamená při příjmu; `ContactInfo` se před částečným vyplněním vynuluje. @@ -476,6 +480,11 @@ The repeater also has: the node sent adverts dated up to 18 h ahead. The framework is therefore our fork [tth-pub/Adafruit_nRF52_Arduino](https://git.rfa.cz/tth-pub/Adafruit_nRF52_Arduino) (meshcore-dev + this fix). +* **A stuck I2C bus no longer freezes the node.** With a sensor holding a line + low, `Wire` used to wait forever. Now it returns an error after 100 ms (not + a false "device ACKed") and resets the bus, so the sensors answer again once + it is released, without a reboot. Adafruit PR #873 plus our fix, tested on a + XIAO with SCL tied to GND. * Per-packet RSSI captured at RX; `ContactInfo` zeroed before a partial fill. ### Power, clock, GPS diff --git a/platformio.ini b/platformio.ini index 9bbc5fea..cbb75b83 100644 --- a/platformio.ini +++ b/platformio.ini @@ -116,7 +116,10 @@ platform = https://github.com/pioarduino/platform-espressif32/releases/download/ ; (the BLE-stack patch against rapid connect/disconnect lockup, MeshCore PRs ; #1177, #1295) + 7808206: xPortSysTickHandler no longer adds 2^24 ticks when ; the tick count is ahead of the RTC -- millis(), uptime and the clock of -; mast-rpt-two jumped 16384 s ahead, several times in minutes (2. 12. 2026). +; mast-rpt-two jumped 16384 s ahead, several times in minutes (2. 12. 2026) +; + 45188a6 (adafruit PR #873) and fca5ff3: Wire no longer hangs forever on a +; stuck I2C bus, reports a timeout as an error (not as an ACK) and resets the +; TWIM after it (tested on a XIAO with SCL tied to GND, 2. 12. 2026). ; Public: pub-release builds in tth-pub. The full 40-char SHA is used on purpose: ; PlatformIO's shallow fetch choked on the SHORT SHA, which is the whole reason ; the local build used a full clone + symlink. That symlink hack now lives ONLY @@ -124,7 +127,7 @@ platform = https://github.com/pioarduino/platform-espressif32/releases/download/ ; never leaks into the tracked tree and breaks CI again -- it did: a committed ; `symlink:///home/user/...` gave PackageException on every nRF52 runner build. [nrf52_fw] -pkg = https://git.rfa.cz/tth-pub/Adafruit_nRF52_Arduino.git#780820646f53945446085d47ee3b851c41f9f541 +pkg = https://git.rfa.cz/tth-pub/Adafruit_nRF52_Arduino.git#fca5ff3c715341408eff9d267ee9cb47a470d9fc [nrf52_base] extends = arduino_base