Skip to main content

I2C

Found under IO on the device's panel list.

I2C Log

Live log of I2C bus activity, with a bus scan and a manual write.

The screen

A scrolling log fills the screen. Each line is one bus event, oldest at the top and newest at the bottom: a byte read back from an address during a scan, a summary of how many devices a scan found, or a byte written to the bus.

Controls

ButtonAction
GreenScan the bus and log every address that answers
YellowSend - opens a hex-entry box and writes the bytes you type
BlueSet I2C address - the label shows the address currently selected
GrayOpen the Logic Analyzer view
PAGEOpen the Logic Analyzer view
CancelThis help page

HOME leaves the screen from here, as it does everywhere else in the menu.

Reading the log

A scan (Green) probes every address from 0 to 126 and prints one line per address that responds, R) A: <addr> R: <byte> in hex, followed by a Poll Found N devices summary line. Addresses reserved by the I2C specification are skipped.

Send (Yellow) opens a text box for entering bytes as hex, separated by spaces, commas or tabs (0A 15 01 55 or 0A,15,01,55), up to 16 bytes. The first byte is the register, the rest is the data written to it; the target address is not part of this entry, it is whatever Blue currently has set. Entering something that is not valid hex, or more than 16 bytes, rejects the input with a message and sends nothing. Every attempt prints a W) line with the address, register and data sent, whether or not anything on the bus actually acknowledged it - the line means the write was sent, not that it succeeded, and nothing on screen tells the two apart. Bus clock speed and whether the internal pull-up resistors are enabled are set from the I2C settings menu, not from this screen.

Blue opens a numeric editor for the target address (0-127); its label updates to show the address currently selected, and that address is used for every Send until it is changed again.

What else shows up here

This log is shared with the rest of the firmware: any I2C write made elsewhere while this screen is open - by a script, the console, or another part of the system - also prints a W) line here. The log only fills in while this screen is on the display; leaving it stops new lines from being recorded.

Logic Analyzer view

Gray or PAGE switch to a Logic Analyzer view of the I2C lines (SDA/SCL), with a title line showing the mode, sample rate and capture state. A labelled Back button on that view returns here.

Power

This screen does not need the FPGA power zone. I2C0 reaches the 20-pin header directly, and the FPGA only sniffs the line for the Logic Analyzer capture, so the bus itself works with the FPGA rail off.

Logic Analyzer

Captures a burst of digital pins over time and draws them as waveforms, so you can see fast signal changes a live view would miss.

The screen

A title line across the top names what this view is doing: the mode it is capturing, the sample rate, and its state - for example "SPI analyzer 1M idle", changing to armed once you start a capture and to done once the capture lands. Once a capture is loaded, the title also adds a position, such as "done 2/4", showing which slice of the buffer the trace below is panned to.

Below the title, each row is one channel: its name on the left, its waveform trace beside it. Which pins appear here, and what they are named, depends on which tool you opened this screen from. Once a capture lands, a red vertical line marks the sample where the trigger fired.

On screens with a long channel list - GPIO in particular - Up and Down move a highlighted row, shown with a gray band behind its name, and whichever channel is highlighted when you arm a capture becomes its trigger source. On screens with only a few channels, there is no highlighted row: Up and Down do nothing here, and the trigger source is always the first channel shown.

The title costs some of the screen's height, so the GPIO capture - the one with the longest channel list, 13 rows - now shows 12 at a time and scrolls with Up and Down to reach the last one. The shorter protocol channel lists still show every row at once.

Controls

ButtonAction
YellowCycle the trigger edge: rising, falling, or none (one-shot)
GreenCycle the capture rate: 10M, 1M, 100k, or 10k samples per second
BlueArm the capture, or stop it while armed
RedForce the trigger while armed
Left / RightPan through a finished capture
Gray / PageBack - returns to the protocol panel this view was opened from
CancelThis help page

Red forces the trigger and keeps its Trig label to say so. Home leaves the app from here the same as it does everywhere else.

Capturing

Blue arms the capture - its label changes from Arm to Stop while armed - and waits for the trigger condition set by Yellow on its trigger source (see The screen above for how that source is chosen): a rising edge, a falling edge, or none, which starts capturing right away without waiting for either. Red forces the trigger early if you do not want to wait for it. Green sets how fast the capture samples, from 10 million samples a second down to 10 thousand; faster rates see less time but finer detail.

Capture depth

The sample buffer behind a capture is a fixed size, so the number of samples it holds depends on how many channels you are watching, not just the rate - fewer channels leaves room for more samples in the same buffer. A faster rate always covers less time, and how much less depends on that channel count.

After a capture

Once a capture lands, the waveform fills the screen with the trigger point placed roughly three-quarters of the way across, so more of what happened before the trigger is visible than after it. Left and Right step the view through the rest of the buffer around it; before a capture finishes, they do nothing.

Shared by several tools

This screen appears inside several different tools - GPIO, I2C, SPI, UART and MDIO all open it with their own Page button, each showing that tool's own pins or bus signals as the channels here. Gray or Page on this screen returns you to whichever one opened it.

The capture itself runs on the RP2350's own PIO hardware, not the FPGA, so opening this screen never needs the FPGA power zone. SPI, UART, GPIO and MDIO route their own header lines through the FPGA and need that zone regardless of this screen; I2C reaches the header directly and needs no FPGA zone at all.

See also: I2C — the console/GUI commands for this panel.