Close

More bring-up work

A project log for BenchPod

An open hardware bench tool that plugs into your CI: sensor sim, CAN, analog I/O, power control, and a Python SDK with pytest integration

edward-viaeneEdward Viaene 06/09/2026 at 14:320 Comments

A few things I've been doing since the last project log:

# Flash → emulate BMP280 → power cycle → assert UART in one test

import re
import pytest
from embeddedci import benchpod as bp

APP_OK  = re.compile(r"APP_OK")
PRESENT = re.compile(r"chip id match=0x58|bmp280_detected=yes")


@pytest.mark.hardware
def test_bmp280_sensor_present(benchpod, pins, firmware):
    """Flash DUT, emulate BMP280 on I2C, power cycle, assert on UART."""

    # 1. Flash 
    result = benchpod.flash(
        file=firmware,
        target="target/stm32f4x.cfg",
        swclk=pins.swclk, swdio=pins.swdio,
        nreset=pins.nreset, target_power=pins.efuse,
        verify=False,
    )
    assert result.ok

    # 2. Emulate BMP280 on I2C 
    #    I2C is open-drain; enable pull-ups so the bus idles high.
    benchpod.enable_pullup(pins.i2c_sda, pins.i2c_scl)
    benchpod.enable_i2c_sensor(
        bp.Sensor.BMP280,
        sda=pins.i2c_sda, scl=pins.i2c_scl,
        address=bp.BMP280_ADDR_PRIMARY,
        temperature_c=22.5, pressure_pa=101000,
    )

    # 3. Power cycle + capture UART 
    cap = benchpod.power_cycle_and_capture(
        rx=pins.uart_rx, tx=pins.uart_tx, efuse=pins.efuse,
        delay=1.5, duration=6.0, until=PRESENT,
    )

    # 4. Assert 
    assert cap.match(APP_OK),   f"no APP_OK banner:\n{cap.text}"
    assert cap.match(PRESENT), f"BMP280 not detected:\n{cap.text}"
    assert benchpod.i2c_sensor_status().get("transactions", 0) > 0

 Here's the test running:

Also, here’s a picture of the ESP32 test pads with the USB data ports. Connected it to a USB cable to see if I could see anything, but as said earlier, it’s most likely a reflow issue. Still, I found it interesting that you can just solder a USB cable to the data ports.

Discussions