embeddedci 3.0.1__tar.gz → 3.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {embeddedci-3.0.1 → embeddedci-3.0.2}/CHANGELOG.md +32 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/PKG-INFO +70 -3
- {embeddedci-3.0.1 → embeddedci-3.0.2}/README.md +69 -2
- {embeddedci-3.0.1 → embeddedci-3.0.2}/pyproject.toml +1 -1
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/__init__.py +4 -1
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/capabilities.py +61 -1
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/client.py +150 -26
- embeddedci-3.0.2/src/embeddedci/benchpod/feature_map.json +641 -0
- embeddedci-3.0.2/src/embeddedci/benchpod/feature_map.py +112 -0
- embeddedci-3.0.2/src/embeddedci/benchpod/header.py +142 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/transport/base.py +14 -2
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/transport/serial.py +14 -1
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/transport/tcp.py +16 -1
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/uart.py +48 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/wiring.py +7 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/api_surface.json +25 -3
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_cloud.py +15 -4
- embeddedci-3.0.2/tests/test_feature_map.py +143 -0
- embeddedci-3.0.2/tests/test_header.py +83 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_image_switching.py +50 -0
- embeddedci-3.0.2/tests/test_uart_de.py +102 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_uart_frame.py +17 -2
- embeddedci-3.0.2/tests/test_uart_half_duplex.py +90 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/.gitignore +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/LICENSE +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/docs/aivision.md +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/docs/event-uart-design.md +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/examples/README.md +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/examples/test_bmp280.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/__init__.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/_http.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/aivision/__init__.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/aivision/client.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/aivision/cloud.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/aivision/discovery.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/aivision/errors.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/aivision/pytest_plugin.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/aivision/results.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/can.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/capture.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/ci.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/cli_config.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/cli_login.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/cloud_auth.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/connection.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/constants.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/control_loop.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/decode.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/discovery.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/dsp.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/error_catalog.json +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/errors.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/esp.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/expansion.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/flash.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/gpio.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/i2c.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/i2c_master.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/lease.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/lowlevel.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/main.c +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/motor_emulator.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/power.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/protocol.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/pytest_plugin.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/replay.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/results.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/__init__.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/README.md +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/docs/format.md +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/library.json +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/analog/ntc_10k_divider.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/analog/pressure_4_20ma.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/bme280.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/bmp280.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/ina219.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/mpu6050.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/scd4x.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/sht3x.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/sht4x.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/tmp117.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/spi/lis3dh.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/spi/lis3dh_fifo.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/uart/gps_nmea.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/sensors/uart/mhz19b.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/stimuli/gps_drive.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/stimuli/pressure_drop.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/bundled/stimuli/temperature_ramp_fault.yaml +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/definition.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/emulation.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/library.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/sensors/yaml12.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/server_api.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/spi.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/state.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/transport/__init__.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/transport/cloud.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/transport/tls.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/transport/usblink.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/benchpod/waveforms.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/py.typed +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/src/embeddedci/upload_build.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/conftest.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/README.md +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/conftest.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/e2e_bench.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/e2e_helpers.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_bench_profile.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_digital.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_dut.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_gpio.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_la13_14.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_pod.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_rev3.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_spi.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/e2e/test_e2e_usb.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/examples/test_bmp280_hil.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/examples/test_can_ecu_demo.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/examples/test_can_loopback_hil.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/examples/test_smoke.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_adc_fft_hw.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_adc_oversample.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_adc_range.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_aivision.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_aivision_cloud.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_aivision_live.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_api_surface.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_can.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_capabilities.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_capabilities_scope.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_capture.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_capture_replay_hw.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_ci.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_client_v2.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_cloud.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_connection.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_control_loop.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_control_loop_hw.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_current_out_waveforms.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_dac_limits_fixture.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_dac_path_default.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_dac_path_ranges.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_decode.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_decode_parity.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_docs_coverage.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_dsp.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_esp_flash.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_expansion.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_flash_bridge.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_flash_build.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_generate16.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_gpio.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_http_redirect_auth.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_i2c_decode.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_i2c_master.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_i2c_parity.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_i2c_timed.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_integration.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_la_voltage_fixture.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_lan_tls.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_lease.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_module.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_motor_emulator.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_one_source.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_pin_directions.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_pins_bias.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_protocol.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_refusal_errors.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_replay.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_sensor_library.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_sensors.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_serial_autodetect.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_serial_text_console.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_spi.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_status_diag.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_tcp_transport.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_timed_power.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_timing.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_transport_failures.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_trigger_power.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_uart_capture.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_uart_session.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_unsupported_feature.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_upload_build.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_usb_net.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_waveforms.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_wiring.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/test_wiring_profiles.py +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/testdata/i2c_decode_vectors.json +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/testdata/spi_decode_vectors.json +0 -0
- {embeddedci-3.0.1 → embeddedci-3.0.2}/tests/testdata/uart_decode_vectors.json +0 -0
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog — `embeddedci`
|
|
2
2
|
|
|
3
|
+
## 3.0.2
|
|
4
|
+
|
|
5
|
+
- **The profile on the pod's header:** `BenchPod.board_header()` says which I/O header the pod has
|
|
6
|
+
(`"j1"`, the 2x11 pin headers up to v3-r2, or `"front"`, the 2x13 front connector of digital v3r3
|
|
7
|
+
and later; asked once per connection with the read-only `module` command), and
|
|
8
|
+
`header_map(wiring, header)` writes the profile on it as text: every pin in its place, then what
|
|
9
|
+
to connect to it.
|
|
10
|
+
- **UART frame in the wiring profile:** `Wiring.uart_parity` (`"none"`, `"even"`, `"odd"`) and
|
|
11
|
+
`Wiring.uart_stop_bits` (1, 2), next to `uart_baud`. `open_uart`, `capture_uart` and
|
|
12
|
+
`power_cycle_and_capture` take them from the profile when `parity` / `stop_bits` are omitted
|
|
13
|
+
(8N1 unless the profile says otherwise). The web app and the desktop app set them in Pins.
|
|
14
|
+
- `flash(target="esp32...")` switches the FPGA to the deep-replay image before staging the image,
|
|
15
|
+
so a pod left on the emulation or loop image no longer refuses with `load_bin: deep replay is
|
|
16
|
+
not in the emulation image`.
|
|
17
|
+
- **One-wire UART and boot-mode entry:** `open_uart` and `capture_uart` take `half_duplex=True`
|
|
18
|
+
(rx and tx on one LA pin; the pod only pulls the line low and does not read back its own bytes)
|
|
19
|
+
and `entry=UartEntry(...)`, a reset with TX held low, its release and the first bytes, all timed
|
|
20
|
+
on the pod. Needs gateware v57 (capability `uart_hd`); the entry also needs the reset pin.
|
|
21
|
+
- **RS-485 direction driven by the pod:** `open_uart` and `capture_uart` take `de=` (the LA channel
|
|
22
|
+
on a transceiver's DE + /RE) and `de_active_low=`. The pod switches DE itself, from before the
|
|
23
|
+
first start bit to the end of the last stop bit, so a device that answers within a millisecond
|
|
24
|
+
is heard (DE switched from the host with GPIO calls drops about 25 ms after the request over
|
|
25
|
+
LAN). Needs gateware v58 (feature `uart_de`, features table revision 2).
|
|
26
|
+
|
|
27
|
+
- **Features from the firmware's features table:** the SDK ships benchpod-firmware's
|
|
28
|
+
`features/features.json` (`embeddedci.benchpod.feature_map`) and reads the pod's status with
|
|
29
|
+
`"caps":false`. Firmware after 3.10.10 answers with `features_rev` instead of its `caps` list,
|
|
30
|
+
and `Capabilities` takes the features from the table (`capabilities.features`,
|
|
31
|
+
`capabilities.fpga_image`, `Capabilities.has()`); older firmware sends its list as before.
|
|
32
|
+
`bp.supports()` also takes table names without a flag of their own (`"la_dir"`, `"i2c_master"`,
|
|
33
|
+
`"diag"`, ...). A pod whose firmware has a newer table than the SDK logs one warning to update it.
|
|
34
|
+
|
|
3
35
|
## 3.0.1
|
|
4
36
|
|
|
5
37
|
- **Pull resistors in the wiring profile:** `Wiring.pulls` lists the LA channels whose pull
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: embeddedci
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.2
|
|
4
4
|
Summary: BenchPod SDK and pytest plugin for EmbeddedCI hardware-in-the-loop testing
|
|
5
5
|
Project-URL: Homepage, https://embeddedci.com
|
|
6
6
|
Project-URL: Repository, https://github.com/embeddedci-com/embeddedci-python
|
|
@@ -415,7 +415,18 @@ properties `can_gpio`, `can_trigger`, `can_spi`, `can_profile_power`, `can_calib
|
|
|
415
415
|
`can_current_out`, `can_reset_target` and `can_analog` name the common ones (`can_config` …
|
|
416
416
|
`can_disable` stay the CAN bus commands). A call the pod cannot serve raises
|
|
417
417
|
`UnsupportedFeatureError` (see [Errors](#errors)), before anything is sent when the capabilities
|
|
418
|
-
already say so
|
|
418
|
+
already say so.
|
|
419
|
+
|
|
420
|
+
Where those come from: firmware after 3.10.10 no longer lists its features. The SDK asks for its
|
|
421
|
+
`status` without the list (`"caps":false`) and gets `capabilities.features_rev`, the revision of
|
|
422
|
+
the features table the firmware is built from, plus the running image (`capabilities.fpga_image`)
|
|
423
|
+
and a few hardware facts. The SDK ships that table (`embeddedci.benchpod.feature_map`, a copy of
|
|
424
|
+
benchpod-firmware's `features/features.json`), so this needs no network: `capabilities.features`
|
|
425
|
+
is every feature the table gives the pod, and `bp.supports()` also takes table names without a
|
|
426
|
+
flag of their own (`"la_dir"`, `"i2c_master"`, `"diag"`, `"wiring_store"`, ...). Older firmware
|
|
427
|
+
sends its list as before and gets the same answers. A pod with a higher `features_rev` than the
|
|
428
|
+
SDK knows logs a warning once: update the SDK (`pip install -U embeddedci`) to use those features.
|
|
429
|
+
|
|
419
430
|
|
|
420
431
|
```python
|
|
421
432
|
import pytest
|
|
@@ -599,6 +610,7 @@ print(wiring.describe()) # a pin table: bias resistor and
|
|
|
599
610
|
| `la_mv` | not set | LA I/O-bank voltage in mV (1800 or 3300); `wiring.la_voltage` in volts |
|
|
600
611
|
| `efuse` | not set (pass `efuse=`) | target-power rail: 1 internal 5 V, 2 external |
|
|
601
612
|
| `uart_rx`, `uart_tx`, `uart_baud` | not wired, not wired, `115200` | `rx` samples the DUT's TX; `tx` drives the DUT's RX |
|
|
613
|
+
| `uart_parity`, `uart_stop_bits` | `"none"`, `1` | The UART frame after the 8 data bits (`"even"`, `"odd"`; 2 stop bits). `open_uart`, `capture_uart` and `power_cycle_and_capture` use it when `parity` / `stop_bits` are omitted; anything but 8N1 needs firmware 3.10.8+ |
|
|
602
614
|
| `i2c_sda`, `i2c_scl`, `i2c_addr` | not wired, not wired, not set | the I2C bus (emulated sensors default to it; put I2C on LA1-LA6, which have pull-ups) |
|
|
603
615
|
| `swd_swclk`, `swd_swdio`, `swd_nreset`, `swd_target` | not wired, not wired, `False`, `""` (auto-detect) | flashing |
|
|
604
616
|
| `spi_sclk`, `spi_mosi`, `spi_miso`, `spi_cs` | not wired | decoder channels |
|
|
@@ -682,6 +694,19 @@ A file holds the same JSON object the pod stores:
|
|
|
682
694
|
`bp.signal(name)` returns a GPIO handle for a signal (see [GPIO on the LA pins](#gpio-on-the-la-pins));
|
|
683
695
|
channel arguments accept a role or signal name too (`bp.open_uart(rx="uart_rx", tx=4)`).
|
|
684
696
|
|
|
697
|
+
**The profile on the pod's header.** `bp.board_header()` says which I/O header the pod has:
|
|
698
|
+
`"j1"` (the 2x11 pin headers of the one-piece boards up to v3-r2) or `"front"` (the 2x13 connector
|
|
699
|
+
on the front of digital v3r3 and later), None when the pod cannot tell. `header_map(wiring, header)`
|
|
700
|
+
writes the profile on that header as text: every pin in its physical place, then what to connect
|
|
701
|
+
to each pin on your board (header None writes both headers). The web and desktop apps draw the same
|
|
702
|
+
thing from the Pins pane's Visualize button.
|
|
703
|
+
|
|
704
|
+
```python
|
|
705
|
+
from embeddedci.benchpod import header_map
|
|
706
|
+
|
|
707
|
+
print(header_map(bp.wiring, bp.board_header()))
|
|
708
|
+
```
|
|
709
|
+
|
|
685
710
|
## Power, reset and power monitoring
|
|
686
711
|
|
|
687
712
|
```python
|
|
@@ -1005,12 +1030,53 @@ The LA pins are 1.8 V or 3.3 V only: the pod has no 5 V I/O and no RS-485 port.
|
|
|
1005
1030
|
level shifter, and Modbus RTU on RS-485 an external RS-485 transceiver powered at 3.3 V (or a 5 V
|
|
1006
1031
|
transceiver behind a level shifter), between the pod and the device.
|
|
1007
1032
|
|
|
1033
|
+
**One wire (half duplex).** Some parts talk UART on a single pin, for example a boot ROM's
|
|
1034
|
+
programming pin. `half_duplex=True` runs the session on `rx` alone (`tx` defaults to the same
|
|
1035
|
+
channel): the pod only pulls the line low and lets the pull-up hold it high, so the device answers
|
|
1036
|
+
on the same wire, and the pod does not read back its own bytes. Use LA1 to LA6, whose pull-up the
|
|
1037
|
+
pod turns on for the session, or a pull-up on the board.
|
|
1038
|
+
|
|
1039
|
+
**Boot-mode entry.** A boot ROM that picks its mode from the UART pin at reset needs the pin held
|
|
1040
|
+
low while the chip leaves reset, then a byte soon after. `entry=UartEntry(...)` has the pod run that
|
|
1041
|
+
sequence before the session starts, timed on the pod so no network delay sits in between: TX
|
|
1042
|
+
low (`tx_low`), reset for `reset_ms`, release, wait `hold_ms`, release TX, wait `idle_ms`, then send
|
|
1043
|
+
`data` (at most 32 bytes). Times are whole milliseconds, 0 to 1000:
|
|
1044
|
+
|
|
1045
|
+
```python
|
|
1046
|
+
from embeddedci.benchpod import UartEntry
|
|
1047
|
+
|
|
1048
|
+
entry = UartEntry(reset_ms=5, hold_ms=3, idle_ms=2, data=b"\x00")
|
|
1049
|
+
with bp.open_uart(rx=PIN3, half_duplex=True, entry=entry, encoding="latin-1") as uart:
|
|
1050
|
+
reply = uart.read(timeout=0.5)
|
|
1051
|
+
```
|
|
1052
|
+
|
|
1053
|
+
Both need gateware v57 (`bp.supports("uart_hd")`), and `entry` also the pod's reset pin
|
|
1054
|
+
(`bp.supports("nrst_pin")`); older pods raise `UnsupportedFeatureError` before anything is sent.
|
|
1055
|
+
The USB console has neither.
|
|
1056
|
+
|
|
1008
1057
|
**Binary protocols.** A session decodes what it receives as UTF-8, which suits a console. For bytes
|
|
1009
1058
|
that are not text (a binary protocol's frames), open it with `encoding="latin-1"`: every byte is one
|
|
1010
1059
|
character, so `uart.read().encode("latin-1")` gives the bytes back unchanged, and a `bytes` write is
|
|
1011
1060
|
sent as is. For the adapter wiring and a Modbus RTU test through a transceiver, see
|
|
1012
1061
|
[5 V logic and RS-485](https://www.embeddedci.com/docs/benchpod-targets/5v-rs485).
|
|
1013
1062
|
|
|
1063
|
+
**RS-485 direction (DE).** A half-duplex RS-485 transceiver sends while its DE (tied to /RE) is
|
|
1064
|
+
high and listens while it is low. `de=` names the LA channel wired to DE, and the pod switches it
|
|
1065
|
+
itself: high from before the first start bit of what it sends to the end of the last stop bit, low
|
|
1066
|
+
otherwise. Nothing on the host times it, so a device that answers within a millisecond is still
|
|
1067
|
+
heard (switching DE with `gpio` calls from the host takes tens of milliseconds over the network,
|
|
1068
|
+
and the reply of a fast device is lost meanwhile). `de_active_low=True` inverts it:
|
|
1069
|
+
|
|
1070
|
+
```python
|
|
1071
|
+
with bp.open_uart(rx=PIN5, tx=PIN4, de=PIN9, baud=19200, parity="even",
|
|
1072
|
+
encoding="latin-1") as uart:
|
|
1073
|
+
uart.write(request) # DE goes high and low with the bytes
|
|
1074
|
+
reply = uart.read(timeout=0.2)
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
`de` needs gateware v58 (`bp.supports("uart_de")`); older pods raise `UnsupportedFeatureError`
|
|
1078
|
+
before anything is sent. The USB console has no DE.
|
|
1079
|
+
|
|
1014
1080
|
## LA bias resistors
|
|
1015
1081
|
|
|
1016
1082
|
Eight LA channels carry a fixed, switchable bias resistor. They are referenced to 3V3, so the pod
|
|
@@ -2297,6 +2363,7 @@ few built from other shapes); `to_dict()` goes the other way where a type is sen
|
|
|
2297
2363
|
| `SpiFlashResult` | `spi_flash`, `SpiSession.flash_program` | `jedec_id`, `addr`, `length`, `erased`, `verified`, `seconds` |
|
|
2298
2364
|
| `SpiStreamResult` | `SpiSession.stream` | `sent`, `seconds` |
|
|
2299
2365
|
| `UartCapture` | `capture_uart`, `power_cycle_and_capture` | `text`, `lines`, `matched`, `match(pattern)`, `contains(needle)` (also `needle in capture`) |
|
|
2366
|
+
| `UartEntry` (frozen dataclass) | passed to `open_uart` / `capture_uart` as `entry` | `reset_ms`, `tx_low`, `hold_ms`, `idle_ms`, `data`, `to_request()` |
|
|
2300
2367
|
| `UartSession` (class) | `open_uart` (a context manager) | `write(data)`, `read(*, timeout=0.0)`, `read_until(pattern, *, timeout)`, `expect(pattern, *, timeout)`, `text`, `lines`, `closed`, `error`, `close()` |
|
|
2301
2368
|
| `Sensor` (class) | `sensors.start`, `sensors.sensor` | `instance`, `kind`, `name`, `params`, `info`, `started`, `set(**values)`, `fault(type, *, duration_s=None, **fields)`, `clear_fault()`, `status()`, `regs(start=0, length=None)`, `capture(samples, sample_rate_hz, *, timeout_s, wait_for_traffic)`, `i2c_transactions(...)`, `stop()` |
|
|
2302
2369
|
| `SensorEmulation` (class) | `BenchPod.sensors` | see [Emulated sensors](#emulated-sensors) |
|
|
@@ -2359,7 +2426,7 @@ reported keeps its default (`False`, `0` or `""`), so a feature check is just
|
|
|
2359
2426
|
| Identity | `board`, `firmware_version`, `board_rev` (`"v2"`, `"v3"`, `"unknown"`, or `""`), `la_vccio_mv` (the LA bank voltage the pod reports) |
|
|
2360
2427
|
| ADC | `adc_bits`, `adc_fullscale_mv`, `adc_channels`, `adc_offset_counts`, `adc_affine` (the front-end fit, of the range in use), `adc_low_range` (analog module v3r4+: the low range), `adc_range` (`"normal"`, `"low"`, or `""` before firmware 3.9.5), `adc_range_fullscale` (volts, ±), `adc_max_count`, `counts_to_volts(count)` |
|
|
2361
2428
|
| DAC and replay | `dac`, `dac_dc`, `dac_replay`, `dac_deep_replay`, `dac_control_loop`, `dac_loop_sources` (gateware v29+), `dac_loop_input_map` (v30+), `dac_cotrig` (v27+), `generate16` (firmware 3.9.1+: `generate` in calibrated 16-bit volts), `dac_bits`, `dac_replay_bits`, `dac_replay_max_samples`, `dac_fullscale_mv`, `dac_channels`, `dac_limits` (output limits on the DAC paths) |
|
|
2362
|
-
| Features | `scope`, `analyzer`, `serial`, `tunnel`, `command`, `ota`, `la_pins`, `gpio_read` (direct pin reads, v35+), `capture_trigger` (v35+), `power_profile`, `capture_b64` (faster ADC read-back, used automatically), `nrst_pin` (the dedicated reset pin, rev3), `usb_cc` (rev3), `spi_master` (v45+), `spi_stream`, `uart_frame` (UART parity and stop bits, gateware v56+), `calibrate`, `cal_dmm` (firmware 3.9.4+: `calibrate_dac`, `calibrate_adc_gain`), `current_out`, `can`, `pod_current` (`PowerStatus.pod`), `sensors` (sensor emulation from definitions, with `sensors_format` the format the pod reads), `analog` (`False` on the digital-only board, `None` when not announced) |
|
|
2429
|
+
| Features | `scope`, `analyzer`, `serial`, `tunnel`, `command`, `ota`, `la_pins`, `gpio_read` (direct pin reads, v35+), `capture_trigger` (v35+), `power_profile`, `capture_b64` (faster ADC read-back, used automatically), `nrst_pin` (the dedicated reset pin, rev3), `usb_cc` (rev3), `spi_master` (v45+), `spi_stream`, `uart_frame` (UART parity and stop bits, gateware v56+), `uart_hd` (one-wire UART and boot-mode entry, gateware v57+), `calibrate`, `cal_dmm` (firmware 3.9.4+: `calibrate_dac`, `calibrate_adc_gain`), `current_out`, `can`, `pod_current` (`PowerStatus.pod`), `sensors` (sensor emulation from definitions, with `sensors_format` the format the pod reads), `analog` (`False` on the digital-only board, `None` when not announced) |
|
|
2363
2430
|
| Firmware updates and policies | `flash_kb` (MCU flash in KiB, 0 when not reported), `blob_slots`, `ota_sig`, `sig_policy` (`"audit"`, `"required"`, ...), `sig_keys`, `sig_policy_cmd`, `lan_policy` (`"open"`, `"locked"`, `"off"`), `lan_policy_cmd`, `tunnel_max_tier`, `lease_state` (the pod refuses LAN writes while a cloud job holds it), `cloud_ca`, `cloud_proxy`, `ws_auth_v2` (server only) |
|
|
2364
2431
|
| Boot health | `safe_mode`, `safe_reason`, `last_crash`, `reset_cause`, `boot_warning()` (a one-line warning after safe mode or a crash, else `None`) |
|
|
2365
2432
|
| Source | `raw` (the map it was parsed from) |
|
|
@@ -374,7 +374,18 @@ properties `can_gpio`, `can_trigger`, `can_spi`, `can_profile_power`, `can_calib
|
|
|
374
374
|
`can_current_out`, `can_reset_target` and `can_analog` name the common ones (`can_config` …
|
|
375
375
|
`can_disable` stay the CAN bus commands). A call the pod cannot serve raises
|
|
376
376
|
`UnsupportedFeatureError` (see [Errors](#errors)), before anything is sent when the capabilities
|
|
377
|
-
already say so
|
|
377
|
+
already say so.
|
|
378
|
+
|
|
379
|
+
Where those come from: firmware after 3.10.10 no longer lists its features. The SDK asks for its
|
|
380
|
+
`status` without the list (`"caps":false`) and gets `capabilities.features_rev`, the revision of
|
|
381
|
+
the features table the firmware is built from, plus the running image (`capabilities.fpga_image`)
|
|
382
|
+
and a few hardware facts. The SDK ships that table (`embeddedci.benchpod.feature_map`, a copy of
|
|
383
|
+
benchpod-firmware's `features/features.json`), so this needs no network: `capabilities.features`
|
|
384
|
+
is every feature the table gives the pod, and `bp.supports()` also takes table names without a
|
|
385
|
+
flag of their own (`"la_dir"`, `"i2c_master"`, `"diag"`, `"wiring_store"`, ...). Older firmware
|
|
386
|
+
sends its list as before and gets the same answers. A pod with a higher `features_rev` than the
|
|
387
|
+
SDK knows logs a warning once: update the SDK (`pip install -U embeddedci`) to use those features.
|
|
388
|
+
|
|
378
389
|
|
|
379
390
|
```python
|
|
380
391
|
import pytest
|
|
@@ -558,6 +569,7 @@ print(wiring.describe()) # a pin table: bias resistor and
|
|
|
558
569
|
| `la_mv` | not set | LA I/O-bank voltage in mV (1800 or 3300); `wiring.la_voltage` in volts |
|
|
559
570
|
| `efuse` | not set (pass `efuse=`) | target-power rail: 1 internal 5 V, 2 external |
|
|
560
571
|
| `uart_rx`, `uart_tx`, `uart_baud` | not wired, not wired, `115200` | `rx` samples the DUT's TX; `tx` drives the DUT's RX |
|
|
572
|
+
| `uart_parity`, `uart_stop_bits` | `"none"`, `1` | The UART frame after the 8 data bits (`"even"`, `"odd"`; 2 stop bits). `open_uart`, `capture_uart` and `power_cycle_and_capture` use it when `parity` / `stop_bits` are omitted; anything but 8N1 needs firmware 3.10.8+ |
|
|
561
573
|
| `i2c_sda`, `i2c_scl`, `i2c_addr` | not wired, not wired, not set | the I2C bus (emulated sensors default to it; put I2C on LA1-LA6, which have pull-ups) |
|
|
562
574
|
| `swd_swclk`, `swd_swdio`, `swd_nreset`, `swd_target` | not wired, not wired, `False`, `""` (auto-detect) | flashing |
|
|
563
575
|
| `spi_sclk`, `spi_mosi`, `spi_miso`, `spi_cs` | not wired | decoder channels |
|
|
@@ -641,6 +653,19 @@ A file holds the same JSON object the pod stores:
|
|
|
641
653
|
`bp.signal(name)` returns a GPIO handle for a signal (see [GPIO on the LA pins](#gpio-on-the-la-pins));
|
|
642
654
|
channel arguments accept a role or signal name too (`bp.open_uart(rx="uart_rx", tx=4)`).
|
|
643
655
|
|
|
656
|
+
**The profile on the pod's header.** `bp.board_header()` says which I/O header the pod has:
|
|
657
|
+
`"j1"` (the 2x11 pin headers of the one-piece boards up to v3-r2) or `"front"` (the 2x13 connector
|
|
658
|
+
on the front of digital v3r3 and later), None when the pod cannot tell. `header_map(wiring, header)`
|
|
659
|
+
writes the profile on that header as text: every pin in its physical place, then what to connect
|
|
660
|
+
to each pin on your board (header None writes both headers). The web and desktop apps draw the same
|
|
661
|
+
thing from the Pins pane's Visualize button.
|
|
662
|
+
|
|
663
|
+
```python
|
|
664
|
+
from embeddedci.benchpod import header_map
|
|
665
|
+
|
|
666
|
+
print(header_map(bp.wiring, bp.board_header()))
|
|
667
|
+
```
|
|
668
|
+
|
|
644
669
|
## Power, reset and power monitoring
|
|
645
670
|
|
|
646
671
|
```python
|
|
@@ -964,12 +989,53 @@ The LA pins are 1.8 V or 3.3 V only: the pod has no 5 V I/O and no RS-485 port.
|
|
|
964
989
|
level shifter, and Modbus RTU on RS-485 an external RS-485 transceiver powered at 3.3 V (or a 5 V
|
|
965
990
|
transceiver behind a level shifter), between the pod and the device.
|
|
966
991
|
|
|
992
|
+
**One wire (half duplex).** Some parts talk UART on a single pin, for example a boot ROM's
|
|
993
|
+
programming pin. `half_duplex=True` runs the session on `rx` alone (`tx` defaults to the same
|
|
994
|
+
channel): the pod only pulls the line low and lets the pull-up hold it high, so the device answers
|
|
995
|
+
on the same wire, and the pod does not read back its own bytes. Use LA1 to LA6, whose pull-up the
|
|
996
|
+
pod turns on for the session, or a pull-up on the board.
|
|
997
|
+
|
|
998
|
+
**Boot-mode entry.** A boot ROM that picks its mode from the UART pin at reset needs the pin held
|
|
999
|
+
low while the chip leaves reset, then a byte soon after. `entry=UartEntry(...)` has the pod run that
|
|
1000
|
+
sequence before the session starts, timed on the pod so no network delay sits in between: TX
|
|
1001
|
+
low (`tx_low`), reset for `reset_ms`, release, wait `hold_ms`, release TX, wait `idle_ms`, then send
|
|
1002
|
+
`data` (at most 32 bytes). Times are whole milliseconds, 0 to 1000:
|
|
1003
|
+
|
|
1004
|
+
```python
|
|
1005
|
+
from embeddedci.benchpod import UartEntry
|
|
1006
|
+
|
|
1007
|
+
entry = UartEntry(reset_ms=5, hold_ms=3, idle_ms=2, data=b"\x00")
|
|
1008
|
+
with bp.open_uart(rx=PIN3, half_duplex=True, entry=entry, encoding="latin-1") as uart:
|
|
1009
|
+
reply = uart.read(timeout=0.5)
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
Both need gateware v57 (`bp.supports("uart_hd")`), and `entry` also the pod's reset pin
|
|
1013
|
+
(`bp.supports("nrst_pin")`); older pods raise `UnsupportedFeatureError` before anything is sent.
|
|
1014
|
+
The USB console has neither.
|
|
1015
|
+
|
|
967
1016
|
**Binary protocols.** A session decodes what it receives as UTF-8, which suits a console. For bytes
|
|
968
1017
|
that are not text (a binary protocol's frames), open it with `encoding="latin-1"`: every byte is one
|
|
969
1018
|
character, so `uart.read().encode("latin-1")` gives the bytes back unchanged, and a `bytes` write is
|
|
970
1019
|
sent as is. For the adapter wiring and a Modbus RTU test through a transceiver, see
|
|
971
1020
|
[5 V logic and RS-485](https://www.embeddedci.com/docs/benchpod-targets/5v-rs485).
|
|
972
1021
|
|
|
1022
|
+
**RS-485 direction (DE).** A half-duplex RS-485 transceiver sends while its DE (tied to /RE) is
|
|
1023
|
+
high and listens while it is low. `de=` names the LA channel wired to DE, and the pod switches it
|
|
1024
|
+
itself: high from before the first start bit of what it sends to the end of the last stop bit, low
|
|
1025
|
+
otherwise. Nothing on the host times it, so a device that answers within a millisecond is still
|
|
1026
|
+
heard (switching DE with `gpio` calls from the host takes tens of milliseconds over the network,
|
|
1027
|
+
and the reply of a fast device is lost meanwhile). `de_active_low=True` inverts it:
|
|
1028
|
+
|
|
1029
|
+
```python
|
|
1030
|
+
with bp.open_uart(rx=PIN5, tx=PIN4, de=PIN9, baud=19200, parity="even",
|
|
1031
|
+
encoding="latin-1") as uart:
|
|
1032
|
+
uart.write(request) # DE goes high and low with the bytes
|
|
1033
|
+
reply = uart.read(timeout=0.2)
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
`de` needs gateware v58 (`bp.supports("uart_de")`); older pods raise `UnsupportedFeatureError`
|
|
1037
|
+
before anything is sent. The USB console has no DE.
|
|
1038
|
+
|
|
973
1039
|
## LA bias resistors
|
|
974
1040
|
|
|
975
1041
|
Eight LA channels carry a fixed, switchable bias resistor. They are referenced to 3V3, so the pod
|
|
@@ -2256,6 +2322,7 @@ few built from other shapes); `to_dict()` goes the other way where a type is sen
|
|
|
2256
2322
|
| `SpiFlashResult` | `spi_flash`, `SpiSession.flash_program` | `jedec_id`, `addr`, `length`, `erased`, `verified`, `seconds` |
|
|
2257
2323
|
| `SpiStreamResult` | `SpiSession.stream` | `sent`, `seconds` |
|
|
2258
2324
|
| `UartCapture` | `capture_uart`, `power_cycle_and_capture` | `text`, `lines`, `matched`, `match(pattern)`, `contains(needle)` (also `needle in capture`) |
|
|
2325
|
+
| `UartEntry` (frozen dataclass) | passed to `open_uart` / `capture_uart` as `entry` | `reset_ms`, `tx_low`, `hold_ms`, `idle_ms`, `data`, `to_request()` |
|
|
2259
2326
|
| `UartSession` (class) | `open_uart` (a context manager) | `write(data)`, `read(*, timeout=0.0)`, `read_until(pattern, *, timeout)`, `expect(pattern, *, timeout)`, `text`, `lines`, `closed`, `error`, `close()` |
|
|
2260
2327
|
| `Sensor` (class) | `sensors.start`, `sensors.sensor` | `instance`, `kind`, `name`, `params`, `info`, `started`, `set(**values)`, `fault(type, *, duration_s=None, **fields)`, `clear_fault()`, `status()`, `regs(start=0, length=None)`, `capture(samples, sample_rate_hz, *, timeout_s, wait_for_traffic)`, `i2c_transactions(...)`, `stop()` |
|
|
2261
2328
|
| `SensorEmulation` (class) | `BenchPod.sensors` | see [Emulated sensors](#emulated-sensors) |
|
|
@@ -2318,7 +2385,7 @@ reported keeps its default (`False`, `0` or `""`), so a feature check is just
|
|
|
2318
2385
|
| Identity | `board`, `firmware_version`, `board_rev` (`"v2"`, `"v3"`, `"unknown"`, or `""`), `la_vccio_mv` (the LA bank voltage the pod reports) |
|
|
2319
2386
|
| ADC | `adc_bits`, `adc_fullscale_mv`, `adc_channels`, `adc_offset_counts`, `adc_affine` (the front-end fit, of the range in use), `adc_low_range` (analog module v3r4+: the low range), `adc_range` (`"normal"`, `"low"`, or `""` before firmware 3.9.5), `adc_range_fullscale` (volts, ±), `adc_max_count`, `counts_to_volts(count)` |
|
|
2320
2387
|
| DAC and replay | `dac`, `dac_dc`, `dac_replay`, `dac_deep_replay`, `dac_control_loop`, `dac_loop_sources` (gateware v29+), `dac_loop_input_map` (v30+), `dac_cotrig` (v27+), `generate16` (firmware 3.9.1+: `generate` in calibrated 16-bit volts), `dac_bits`, `dac_replay_bits`, `dac_replay_max_samples`, `dac_fullscale_mv`, `dac_channels`, `dac_limits` (output limits on the DAC paths) |
|
|
2321
|
-
| Features | `scope`, `analyzer`, `serial`, `tunnel`, `command`, `ota`, `la_pins`, `gpio_read` (direct pin reads, v35+), `capture_trigger` (v35+), `power_profile`, `capture_b64` (faster ADC read-back, used automatically), `nrst_pin` (the dedicated reset pin, rev3), `usb_cc` (rev3), `spi_master` (v45+), `spi_stream`, `uart_frame` (UART parity and stop bits, gateware v56+), `calibrate`, `cal_dmm` (firmware 3.9.4+: `calibrate_dac`, `calibrate_adc_gain`), `current_out`, `can`, `pod_current` (`PowerStatus.pod`), `sensors` (sensor emulation from definitions, with `sensors_format` the format the pod reads), `analog` (`False` on the digital-only board, `None` when not announced) |
|
|
2388
|
+
| Features | `scope`, `analyzer`, `serial`, `tunnel`, `command`, `ota`, `la_pins`, `gpio_read` (direct pin reads, v35+), `capture_trigger` (v35+), `power_profile`, `capture_b64` (faster ADC read-back, used automatically), `nrst_pin` (the dedicated reset pin, rev3), `usb_cc` (rev3), `spi_master` (v45+), `spi_stream`, `uart_frame` (UART parity and stop bits, gateware v56+), `uart_hd` (one-wire UART and boot-mode entry, gateware v57+), `calibrate`, `cal_dmm` (firmware 3.9.4+: `calibrate_dac`, `calibrate_adc_gain`), `current_out`, `can`, `pod_current` (`PowerStatus.pod`), `sensors` (sensor emulation from definitions, with `sensors_format` the format the pod reads), `analog` (`False` on the digital-only board, `None` when not announced) |
|
|
2322
2389
|
| Firmware updates and policies | `flash_kb` (MCU flash in KiB, 0 when not reported), `blob_slots`, `ota_sig`, `sig_policy` (`"audit"`, `"required"`, ...), `sig_keys`, `sig_policy_cmd`, `lan_policy` (`"open"`, `"locked"`, `"off"`), `lan_policy_cmd`, `tunnel_max_tier`, `lease_state` (the pod refuses LAN writes while a cloud job holds it), `cloud_ca`, `cloud_proxy`, `ws_auth_v2` (server only) |
|
|
2323
2390
|
| Boot health | `safe_mode`, `safe_reason`, `last_crash`, `reset_cause`, `boot_warning()` (a one-line warning after safe mode or a crash, else `None`) |
|
|
2324
2391
|
| Source | `raw` (the map it was parsed from) |
|
|
@@ -161,17 +161,19 @@ from .state import (
|
|
|
161
161
|
TargetStatus,
|
|
162
162
|
UsbCcStatus,
|
|
163
163
|
)
|
|
164
|
-
from .uart import UartCapture, UartSession
|
|
164
|
+
from .uart import UartCapture, UartEntry, UartSession
|
|
165
165
|
from .spi import SpiFlashInfo, SpiFlashResult, SpiSession, SpiStreamResult
|
|
166
166
|
from . import motor_emulator
|
|
167
167
|
from .motor_emulator import BatteryModel, EmulatorCalibration, MotorEmulator
|
|
168
168
|
from .waveforms import Waveform, WaveformLibrary
|
|
169
169
|
from .wiring import Signal, Wiring
|
|
170
|
+
from .header import header_map
|
|
170
171
|
|
|
171
172
|
__all__ = [
|
|
172
173
|
"BenchPod",
|
|
173
174
|
# wiring profile
|
|
174
175
|
"Wiring",
|
|
176
|
+
"header_map",
|
|
175
177
|
"Signal",
|
|
176
178
|
# LA pin modes + GPIO
|
|
177
179
|
"GpioPin",
|
|
@@ -212,6 +214,7 @@ __all__ = [
|
|
|
212
214
|
# flash + UART
|
|
213
215
|
"FlashResult",
|
|
214
216
|
"UartCapture",
|
|
217
|
+
"UartEntry",
|
|
215
218
|
"UartSession",
|
|
216
219
|
"SpiSession",
|
|
217
220
|
"SpiFlashInfo",
|
|
@@ -23,7 +23,9 @@ from __future__ import annotations
|
|
|
23
23
|
|
|
24
24
|
import re
|
|
25
25
|
from dataclasses import dataclass, field
|
|
26
|
-
from typing import Any, Dict, Mapping, Optional, Tuple
|
|
26
|
+
from typing import Any, Dict, FrozenSet, Mapping, Optional, Tuple
|
|
27
|
+
|
|
28
|
+
from . import feature_map as _feature_map
|
|
27
29
|
|
|
28
30
|
# Built-in nominal front-end calibration per board — the affine fit ``volts = a + b*count``
|
|
29
31
|
# for boards whose analog front-end is inverting (so the naive count/full-scale model would
|
|
@@ -199,8 +201,26 @@ class Capabilities:
|
|
|
199
201
|
#: firmware 3.10.8+): :meth:`BenchPod.open_uart` / :meth:`BenchPod.capture_uart` ``parity``,
|
|
200
202
|
#: ``stop_bits``.
|
|
201
203
|
uart_frame: bool = False
|
|
204
|
+
#: ``uart_hd``: the UART proxy runs on one wire (``half_duplex``) and takes a pod-timed
|
|
205
|
+
#: boot-mode entry (``entry``, with ``nrst_pin``) (gateware v57+): :meth:`BenchPod.open_uart`
|
|
206
|
+
#: / :meth:`BenchPod.capture_uart` ``half_duplex``, ``entry``.
|
|
207
|
+
uart_hd: bool = False
|
|
208
|
+
#: ``uart_de``: the UART proxy drives an RS-485 transceiver's DE (gateware v58+):
|
|
209
|
+
#: :meth:`BenchPod.open_uart` / :meth:`BenchPod.capture_uart` ``de``, ``de_active_low``.
|
|
210
|
+
uart_de: bool = False
|
|
202
211
|
#: The running gateware version (``status`` ``gateware``); 0 when not reported.
|
|
203
212
|
gateware: int = 0
|
|
213
|
+
#: The features-table revision the pod's firmware is built from (``status`` with
|
|
214
|
+
#: ``"caps":false``, firmware after 3.10.10); 0 for older firmware, which sends a ``caps``
|
|
215
|
+
#: list instead.
|
|
216
|
+
features_rev: int = 0
|
|
217
|
+
#: With :attr:`features_rev`: every feature the table gives this pod
|
|
218
|
+
#: (:mod:`~embeddedci.benchpod.feature_map`), including ones with no flag here (``la_dir``,
|
|
219
|
+
#: ``i2c_master``, ``diag``, ...). Empty for older firmware.
|
|
220
|
+
features: FrozenSet[str] = frozenset()
|
|
221
|
+
#: The running gateware image: ``"loop"``, ``"deep"``, ``"emu"``, ``"unknown"``; ``""`` when the
|
|
222
|
+
#: firmware does not say.
|
|
223
|
+
fpga_image: str = ""
|
|
204
224
|
#: The pod can calibrate its own ADC and keeps the result: :meth:`BenchPod.calibrate`.
|
|
205
225
|
calibrate: bool = False
|
|
206
226
|
#: ``calibrate`` also takes the DMM-guided forms (firmware 3.9.4+): this pod's own DAC line
|
|
@@ -364,6 +384,8 @@ class Capabilities:
|
|
|
364
384
|
("spi_master", "spi_master"),
|
|
365
385
|
("spi_stream", "spi_stream"),
|
|
366
386
|
("uart_frame", "uart_frame"),
|
|
387
|
+
("uart_hd", "uart_hd"),
|
|
388
|
+
("uart_de", "uart_de"),
|
|
367
389
|
("calibrate", "calibrate"),
|
|
368
390
|
("cal_dmm", "cal_dmm"),
|
|
369
391
|
("current_out", "current_out"),
|
|
@@ -379,6 +401,13 @@ class Capabilities:
|
|
|
379
401
|
setattr(c, attr, True)
|
|
380
402
|
if "analog" in names:
|
|
381
403
|
c.analog = True
|
|
404
|
+
# Firmware after 3.10.10, asked with "caps":false: no list, the features table instead.
|
|
405
|
+
if (rev := _as_int(status, "features_rev")) is not None and rev > 0:
|
|
406
|
+
c.features_rev = rev
|
|
407
|
+
c.fpga_image = str(status.get("fpga_image", "") or "")
|
|
408
|
+
facts = _feature_map.facts_from_status(status)
|
|
409
|
+
c.features = _feature_map.resolve(rev, c.gateware, facts)
|
|
410
|
+
c._apply_features(facts)
|
|
382
411
|
c.safe_mode = _as_bool(status, "safe_mode") is True
|
|
383
412
|
c.safe_reason = str(status.get("safe_reason", "") or "") if c.safe_mode else ""
|
|
384
413
|
c.last_crash = _crash_text(status.get("last_crash", status.get("crash")))
|
|
@@ -387,6 +416,28 @@ class Capabilities:
|
|
|
387
416
|
c._apply_range(status)
|
|
388
417
|
return c
|
|
389
418
|
|
|
419
|
+
def _apply_features(self, facts: Mapping[str, Any]) -> None:
|
|
420
|
+
"""Set the flags of :attr:`features` (a table name is the flag's name, except the two
|
|
421
|
+
below) and the hardware facts."""
|
|
422
|
+
for name in self.features:
|
|
423
|
+
attr = _TABLE_ALIASES.get(name, name)
|
|
424
|
+
if attr in _BOOL_FIELDS:
|
|
425
|
+
setattr(self, attr, True)
|
|
426
|
+
for fact in ("usb_cc", "pod_current", "nrst_pin"):
|
|
427
|
+
if facts.get(fact) is True:
|
|
428
|
+
setattr(self, fact, True)
|
|
429
|
+
|
|
430
|
+
def has(self, feature: str) -> bool:
|
|
431
|
+
"""Whether the pod has ``feature``: a table name (``"la_dir"``, ``"i2c_master"``, ...)
|
|
432
|
+
when the pod announced :attr:`features_rev`, else the flag of that name (older firmware)."""
|
|
433
|
+
if self.features_rev and feature in _feature_map.feature_map().get("features", {}):
|
|
434
|
+
return feature in self.features
|
|
435
|
+
if feature == "la_dir":
|
|
436
|
+
return self.la_dir
|
|
437
|
+
if feature in ("i2c_master", "spi_modes_1_2"):
|
|
438
|
+
return self.bus_master
|
|
439
|
+
return bool(getattr(self, _TABLE_ALIASES.get(feature, feature), False))
|
|
440
|
+
|
|
390
441
|
def _apply_range(self, src: Mapping[str, Any], prefix: str = "") -> None:
|
|
391
442
|
"""The ADC input range the fit is for (firmware 3.9.5+)."""
|
|
392
443
|
rng = src.get(prefix + "adc_range")
|
|
@@ -520,12 +571,16 @@ class Capabilities:
|
|
|
520
571
|
def la_dir(self) -> bool:
|
|
521
572
|
"""The pod takes pin directions (``la_dir``, firmware 3.10.4+). False when the firmware
|
|
522
573
|
version is unknown."""
|
|
574
|
+
if self.features_rev:
|
|
575
|
+
return "la_dir" in self.features
|
|
523
576
|
v = _version_tuple(self.firmware_version)
|
|
524
577
|
return v is not None and v >= LA_DIR_FIRMWARE
|
|
525
578
|
|
|
526
579
|
@property
|
|
527
580
|
def bus_master(self) -> bool:
|
|
528
581
|
"""The I2C master, SPI modes 1 and 2 and send-and-capture (gateware v55+)."""
|
|
582
|
+
if self.features_rev:
|
|
583
|
+
return "i2c_master" in self.features
|
|
529
584
|
return self.gateware >= BUS_MASTER_GATEWARE
|
|
530
585
|
|
|
531
586
|
@property
|
|
@@ -567,3 +622,8 @@ class Capabilities:
|
|
|
567
622
|
|
|
568
623
|
|
|
569
624
|
_FIELD_NAMES = tuple(f for f in Capabilities().__dict__.keys())
|
|
625
|
+
_BOOL_FIELDS = frozenset(f for f, v in Capabilities().__dict__.items() if isinstance(v, bool))
|
|
626
|
+
|
|
627
|
+
#: Table names whose flag here has another name: the table's ``uart`` and ``la`` are the old
|
|
628
|
+
#: ``serial`` and ``analyzer`` flags.
|
|
629
|
+
_TABLE_ALIASES = {"uart": "serial", "la": "analyzer"}
|