Skip to content

i2c, la pins, la dir, SPI modes 1/2; reload stale gateware after a blob install - #54

Merged
wardviaene merged 2 commits into
mainfrom
bus-master
Nov 13, 2026
Merged

wardviaene merged 2 commits into
mainfrom
bus-master

Conversation

@wardviaene

Copy link
Copy Markdown
Member

Two pieces, one commit each.

1. Bus-master commands (gateware v55, firmware branch bus-master-gw)

  • benchpod i2c start|xfer|scan|status|stop: the pod as an I2C master on two LA pins. Pins are numbers or wiring names (default i2c_sda/i2c_scl from the wiring profile), bytes are hex in and hex out, a NACK says which byte.
  • benchpod la pins: every LA pin with function, GPIO state, live level, pull-up, dir and warn (warning lines explain the bits). --json for the raw reply.
  • benchpod la dir [PINS DIR]: mark pins dut_input|dut_output|bidir|unknown (lists, ranges, wiring names, all), or list them.
  • spi-flash --mode takes 0 to 3.
  • Firmware without these commands (unknown cmd) gets one line naming the update it needs; the I2C pull-up and pin-conflict refusals name the CLI commands.
  • Not added: --send (the CLI has no LA capture command) and a general SPI transfer command (only spi-flash exists).

2. Stale gateware after a downgrade
After installing gateware blobs over the network API, when status shows gateware != gateware_embedded, the CLI reloads the running image kind from its new slot (fpga_image with that kind reflashes from the slot even when it runs, per the handler on main) and reports the result, or tells the user to restart the pod. Firmware main 53fd71f (#139) adds the gw2 post-install check on the pod, but 3.10.3 does not have it, so the CLI check stays; it only acts on a mismatch.

Go tests for both (fake pod). Not run on hardware.

🤖 Generated with Claude Code

wardviaene and others added 2 commits November 13, 2026 13:56
- benchpod i2c start/xfer/scan/status/stop: the pod as an I2C master on two
  LA pins. Pins are numbers or wiring names (default i2c_sda/i2c_scl from the
  wiring profile); bytes are hex in and hex out; a NACK says which byte.
- benchpod la pins: every LA pin with its function, GPIO state, live level,
  pull-up, direction and warnings (warning lines explain the warn bits).
- benchpod la dir [PINS DIR]: mark pins dut_input/dut_output/bidir/unknown, or
  list them.
- spi-flash --mode takes 0 to 3.
- A pod without these commands ("unknown cmd") gets one line naming the update
  it needs; the pull-up and I2C pin-conflict refusals name the CLI commands.
- README command reference and examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Going back from a dev build (gateware v55) to 3.10.3 (v54), the pod kept
running v55: its boot check ran before the new blobs were in, and 3.10.3
does not check again after a gw2 install. After installing gateware blobs
over the network API the CLI now reads status; when gateware differs from
gateware_embedded it reloads the running image kind from its new slot
(fpga_image with that kind reflashes from the slot even when it runs),
then reports the version or tells the user to restart the pod.

Firmware main 53fd71f (#139) adds the gw2 post-install check, so newer
firmware fixes most of this itself; the CLI check stays for 3.10.3 and
older and only acts on a mismatch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wardviaene
wardviaene merged commit ed5f99a into main Nov 13, 2026
2 checks passed
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