nRF52 UARTE EasyDMA TX — unmodified Zephyr console boots in the sim#340
Merged
Conversation
The Nrf52Uarte model tracked registers but TASKS_STARTTX did nothing — no DMA read of the TXD buffer, no output, no completion events. nRF drivers (nrfx/Zephyr) drive the console exclusively through UARTE EasyDMA, so the console was silent and a polling `poll_out` hung forever waiting on EVENTS_TXSTOPPED. Implement EasyDMA TX via the existing needs_bus_tick/tick_with_bus pattern (the RADIO PACKETPTR precedent): on STARTTX, DMA-read TXD.MAXCNT bytes from TXD.PTR, emit them to stdout + the capture sink, set TXD.AMOUNT, and raise the begin→drain→stop events (TXSTARTED/TXDRDY/ENDTX/TXSTOPPED) the driver polls — nrfx enables the ENDTX_STOPTX short and waits on TXSTOPPED. - Point nrf52840 uart0 at the EasyDMA model (it is a UARTE in silicon; the legacy `"uart"` mapping was the inaccuracy), irq 2. - Wire Bus::attach_uart_tx_sink to capture/echo the UARTE console. - Add an EasyDMA TX regression test. Result: unmodified Zephyr v3.7 hello_world boots and prints "Hello World! nrf52840dk/nrf52840" in the sim, both via the top-level run and `labwired test` (uart_contains assertion).
The UARTE model gained an EasyDMA TX path so an unmodified nrfx/Zephyr console boots under the sim. That changes a peripheral model after the 2026-06-17 silicon capture, which the drift gate flags. Record a dated drift_ack on nrf52840 and the Seeed XIAO (same silicon), and regenerate VALIDATION_STATUS.md. Additive change; the prior register sweep holds and a UARTE TX live diff stays tracked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements nRF52 UARTE EasyDMA TX so unmodified Zephyr (and any nrfx-based) firmware can use the console.
Nrf52Uartepreviously tracked registers butTASKS_STARTTXdid nothing — no DMA read of the TXD buffer, no output, no completion events. Since nrfx/Zephyr drive the console exclusively through UARTE EasyDMA, the console was silent and a pollingpoll_outhung forever onEVENTS_TXSTOPPED.Changes
Nrf52Uartevia the existingneeds_bus_tick/tick_with_buspattern (the RADIO PACKETPTR precedent): on STARTTX, DMA-readTXD.MAXCNTbytes fromTXD.PTR, emit to stdout + capture sink, setTXD.AMOUNT, and raise the begin→drain→stop events (TXSTARTED/TXDRDY/ENDTX/TXSTOPPED). nrfx enables theENDTX_STOPTXshort and waits onTXSTOPPED, so that one must fire.nrf52840uart0 at the EasyDMA model (nrf52840_uart, irq 2) — it is a UARTE in silicon; the legacy"uart"mapping was the inaccuracy.Bus::attach_uart_tx_sinkto capture/echo the UARTE console.Verification
Unmodified Zephyr v3.7.2 LTS
samples/hello_world(built gnuarmemb, no SDK) boots and prints:both via the top-level run and
labwired test --script(uart_containsassertion → exit 0). Full nRF52 + UARTE test suites pass; no regressions.This is Phase 0 of a broader Zephyr integration (west runner + hosted Zephyr build to follow). The SCB
SYSRESETREQwarm-reset that Zephyr'sSystemInitneeds is already onmain; this PR is the remaining console piece.