Skip to content

Release v1.1.2 — real-hardware UART PHY fixes (validated on ESP32-C3)#13

Merged
w1ne merged 4 commits into
mainfrom
release/1.1.2
Jun 15, 2026
Merged

Release v1.1.2 — real-hardware UART PHY fixes (validated on ESP32-C3)#13
w1ne merged 4 commits into
mainfrom
release/1.1.2

Conversation

@w1ne

@w1ne w1ne commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Hotfix release surfaced by running the stack on real hardware (ESP32-C3, RISC-V).

Fixes

  • fix(dll): device booted in SIO mode and only left it on electrical wake-up detection. A plain UART PHY has detect_wakeup == NULL, so a device on real UART hardware stayed in SIO forever and never serviced M-sequences. The DLL now starts in SDCI when the PHY cannot detect wake-up (the already-established-COM contract of the UART PHY).
  • fix(zephyr): the module defaulted to the POSIX-only virtual PHY (termios), so west build failed for every real board (ARM + RISC-V). The PHY choice now tracks the target (virtual on native_sim/POSIX, UART on hardware) and the virtual PHY can no longer be mis-selected off POSIX.
  • feat(virtual-master): --no-wakeup / --hold-lines so the software Master drives a real established-COM UART link cleanly.

Validation

  • End-to-end Master↔Device on an ESP32-C3 over native USB-Serial-JTAG: PHY send/recv_byte round-trip; startup → PREOPERATE (10/10) → OPERATE (15/15) with checksum-verified Process Data (02 A5 == device's {counter, 0xA5}).
  • 21/21 host unit tests pass; virtual PHY keeps detect_wakeup so native_sim is unchanged.

Regression safety

The DLL change only affects PHYs without detect_wakeup; the Master change leaves the send_wakeup=True path byte-identical.

w1ne added 4 commits June 15, 2026 22:55
…PHY to POSIX

The module defaulted to the virtual PHY, which is implemented with POSIX
termios and therefore failed to compile for any real board (ARM/RISC-V).
Make the PHY choice track the target: virtual on native_sim/POSIX, UART on
real hardware. The virtual PHY now depends on ARCH_POSIX so it cannot be
mis-selected off POSIX. The sample no longer hardcodes a PHY.
The DLL booted in SIO mode and only left it upon electrical wake-up
detection. A plain UART PHY cannot observe the C/Q wake-up pulse
(detect_wakeup == NULL), so a device on real UART hardware stayed in SIO
forever and never serviced M-sequences. Start in SDCI when the PHY has no
wake-up detection (the already-established-COM contract of the UART PHY),
so the device responds to the Master immediately.

Verified end-to-end on an ESP32-C3 with a software Master: startup ->
PREOPERATE -> OPERATE with checksum-verified Process Data exchange. The
virtual PHY implements detect_wakeup, so native_sim behaviour is unchanged
(21/21 host unit tests pass).
run_startup_sequence(send_wakeup=False) skips the 0x55 wake-up byte, which is
a virtual-PHY simulation of the electrical C/Q pulse and would be spurious data
that desynchronises M-sequence framing on a real UART. nucleo_master.py exposes
this as --no-wakeup, plus --hold-lines to hold DTR/RTS low for boards whose
USB-serial resets on control-line changes (e.g. ESP32-C3 native USB-Serial-JTAG).
The wake-up=True path is unchanged, so virtual-PHY tests are unaffected.

Verified on an ESP32-C3: --no-wakeup establishes communication to PREOPERATE on
the first IDLE frame.
@w1ne w1ne merged commit f2c07ef into main Jun 15, 2026
12 checks passed
@w1ne w1ne deleted the release/1.1.2 branch June 15, 2026 21:09
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