Skip to content

Bus master: I2C master, SPI modes 1/2, la_dir, send-and-capture (SDK + MCP 2.13.13) - #76

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

wardviaene merged 2 commits into
mainfrom
bus-master

Conversation

@wardviaene

@wardviaene wardviaene commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Support for the BenchPod bus-master firmware commands (firmware branch bus-master-gw, gateware v55).

SDK (embeddedci 2.13.13)

  • bp.open_i2c(sda, scl, *, hz=100_000, pullups="pod") returns an I2CMaster: write, read, write_read, read_reg, write_reg, probe, scan, xfer, close, and a context manager. A NACK raises I2CNackError (addr, nack_at); xfer returns the I2CResult without raising.
  • open_spi takes modes 1 and 2, refused ahead on gateware older than v55.
  • capture_la(..., send=I2CSend | SpiSend | GpioSend) with the reply on LaCapture.send_result. An edge trigger without pre_samples gets 64, so the decoder sees the first START.
  • la_dir, pin_directions (from the wiring profile), apply_pin_directions; LaPinState.dir / warn / warnings; DirectionConflictError; Capabilities.gateware.
  • I2C and pull-up refusals name the SDK call; "needs gateware vNN" raises UnsupportedFeatureError.

The SDK does not push pin directions on its own when a wiring profile is set (a setter that talks to the pod, and a driven pin makes la_dir fail); apply_pin_directions() does it on request.

MCP (embeddedci-mcp 2.13.13)

  • i2c_open, i2c_transfer, i2c_scan, i2c_close, la_dir.
  • capture_la takes send; without trigger_la it triggers on SDA or CS falling, or the gpio pin's edge, and opens the I2C or SPI session from the wiring when none is open.
  • set_wiring sends the profile's pin directions (result directions).
  • SPI tools take modes 1 and 2.

Docs in both READMEs and changelogs; host tests against the fake transports.

Not done: HW e2e waits for the firmware release (gateware v55 is not released). No release.

🤖 Generated with Claude Code

wardviaene and others added 2 commits November 13, 2026 14:07
…ci 2.13.13)

bp.open_i2c() returns an I2CMaster (write/read/write_read/read_reg/write_reg/probe/scan/xfer);
a NACK raises I2CNackError with nack_at. open_spi takes modes 1 and 2 on gateware v55+.
capture_la(send=I2CSend|SpiSend|GpioSend) returns LaCapture.send_result and keeps 64
pre-trigger samples with an edge trigger. la_dir, pin_directions, apply_pin_directions;
LaPinState dir/warn; DirectionConflictError; Capabilities.gateware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d (embeddedci-mcp 2.13.13)

capture_la(send=...) runs one I2C, SPI or gpio transaction after the arm and triggers on its
first line when no trigger is given. set_wiring sends the profile's pin directions. SPI tools
take modes 1 and 2. Needs embeddedci 2.13.13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wardviaene wardviaene changed the title Bus master: I2C master, SPI modes 1/2, la_dir, send-and-capture (SDK + MCP 2.13.12) Bus master: I2C master, SPI modes 1/2, la_dir, send-and-capture (SDK + MCP 2.13.13) Nov 13, 2026
@wardviaene
wardviaene merged commit dda1ccd into main Nov 13, 2026
20 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