Skip to content

Fix clock on Heltec T1: Do not misidentify IMU as an RTC - #3301

Open
beala wants to merge 1 commit into
meshcore-dev:devfrom
beala:beala/fix-t1-clock
Open

Fix clock on Heltec T1: Do not misidentify IMU as an RTC#3301
beala wants to merge 1 commit into
meshcore-dev:devfrom
beala:beala/fix-t1-clock

Conversation

@beala

@beala beala commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The T1 has an ICM-42607-P IMU with the same address as a DS3231 RTC. This completely breaks the clock on the T1. Reading the time results in a garbage value, causing all sorts of strange issues. I noticed this because the time never advances, which breaks logging in to repeaters (due to their time-based replay protection).

This simply disables the probe on the I2C line. The DS3231 doesn't have a WHO_AM_I register that could be used to prevent misidentifying it, so this simpler fix is used.

Here is the schematic showing the IMU: https://resource.heltec.cn/download/Mesh_Node_T1/schematic/Mesh_Node_T1_V1.0.pdf
image

Pin 1 is tied to GND, which sets the address to 1101000 or 0x68 (datasheet), same as the DS3231.

image

#define DS3231_ADDRESS 0x68

Testing

Without this fix, the time doesn't update:

alex@thinkpad ~/w/MeshCore> meshcore-cli -S
40C140D1|* clock
Current time : 1999-12-31 18:09:00 (946688940)
40C140D1|* clock sync
Time synced
40C140D1|* clock
Current time : 1999-12-31 18:09:00 (946688940)

With this fix:

40C140D1|* clock
Current time : 2024-05-15 05:22:46 (1715772166)
40C140D1|* clock sync
Time synced
40C140D1|* clock
Current time : 2026-08-25 15:29:19 (1787693359)

Here's the ble companion firmware if anyone wants to try flashing it at https://meshcore.io and testing it.
firmware.zip

The T1 has an ICM-42607-P IMU with the same address as a DS3231 RTC.
This completely breaks the clock on the T1. Reading the time results in
a garbage value, causing all sorts of strange issues. The time never
advances, which breaks logging in to repeaters (due to their time-based
replay protection).

This simply disables the probe on the I2C line. The DS3231 doesn't have
a WHO_AM_I register that could be used to prevent misidentifying it, so
this simpler fix is used.
@beala beala changed the title Fix: Do not misidentify IMU as an RTC on Heltec T1 Fix clock on Heltec T1: Do not misidentify IMU as an RTC Aug 25, 2026
@beala

beala commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

cc @Quency-D who PR'd initial support for this #2520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant