Skip to content

Session Handoff [rv3028-rtc]: RV3028 A0h year mark (#103) and 12-hour mode (#104) upstream; all three projects pass the acceptance matrix #53

Closed

Description

@ptr727

Next steps

  1. Follow up on rtc: write the RV3028 time with an A0h year mark, and only 2000-2099 liquidraver/ZephCore#103 (RV3028 A0h year mark, 2000-2099 write range). Read new reviews and comments and answer each. Done when the owner merges or declines, or nothing new has arrived. Under the freeze below, change code only if a reviewer requires it or a hardware test fails. Any change goes to the iteration branch first (fork rtc: write the RV3028 time with an A0h year mark, and refuse years outside 2000-2099 (iteration branch) #50), then is re-squashed into the clean branch rv3028-year-marker and pushed with --force-with-lease, only on Pieter's go.
  2. Follow up on rtc: select 24-hour mode before a time write, and take no time in 12-hour mode liquidraver/ZephCore#104 (12-hour mode). Same procedure; iteration PR fork rtc: select 24-hour mode before a time write, and take no time in 12-hour mode (iteration branch) #52, clean branch rtc-24h-mode.
  3. If rtc: write the RV3028 time with an A0h year mark, and only 2000-2099 liquidraver/ZephCore#103 or rtc: select 24-hour mode before a time write, and take no time in 12-hour mode liquidraver/ZephCore#104 merges: re-check the other for conflicts. Both touch ZephyrRTCDiscover.c, ZephyrRTCDiscover.h and the zephcore,rtc-i2c binding, in different functions. rtc: select 24-hour mode before a time write, and take no time in 12-hour mode liquidraver/ZephCore#104's binding text still carries the old "year 00h before the other time bytes" sentence, which rtc: write the RV3028 time with an A0h year mark, and only 2000-2099 liquidraver/ZephCore#103 rewrites; the second to merge needs that reconciled. After a merge, sync the fork's dev (Pieter clicks Sync fork) and close the matching iteration PR (rtc: write the RV3028 time with an A0h year mark, and refuse years outside 2000-2099 (iteration branch) #50 or rtc: select 24-hour mode before a time write, and take no time in 12-hour mode (iteration branch) #52) unmerged.
  4. Tell the Zephyr and MeshCore sessions about anything that changes the shared position. Their PRs are drivers: rtc: rv3028: reject time accesses cut short by a switchover zephyrproject-rtos/zephyr#121389 and Read and write the RV3028 clock atomically, and reject switchover-garbled transfers 🤖🤖 meshcore-dev/MeshCore#3421.

External blockers

Internal dependencies

State

Parked decision queue

  1. Which RAK4631 has which sensors? Pieter's earlier correction says the ZephCore test board has GNSS, the RTC and one environment sensor, and the MeshCore session's board has two sensors. The Zephyr session says Pieter calls the ZephCore board "the one with 2 sensors". The note in local memory follows the earlier correction until he answers.
  2. The parked direct-write Status branch: keep it parked, or drop it? Pieter accepted the read-modify-write difference, so there is no need to act.

What the last round did

What not to repeat

  • Chaining several flashes in one tool call. One call died mid-sequence and left the board as an unknown USB device until a replug. Do one flash or reboot per call.
  • Endless review rounds on wording. Comment sentences that explained more than the code could back up drew a new finding every pass, over many rounds. State the rule, keep the reasons in the PR text, and close out with "minimal edits, one final recorded pass, leftovers listed as known".
  • A generic devicetree property for the 12-hour fix produced a long tail of findings about descriptors that could be misdeclared in future. If it's touched again, consider RV3028-specific handling, as Zephyr does.
  • Asking Pieter for a physical step in prose. He missed the unplug request, and a 10-minute capture timed out. Put every action request in a dialog.
  • Restarting a shared retry counter to fix a log count broke the documented 13-attempt cap.

New learnings

Activity

  1. added
    handoffA link in the session handoff chain, one open issue per track
    on Oct 7, 2026
  2. ptr727 commented on Oct 7, 2026

    @ptr727
    OwnerAuthor

    Parked decision 1 answered by Pieter: the ZephCore test board has GNSS, the RTC and one environment sensor; the MeshCore session's board has GNSS, the RTC and two sensors. Next session: Pieter will label the boards and cables A to E, so every session uses the same names from then on.

  3. ptr727 commented on Oct 7, 2026

    @ptr727
    OwnerAuthor

    2026-10-07 update: the upstream maintainer asked for much less of both PRs (liquidraver#103 (comment)). On Pieter's direction this was done as new PRs, so the coordinated versions stay as the record:

    Was Now Clean branch Iteration PR
    liquidraver#103 (closed) liquidraver#105: 2000-2099 write range only rtc-year-range 9b68b7e #54 (work/rtc-year-range, from #50's head)
    liquidraver#104 (closed) liquidraver#106: one-time 12_24 clear at boot rv3028-boot-24h 2eb082d #55 (work/rv3028-boot-24h, from #52's head)

    #50 and #52 are closed with pointers; their branches are kept. ZephCore now keeps its existing year-00h write (no A0h mark), and on a refused write the chip keeps its time. Zephyr and MeshCore sessions were told about the divergence; any edit to their PR text needs Pieter's go.

    Verification. Local strict review was recorded on both clean branches. liquidraver#105: harness 14/14 PASS (local test/rtc-accept-year-range, never push), including a cut year-00h write giving no time, and A on the exact build. liquidraver#106: harness 6/6 PASS (local test/rtc-accept-boot-24h), and H plus A on the exact build. The ZephCore board runs 2eb082d, with lpxz/927.875/tx 1 intact; its clock is about 8 s ahead from a test time, which the next sync fixes.

    Known point, kept on Pieter's decision: on liquidraver#106, a failed clear (a 10h read failure or FFh, or a refused write) falls back to the old hours decoding.

    Next: follow liquidraver#105 and liquidraver#106 until they merge or are declined, using the same procedure as before (dirty branch first, then re-squash, then force-with-lease only on Pieter's go). The two PRs now touch different functions, so merge order no longer matters.

  4. ptr727 commented on Oct 7, 2026

    @ptr727
    OwnerAuthor

    2026-10-07 ~10:15 PT, liquidraver#106 review answered. The owner ("this is the size I was after") and Copilot asked for the same fix: run the 12-hour clear only for RTC_FOUND, not for RTC_FOUND_GARBLED. The owner also asked for one ARCHITECTURE.md clause. Both are done in rv3028-boot-24h a4fb95c (force-with-lease from 2eb082d, on Pieter's go), with the dirty branch at #55's 3c10138. The binding and header now say "cleanly identified". Two local review rounds are recorded (round 2: no findings). On hardware, the harness passed 6/6, and the exact a4fb95c build's first boot cleared a real 12-hour chip and restored the correct time. The owner reply and the Copilot thread reply are posted, and the thread is resolved.

    Correction to the comment above: liquidraver#105 and liquidraver#106 DO conflict in ZephyrRTCDiscover.c, because rtc_clear_12h() sits next to liquidraver#105's rtc_time_block() comment edit. They now also both touch the same ARCHITECTURE.md line. The owner asked for liquidraver#106 to be rebased onto dev once liquidraver#105 is in, which is the next step. Do it on #55's dirty branch first, then re-squash, then force-with-lease on Pieter's go.

    Bench note: the RAK's 1200-baud touch failed 13 times in a row this session; it reset the board straight back into the app. One time the bootloader came up as 'Shared', not attached, with Windows holding the drive. A USB replug fixed that, and a double-tap RST brought up a bootloader that WSL attached, so serial DFU worked.

  5. ptr727 commented on Oct 8, 2026

    @ptr727
    OwnerAuthor

    2026-10-08 ~07:45 PT, liquidraver#106 rebased and the owner's second request done. The owner merged liquidraver#105 and asked for two things: a rebase with both conflicts resolved keep-both-sides, and no time taken when the 12-hour clear fails (liquidraver#106 (comment)). The second reverses the earlier "Known point, kept on Pieter's decision".

    • Iteration branch: work/rv3028-boot-24h (rtc: clear the RV3028 12-hour bit at boot (iteration branch) #55) has upstream dev 290b0c2 merged in, then three commits, now at e5623aa.
    • Clean branch: rv3028-boot-24h is at db69172, one commit on 290b0c2, with the same tree as e5623aa. It was force-pushed with lease on Pieter's go. PR rtc: clear the RV3028 12-hour bit at boot liquidraver/ZephCore#106 is MERGEABLE, its description is updated, and the reply is rtc: clear the RV3028 12-hour bit at boot liquidraver/ZephCore#106 (comment).
    • Behaviour: after a clean identification, a failed or FFh read of 10h, a failed clear write or a failed re-read now gives RTC_FOUND_GARBLED, so no time is taken. FLASH +88 B, RAM +0 against dev.
    • Verification:
      • The local test harness passed 10/10 on USB-A (branch test/rtc-accept-boot-24h, which is never pushed). Cases H5-H8 exercise the failure paths through a test-only fault hook in that worktree, left uncommitted.
      • The exact build of b3b4c0a cleared a real 12-hour chip at first boot and restored the correct time. db69172 changes only comments and docs, and its image is byte-identical.
      • Three local review passes ran. Rounds 1 and 2 found wording gaps only, which are fixed. Round 3 had no findings and is recorded.
    • Push slip, corrected: a detached HEAD in the clean worktree meant the first force-push sent b3b4c0a, which has the same code but older wording. A second lease push moved the branch to db69172 within a minute.
    • Other sessions: Zephyr and MeshCore were told. Any edit to their PR text needs Pieter's go.
    • Parked (Pieter, 2026-10-08): DS3231/DS1307 keep their 12-hour flag inside the hours byte, so a chip left in 12-hour mode restores 1-3 PM as 21-23. This predates rtc: clear the RV3028 12-hour bit at boot liquidraver/ZephCore#106 and is outside it.
    • Known gap, stated in the PR: if a clear fails at one boot, a later save writes 24-hour hours to a chip still in 12-hour mode.

    Board: USB-A runs b3b4c0a, an image byte-identical to db69172, with lpxz, 927.875 and tx 1 intact. Its clock is a few seconds behind, which the next sync fixes. The touch into the bootloader failed 6 of 6 times again, and a double-tap RST worked.

    Next:

  6. ptr727 commented on Oct 8, 2026

    @ptr727
    OwnerAuthor

    Lane closed out, 2026-10-08 ~10:30 PT: the RV3028 contribution is finished. This is the final link of track rv3028-rtc, closed with no successor on Pieter's direction.

    Outcome

    Left behind, on purpose

    • The local test-harness branches test/rtc-accept-103, test/rtc-accept-year-range and test/rtc-accept-boot-24h, with their accept* worktrees. They were never pushed. Delete them when they are no longer needed for reference.
    • The fork's dev is at 290b0c2. Upstream dev has moved on, so the next Sync fork brings in c1d2185.
    • USB-A runs an image byte-identical to db69172, with lpxz, 927.875 and tx 1.

    Parked decision queue

    0 issues carry decision on this fork. The one parked item, the DS3231/DS3232 12-hour case, is tracked as a defect in #34 rather than as a decision.

    What not to repeat

    • Force-pushing from a detached HEAD. In the clean worktree, a git checkout HEAD~0 detached HEAD, so two amends never reached the branch, and the first lease push sent stale b3b4c0a. Check git status -sb names the branch before any force-push.
    • Expecting the RAK's 1200-baud touch to work on USB-A. It missed 12 out of 12 this round (13 the round before). Every miss re-runs the build on the board. Ask for a double-tap RST up front.
    • Endless wording rounds. Review rounds 1 and 2 found only text gaps. Stopping after two edit rounds, then one recorded pass with no edits, closed it, as in round 1 of this lane.

    New learnings

    • Proving a text-only follow-up commit without reflashing: rebuild it and cmp its zephyr.bin with the one tested on hardware. Byte-identical carries the hardware result over. Recorded here only.
    • A test-only fault hook (a one-shot global checked before each I2C call) in the local harness worktree exercises failure paths that real hardware cannot produce on demand. It stays uncommitted there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    handoffA link in the session handoff chain, one open issue per track

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions