You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RTC probe: field checks skip real RTCs, and only the RV3028 has an identity mask #38
rtc_probe() (dev f9d01cf) decides whether the device at a declared address is the RTC it expects. Three of its checks can skip a real RTC, and only one chip type is checked for the bits that would rule a device out. MeshCore's equivalent work, meshcore-dev/MeshCore#3544 (issue meshcore-dev/MeshCore#3546), grounds every rule in the vendor documents. This issue applies the same rules to ZephCore.
What is wrong
Year:bcd_field_ok(yb, 99) skips a chip whose year byte is not valid BCD while its power-loss flag is clear. ZephCore writes y % 100, but a chip that ran MeshCore first can hold a year byte of A0 or above (RTClib writes bin2bcd(year - 2000)), and a real RTC is then never adopted.
RV3028 {80,80,C0,F8,C0,E0,00}: RV-3028-C7 Application Manual Rev. 1.4, §3.2, p. 12.
RX8130CE {80,80,C0,80,C0,E0,00}: Epson ETM50E-10, §13.2.1, Table 12, p. 22.
PCF8563: none.
All seven bytes reading 0xFF (an erased EEPROM), as today.
Seconds, minutes, date and month valid BCD in range, unless the power-loss flag is set. Never check the year or the hours.
A device is ruled out only on two reads that agree; a failed read never rules it out.
#35 refuses an RV3028 only when the same register shows an always-zero bit on both reads. meshcore-dev/MeshCore#3544 accepts two reads that rule the device out for different reasons. Both need two consecutive corrupted reads to misfire; this issue should state which it uses.
Hardware to test on
The second RAK4631 on this host carries two extra I2C modules, including an LPS22HB at 0x5C and a Bosch environment sensor at 0x76. meshcore-dev/MeshCore#3544's read-only test there found the LPS22HB passes the DS3231 rule (its WHO_AM_I value sits where OSF lives), which is a limit of flag-based identity.
Fixed upstream by liquidraver#99, merged 2026-10-05: per-descriptor always-zero masks for DS3231, RV3028 and RX8130CE (none for the PCF8563), identity checks only seconds, minutes, date and month and never the year or hours, all-0xFF is skipped, and a device is ruled out only when two reads each rule it out.
Activity
ptr727 commentedon Oct 10, 2026
Fixed upstream by liquidraver#99, merged 2026-10-05: per-descriptor always-zero masks for DS3231, RV3028 and RX8130CE (none for the PCF8563), identity checks only seconds, minutes, date and month and never the year or hours, all-0xFF is skipped, and a device is ruled out only when two reads each rule it out.