pico-serial Line's firmware: a USB front end for its Si3056 + Si3018 DAA,
the modem itself being D-Modem on the host (SPEC-L.md).
- Si3056 bring-up: 48 MHz MCLK from the USB PLL on GPIO21, reset in
serial mode 0, PLL1 N = 125 / M = 256, 9600 Hz, 16-bit mode, line side
powered up; FDT checked.
- si3056.pio: the RP2040 as the serial port's slave; every word through
the portable frame engine (daa_frame.c) from the PIO's interrupt.
Register accesses ride in secondary frames (LSB flag, then FC pin).
- USB: one vendor interface shaped like the SmartUSB56's (alt 1:
isochronous OUT/IN at 1 ms, IN lengths set by the codec's clock, and an
interrupt endpoint for events), vendor requests for rate, hook, flash,
line monitor, register access, status, reset, UF2; 1209:0002.
- Host tests (test_line.c): the frame engine against a model of the
Si3056's serial port, the sample streams, the device logic; mutations
of the frame engine are caught. PROTOCOL.md "Line stick" documents it
for the host's driver; CI builds it.
Not yet run on hardware.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
pico-serial Line, a USB-C phone-line stick shaped like Apple's USB Modem:
a softmodem whose modem is D-Modem-RE on the host. SPEC-L.md covers the
architecture, the DAA (Si3056 for 9600 Hz sampling, so D-Modem's V.90
works), the USB interface, mechanics and compliance.
build_netlist.py and build_schematic.py take --variant line: the Si3056
datasheet's typical application (Figure 17) with a 1.25 A telecom fuse,
parts checked against JLCPCB stock. New footprints for the RJ11 and the
fuse; the symbol cache now keeps every board's symbols. ERC clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
PS_BOARD=w builds for the W board: the RM2 wired as on Pico W, with
BTstack polled from the main loop.
- Classic SPP server ("pico-serial", RFCOMM 1) with credit-based flow
control; LE Nordic UART Service plus the pico-serial control service
(line coding, outputs, inputs, mode, break, flow, credits, info).
- Port ownership (SPEC-W 4.6) in a new portable links layer
(src/core/link.c): USB with its port open, else the first wireless
link, else USB. The wired boards behave as before.
- Over SPP, DCD follows the phone's CONNECT / NO CARRIER.
- Pairing only in a 2-minute window (at power-up with no bonds, PAIR
button, or a new USB request); hold PAIR 10 s to forget. Up to 4 bonds
in flash, below the settings sector. Just Works with LE Secure
Connections / SSP; data and control need an encrypted link.
- BT LED shows advertising, the pairing window or a connection; RD/SD go
to the RM2's GPIOs.
- Host tests for the links layer; CI builds the W image.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
build_pcb.py takes --variant w: the outline, RM2, USB-C, LEDs, pairing
button and screw holes come from the printed hood's script; the antenna
keep-out has no copper on any layer. The front half is placed as on the
hood board. CI now checks both boards. Routing follows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
build_pcb.py builds the board from the schematic: outline, JLC rules,
net classes, placement on both sides, GND/+3V3 fanout, Freerouting 1.9
plus a rip-up finisher, then pours. DRC, ERC and schematic parity are
clean. Adds Gerbers, drill and JLC placement files, renders, docs, and a
CI workflow that checks ERC, DRC and parity.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
Same arrangement as the rest of D-Modem: LICENSING.md, the AGPL text in
firmware/COPYING, and an SPDX-License-Identifier line in every firmware
source file (and the generated pin header, via build_netlist.py). Notes
the third-party parts (Pico SDK, picotool, TinyUSB, rp2040js, the boot
ROM, KiCad symbols). The hardware's licence is not yet decided.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
firmware/: Pico SDK 2.3.1 + TinyUSB 0.21.0 (for CDC SERIAL_STATE).
- portable core (src/core): role detection from chip A STATUS / chip B
INVALID with both chips off (3 x 50 ms samples, 1 s loss), modem-line
mapping (DCE: host DTR -> DCD+DSR, RTS -> CTS; DTE: DTR/RTS through),
hold-off at 3/4 buffer, FLOW_AUTO latch for 3-wire cables, SERIAL_STATE
with one-shot error events, line coding with flagged adjustments,
timed break, settings in flash with CRC
- RP2040 layer: GPIO with the transceivers' inversion, UART with IRQs and
per-byte error flags, UART pins routed to the active chip, flash
settings, watchdog; USB composite: CDC, the pico-serial control vendor
interface (PROTOCOL.md) and Raspberry Pi's reset interface (picotool)
- GPIO numbers generated from the netlist (build_netlist.py now writes
firmware/src/generated/board_pins.h)
- boards: hood (16 MB flash, crystal margin) and a Pico bench rig
Tests: 22 host tests on the core with a fake HAL (sanitizers; checked by
breaking the core on purpose), and an end-to-end test that boots the real
image in rp2040js: enumeration, detection, line mapping, data both ways,
SERIAL_STATE, vendor requests, DTE mode (20 checks). CI workflow runs
both plus builds for both boards. Not yet run on hardware.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8