embeddedci 3.0.4__tar.gz → 3.0.5__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.
Files changed (211) hide show
  1. {embeddedci-3.0.4 → embeddedci-3.0.5}/CHANGELOG.md +24 -0
  2. {embeddedci-3.0.4 → embeddedci-3.0.5}/PKG-INFO +62 -12
  3. {embeddedci-3.0.4 → embeddedci-3.0.5}/README.md +61 -11
  4. {embeddedci-3.0.4 → embeddedci-3.0.5}/pyproject.toml +1 -1
  5. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/capabilities.py +4 -1
  6. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/client.py +107 -11
  7. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/constants.py +3 -0
  8. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/error_catalog.json +33 -1
  9. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/errors.py +11 -0
  10. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/feature_map.json +31 -5
  11. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/gpio.py +6 -2
  12. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/results.py +2 -1
  13. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/state.py +71 -7
  14. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/wiring.py +3 -2
  15. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/api_surface.json +8 -2
  16. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_pod.py +3 -1
  17. embeddedci-3.0.5/tests/test_current_in_shunt.py +138 -0
  18. embeddedci-3.0.5/tests/test_digital_v3r4.py +212 -0
  19. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_refusal_errors.py +9 -0
  20. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_wiring.py +1 -1
  21. {embeddedci-3.0.4 → embeddedci-3.0.5}/.gitignore +0 -0
  22. {embeddedci-3.0.4 → embeddedci-3.0.5}/LICENSE +0 -0
  23. {embeddedci-3.0.4 → embeddedci-3.0.5}/docs/aivision.md +0 -0
  24. {embeddedci-3.0.4 → embeddedci-3.0.5}/docs/event-uart-design.md +0 -0
  25. {embeddedci-3.0.4 → embeddedci-3.0.5}/examples/README.md +0 -0
  26. {embeddedci-3.0.4 → embeddedci-3.0.5}/examples/test_bmp280.py +0 -0
  27. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/__init__.py +0 -0
  28. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/_http.py +0 -0
  29. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/aivision/__init__.py +0 -0
  30. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/aivision/client.py +0 -0
  31. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/aivision/cloud.py +0 -0
  32. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/aivision/discovery.py +0 -0
  33. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/aivision/errors.py +0 -0
  34. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/aivision/pytest_plugin.py +0 -0
  35. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/aivision/results.py +0 -0
  36. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/__init__.py +0 -0
  37. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/can.py +0 -0
  38. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/capture.py +0 -0
  39. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/ci.py +0 -0
  40. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/cli_config.py +0 -0
  41. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/cli_login.py +0 -0
  42. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/cloud_auth.py +0 -0
  43. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/connection.py +0 -0
  44. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/control_loop.py +0 -0
  45. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/decode.py +0 -0
  46. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/discovery.py +0 -0
  47. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/dsp.py +0 -0
  48. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/esp.py +0 -0
  49. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/expansion.py +0 -0
  50. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/feature_map.py +0 -0
  51. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/flash.py +0 -0
  52. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/header.py +0 -0
  53. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/i2c.py +0 -0
  54. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/i2c_master.py +0 -0
  55. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/lease.py +0 -0
  56. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/lowlevel.py +0 -0
  57. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/main.c +0 -0
  58. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/motor_emulator.py +0 -0
  59. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/pod_lease.py +0 -0
  60. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/power.py +0 -0
  61. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/protocol.py +0 -0
  62. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/pytest_plugin.py +0 -0
  63. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/replay.py +0 -0
  64. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/runs/__init__.py +0 -0
  65. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/runs/active.py +0 -0
  66. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/runs/api.py +0 -0
  67. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/runs/provenance.py +0 -0
  68. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/runs/pytest_runs.py +0 -0
  69. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/runs/recorder.py +0 -0
  70. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/runs/schema.py +0 -0
  71. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/runs/upload.py +0 -0
  72. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/__init__.py +0 -0
  73. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/README.md +0 -0
  74. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/docs/format.md +0 -0
  75. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/library.json +0 -0
  76. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/analog/ntc_10k_divider.yaml +0 -0
  77. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/analog/pressure_4_20ma.yaml +0 -0
  78. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/bme280.yaml +0 -0
  79. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/bmp280.yaml +0 -0
  80. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/ina219.yaml +0 -0
  81. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/mpu6050.yaml +0 -0
  82. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/scd4x.yaml +0 -0
  83. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/sht3x.yaml +0 -0
  84. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/sht4x.yaml +0 -0
  85. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/i2c/tmp117.yaml +0 -0
  86. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/spi/lis3dh.yaml +0 -0
  87. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/spi/lis3dh_fifo.yaml +0 -0
  88. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/uart/gps_nmea.yaml +0 -0
  89. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/sensors/uart/mhz19b.yaml +0 -0
  90. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/stimuli/gps_drive.yaml +0 -0
  91. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/stimuli/pressure_drop.yaml +0 -0
  92. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/bundled/stimuli/temperature_ramp_fault.yaml +0 -0
  93. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/definition.py +0 -0
  94. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/emulation.py +0 -0
  95. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/library.py +0 -0
  96. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/sensors/yaml12.py +0 -0
  97. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/server_api.py +0 -0
  98. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/spi.py +0 -0
  99. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/transport/__init__.py +0 -0
  100. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/transport/base.py +0 -0
  101. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/transport/cloud.py +0 -0
  102. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/transport/serial.py +0 -0
  103. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/transport/tcp.py +0 -0
  104. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/transport/tls.py +0 -0
  105. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/transport/usblink.py +0 -0
  106. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/uart.py +0 -0
  107. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/benchpod/waveforms.py +0 -0
  108. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/py.typed +0 -0
  109. {embeddedci-3.0.4 → embeddedci-3.0.5}/src/embeddedci/upload_build.py +0 -0
  110. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/benchpod-ci.yaml +0 -0
  111. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/conftest.py +0 -0
  112. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/README.md +0 -0
  113. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/conftest.py +0 -0
  114. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/e2e_bench.py +0 -0
  115. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/e2e_helpers.py +0 -0
  116. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_bench_profile.py +0 -0
  117. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_cloud.py +0 -0
  118. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_digital.py +0 -0
  119. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_dut.py +0 -0
  120. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_gpio.py +0 -0
  121. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_la13_14.py +0 -0
  122. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_rev3.py +0 -0
  123. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_spi.py +0 -0
  124. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/e2e/test_e2e_usb.py +0 -0
  125. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/examples/test_bmp280_hil.py +0 -0
  126. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/examples/test_can_ecu_demo.py +0 -0
  127. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/examples/test_can_loopback_hil.py +0 -0
  128. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/examples/test_smoke.py +0 -0
  129. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/runs_api_fake.py +0 -0
  130. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/runs_fake.py +0 -0
  131. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_adc_fft_hw.py +0 -0
  132. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_adc_oversample.py +0 -0
  133. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_adc_range.py +0 -0
  134. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_aivision.py +0 -0
  135. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_aivision_cloud.py +0 -0
  136. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_aivision_live.py +0 -0
  137. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_api_surface.py +0 -0
  138. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_can.py +0 -0
  139. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_capabilities.py +0 -0
  140. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_capabilities_scope.py +0 -0
  141. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_capture.py +0 -0
  142. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_capture_replay_hw.py +0 -0
  143. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_ci.py +0 -0
  144. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_client_v2.py +0 -0
  145. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_cloud.py +0 -0
  146. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_connection.py +0 -0
  147. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_control_loop.py +0 -0
  148. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_control_loop_hw.py +0 -0
  149. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_current_out_waveforms.py +0 -0
  150. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_dac_limits_fixture.py +0 -0
  151. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_dac_path_default.py +0 -0
  152. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_dac_path_ranges.py +0 -0
  153. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_decode.py +0 -0
  154. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_decode_parity.py +0 -0
  155. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_docs_coverage.py +0 -0
  156. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_dsp.py +0 -0
  157. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_esp_flash.py +0 -0
  158. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_expansion.py +0 -0
  159. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_feature_map.py +0 -0
  160. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_flash_bridge.py +0 -0
  161. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_flash_build.py +0 -0
  162. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_generate16.py +0 -0
  163. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_gpio.py +0 -0
  164. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_header.py +0 -0
  165. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_http_redirect_auth.py +0 -0
  166. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_i2c_decode.py +0 -0
  167. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_i2c_master.py +0 -0
  168. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_i2c_parity.py +0 -0
  169. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_i2c_timed.py +0 -0
  170. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_image_switching.py +0 -0
  171. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_integration.py +0 -0
  172. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_la_voltage_fixture.py +0 -0
  173. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_lan_tls.py +0 -0
  174. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_lease.py +0 -0
  175. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_log_level.py +0 -0
  176. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_module.py +0 -0
  177. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_motor_emulator.py +0 -0
  178. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_one_source.py +0 -0
  179. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_pin_directions.py +0 -0
  180. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_pins_bias.py +0 -0
  181. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_pod_lease.py +0 -0
  182. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_protocol.py +0 -0
  183. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_pull_direction.py +0 -0
  184. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_replay.py +0 -0
  185. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_runs.py +0 -0
  186. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_runs_api.py +0 -0
  187. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_runs_upload.py +0 -0
  188. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_sensor_library.py +0 -0
  189. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_sensors.py +0 -0
  190. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_serial_autodetect.py +0 -0
  191. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_serial_text_console.py +0 -0
  192. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_spi.py +0 -0
  193. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_status_diag.py +0 -0
  194. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_tcp_transport.py +0 -0
  195. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_timed_power.py +0 -0
  196. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_timing.py +0 -0
  197. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_transport_failures.py +0 -0
  198. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_trigger_power.py +0 -0
  199. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_uart_capture.py +0 -0
  200. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_uart_de.py +0 -0
  201. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_uart_frame.py +0 -0
  202. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_uart_half_duplex.py +0 -0
  203. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_uart_session.py +0 -0
  204. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_unsupported_feature.py +0 -0
  205. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_upload_build.py +0 -0
  206. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_usb_net.py +0 -0
  207. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_waveforms.py +0 -0
  208. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/test_wiring_profiles.py +0 -0
  209. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/testdata/i2c_decode_vectors.json +0 -0
  210. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/testdata/spi_decode_vectors.json +0 -0
  211. {embeddedci-3.0.4 → embeddedci-3.0.5}/tests/testdata/uart_decode_vectors.json +0 -0
@@ -1,5 +1,29 @@
1
1
  # Changelog — `embeddedci`
2
2
 
3
+ ## 3.0.5
4
+
5
+ - `la_pins(la=...)` lists only those channels (firmware after 3.10.12 sends only them; older
6
+ firmware sends all 14 and the SDK keeps the ones asked for). A full listing the pod answers with
7
+ "reply too large" is read in two parts by itself; on older firmware, which cannot, the error
8
+ says to update the pod or ask for fewer channels.
9
+ - **Digital board v3r4:** `PullState.held` says why a pull that was set is off right now
10
+ (`pin21_down`, `dut_off`, `fault`), and `enabled`/`state` are what is on the wire. `la_dir()` and
11
+ `gpio` entries now report both pull directions there, like `la_pins()`.
12
+ - **Digital board v3r4:** `set_la_voltage(5.0)` (and `la_mv: 5000` in a wiring profile) on a pod
13
+ with the `la_5v` feature: the bank stays at 3.3 V, J1 pin 21 (the pull-up rail) goes to 5 V; other
14
+ pods raise `ValueError` before anything is sent. `LaVoltage.pin21` (new `Pin21`: `source`,
15
+ `setting`, `measured`, `state`, `up`, `ok`) reports pin 21 there, `None` elsewhere.
16
+ `Capabilities.vref_out` is the hardware fact. `PullState.strength` reports the resistors the pod
17
+ picked (`10k`, `2.2k`, `both`, `none`); every channel pulls up or down there, and `la_pins()` takes
18
+ the reply's `pull_dirs`. No new parameters: the pod picks the strength from the pin's function.
19
+ Error catalog `BP0028` (5 V did not come up) and `BP0029` (pin 21 is down); features table
20
+ revision 7 (`la_5v`, `la_pull_strength`).
21
+ - **4-20 mA input on analog module v3r5** (firmware 3.10.13+): the sense resistor is 100 Ω (249 Ω up
22
+ to v3r4). `AdcReading.sense_ohms` and `Calibration.sense_ohms` give the resistance the pod
23
+ converts with, and `capture_adc(source="current_in")` uses it for `currents` (249 Ω when the
24
+ firmware does not say). On v3r5 the pod reads `current_in` in the low range unless `range` is
25
+ given; the SDK follows that range, and gives it back when a DAC output is routed after it.
26
+
3
27
  ## 3.0.4
4
28
 
5
29
  - **Read test runs back:** `embeddedci.benchpod.runs.api` lists the runs on embeddedci.com
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: embeddedci
3
- Version: 3.0.4
3
+ Version: 3.0.5
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
@@ -211,6 +211,23 @@ the wiring profile sets no I/O voltage: set la_mv in it (bp.save_wiring(bp.wirin
211
211
  1800 for a 1.8 V board), or pass BenchPod(conn, la_voltage=3.3), or call bp.set_la_voltage(3.3)`
212
212
  (prefixed with the command, as every `FirmwareError` is).
213
213
 
214
+ **5 V I/O (digital board v3r4).** On a pod with the digital board v3r4 (`bp.supports("la_5v")`,
215
+ `bp.capabilities.vref_out`), `bp.set_la_voltage(5.0)` (or `la_mv: 5000` in the profile) keeps the
216
+ bank at 3.3 V and switches J1 pin 21, the pull-up rail, to 5 V; outputs reach 5 V through their
217
+ pull-up (`bp.set_pull(la, "up")`). What that means for the wiring is on the
218
+ [5 V page](https://embeddedci.com/docs/benchpod-targets/5v-rs485#5v-io). `FirmwareError` `BP0028`: 5 V did not come up. Other pods raise
219
+ `ValueError` before anything is sent. On v3r4, `LaVoltage.pin21` reports pin 21 (`None` elsewhere):
220
+
221
+ ```python
222
+ st = bp.get_la_voltage()
223
+ if st.pin21 and st.pin21.state == "high":
224
+ # a DUT signal above the I/O voltage lifts pin 21 through the pulls: select 5 V or remove it
225
+ print(f"pin 21 at {st.pin21.measured} V, set to {st.pin21.setting} V")
226
+ ```
227
+
228
+ `Pin21` has `source` (`"bank"` or `"5v"`), `setting` and `measured` (volts), `state` (`"ok"`,
229
+ `"high"`, `"low"`, `"short"` or `"unknown"`), `up` (high enough for the pulls) and `ok`.
230
+
214
231
  Other constructor arguments: `timeout` (seconds, default 30), `api_key`, `api_base`,
215
232
  `cloud_token`, `cloud_audience`, `cloud_user_token`, `lease`, `lease_wait`, `lease_ttl` (see [Cloud](#cloud-embeddedcidevice-name)),
216
233
  `wiring` and `wiring_source` (see [Wiring profile](#wiring-profile)) and `transport` (inject a
@@ -915,7 +932,7 @@ how finely a transient was resolved. Measured on a v2 pod:
915
932
 
916
933
  An overload is held at the limit for about 2.8 ms, then the eFuse trips (`TargetStatus` `fault`) and
917
934
  retries after ≈ 110 ms. A trip shorter than one sample does not show in a profile. The ADC's `current_in`
918
- input is a 4-20 mA loop terminal (249 Ω), not a way to measure the target's supply.
935
+ input is a 4-20 mA loop terminal (249 Ω, 100 Ω from analog module v3r5), not a way to measure the target's supply.
919
936
 
920
937
  ## Flashing
921
938
 
@@ -1167,9 +1184,9 @@ firmware the call raises `UnsupportedFeatureError` before anything is sent. The
1167
1184
  stop bit of what it receives; a byte with a wrong parity bit is still delivered, and
1168
1185
  `bp.status()["uart_rx_parity_error"]` turns true for the session.
1169
1186
 
1170
- 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. A 5 V UART needs a
1171
- level shifter, and Modbus RTU on RS-485 an external RS-485 transceiver powered at 3.3 V (or a 5 V
1172
- transceiver behind a level shifter), between the pod and the device.
1187
+ No pod has an RS-485 port, and boards before the digital v3r4 have no 5 V I/O: a 5 V UART needs a
1188
+ level shifter there, and Modbus RTU on RS-485 an external RS-485 transceiver powered at 3.3 V (or a
1189
+ 5 V transceiver behind a level shifter). The digital v3r4 has [5 V I/O](https://embeddedci.com/docs/benchpod-targets/5v-rs485#5v-io).
1173
1190
 
1174
1191
  **One wire (half duplex).** Some parts talk UART on a single pin, for example a boot ROM's
1175
1192
  programming pin. `half_duplex=True` runs the session on `rx` alone (`tx` defaults to the same
@@ -1235,6 +1252,17 @@ value. Which channels have one and which way each can pull depends on the board,
1235
1252
  The resistors are referenced to 3V3, so the pod won't engage one while the LA bank is at 1.8 V
1236
1253
  (`PullState.available` is false).
1237
1254
 
1255
+ **Digital board v3r4** (`bp.supports("la_pull_strength")`): every channel, LA1–LA14, pulls up or
1256
+ down with a 10k, a 2.2k or both (about 1.8k). You still name only the direction: the pod picks the
1257
+ strength from the pin's function (2.2k for I2C, one-wire UART, open drain, and pod outputs in 5 V
1258
+ mode; 10k otherwise), and `PullState.strength` says which (`"10k"`, `"2.2k"`, `"both"`, `"none"`
1259
+ when off). The pull-ups go to J1 pin 21, so they work at 1.8, 3.3 and 5 V. While pin 21 is down
1260
+ (shorted or held down) the pod turns every pull off and refuses new ones with `BP0029`; when the
1261
+ pod switches the DUT's power off, the pull-ups stay off until a rail is on again or you set a pull.
1262
+ While the pod holds a pull off like this, `PullState.enabled` and `state` say what is on the wire
1263
+ and `PullState.held` says why (`"pin21_down"`, `"dut_off"` or `"fault"`; `None` otherwise). The pod
1264
+ puts the pull back by itself (firmware after 3.10.12).
1265
+
1238
1266
  ```python
1239
1267
  from embeddedci.benchpod import PIN1, PIN2, PIN7
1240
1268
 
@@ -1303,7 +1331,9 @@ The other owners point to `bp.sensors.stop("<instance>")`, closing the session f
1303
1331
  `bp.open_uart()` or `bp.open_spi()`, or waiting for a flash or step train to finish. The pod's own
1304
1332
  text, with its raw protocol command, stays in `exc.firmware_message`.
1305
1333
 
1306
- `bp.la_pins()` lists every channel's `LaPinState` (`function`, `gpio` mode, `level`, `pull`, `pull_on`, `pull_dirs`),
1334
+ `bp.la_pins()` lists every channel's `LaPinState` (`function`, `gpio` mode, `level`, `pull`, `pull_on`, `pull_dirs`);
1335
+ `bp.la_pins(la=[3, 4])` only those channels. A listing too large for one cloud reply (a long
1336
+ sensor instance name on every channel) is read in two parts by itself (firmware after 3.10.12),
1307
1337
  and `bp.configure_gpio(channels, mode)` is the same group claim as `gpio_pins()` returning those states.
1308
1338
  Captures observe every channel whatever its function. GPIO channels stay GPIO — also across
1309
1339
  disconnects — until released (the pytest `benchpod` fixture releases them at session start and end),
@@ -1688,7 +1718,26 @@ the 5 V DMM line, see below); it serves every source in the low range and shows
1688
1718
  ### Calibrating the ADC offset
1689
1719
 
1690
1720
  `"current_in"` reads the 4-20 mA terminal (J8) across a 249 Ω resistor, so 4 mA is 0.996 V and 20 mA is
1691
- 4.98 V. Each pod's analog input has its own offset, from part tolerances: anywhere from a few mV
1721
+ 4.98 V. From analog module v3r5 (firmware 3.10.13+) the resistor is 100 Ω behind a series diode and
1722
+ a 30 mA current limiter, which lowers what the pod takes from the loop to about 4.3 V at 20 mA:
1723
+
1724
+ | | Module up to v3r4 | Module v3r5 and later |
1725
+ |---|---|---|
1726
+ | 4 mA / 20 mA | 0.996 V / 4.98 V | 0.4 V / 2.0 V |
1727
+ | Voltage taken from the loop at 20 mA | about 5 V | about 4.3 V |
1728
+ | Range `current_in` reads in by default | the range in use | `low` |
1729
+ | Resolution | about 4 µA per count | about 1.7 µA per count (low), 10 µA (normal) |
1730
+ | Measurable current | 0 to about 21 mA in the low range, more in normal | 0 to the limiter, 28.5 to 31.5 mA |
1731
+
1732
+ On v3r5, `adc_read("current_in")`, `analog_path("current_in")` and `capture_adc(source="current_in")`
1733
+ without `range` switch the ADC to the low range; the next route of another source or a DAC output
1734
+ gives the normal range back. A reading that sits near 30 mA whatever the loop does is the limiter.
1735
+ A reversed loop reads 0 (the diode blocks it). `AdcReading.sense_ohms` and
1736
+ `Calibration.sense_ohms` give the resistance the pod converts with (249, or 100 Ω in parallel with
1737
+ the ADC input divider: 99.990 normal, 99.995 low); captures of `current_in` use it for `currents`.
1738
+ Calibration is the same on both: J8 open is 0 V.
1739
+
1740
+ Each pod's analog input has its own offset, from part tolerances: anywhere from a few mV
1692
1741
  to about 50 mV. With J8 open the terminal is at 0 V, so the pod can measure that offset itself and
1693
1742
  keep it in its flash:
1694
1743
 
@@ -2519,7 +2568,7 @@ lease_wait=600.0, lease_ttl=120, wiring=None, lease_purpose=None)`. A context ma
2519
2568
  | GPIO expanders | `expansion(chip="", *, addr=None, sda=None, scl=None, spi=None, load=None, count=None, hz=None, pullups=None, names=None)` (see [GPIO expanders](#gpio-expanders)) |
2520
2569
  | UART | `capture_uart(...)`, `power_cycle_and_capture(...)`, `open_uart(...)` |
2521
2570
  | Bias resistors | `enable_pullup(*las)`, `disable_pullup(*las)`, `enable_pulldown(*las)`, `disable_pulldown(*las)` (LA7/LA8), `set_pull(la, enabled)`, `pull_state(la)`, `enabled_pulls()` |
2522
- | GPIO and pins | `gpio(la, mode="output", *, level=None)`, `gpio_pins(las, mode="output", *, level=None)`, `configure_gpio(las, mode="output", *, level=None)`, `set_gpio(la, level)` (`level` may be a list, one per channel), `read_gpio(la)`, `wait_for_level(la, level, *, timeout, poll=0.005)` (`False` when `timeout` passes first), `pin_levels()`, `la_pins()`, `la_dir(la=None, dir=None)`, `pin_directions(wiring=None)`, `apply_pin_directions(wiring=None)`, `pin_directions_status`, `release_gpio(*las)`, `la_step(la, *, steps, delay, dir_la=None, direction=0)` |
2571
+ | GPIO and pins | `gpio(la, mode="output", *, level=None)`, `gpio_pins(las, mode="output", *, level=None)`, `configure_gpio(las, mode="output", *, level=None)`, `set_gpio(la, level)` (`level` may be a list, one per channel), `read_gpio(la)`, `wait_for_level(la, level, *, timeout, poll=0.005)` (`False` when `timeout` passes first), `pin_levels()`, `la_pins(la=None)`, `la_dir(la=None, dir=None)`, `pin_directions(wiring=None)`, `apply_pin_directions(wiring=None)`, `pin_directions_status`, `release_gpio(*las)`, `la_step(la, *, steps, delay, dir_la=None, direction=0)` |
2523
2572
  | Emulated sensors | `sensors` (a `SensorEmulation`: `start(definition, *, instance=None, pins=None, address=None, baud=None, values=None)`, `define()`, `validate()`, `set()`, `fault()`, `clear_fault()`, `load_stimulus()`, `start_stimulus()`, `stop_stimulus()`, `stop()`, `status()`, `regs()`, `capture()`, `i2c_transactions()`, `library()`); see [Emulated sensors](#emulated-sensors) |
2524
2573
  | Analog | `analog_path(path, *, range=None)`, `adc_read(source="ext", *, range=None)`, `adc_range(range=None)`, `adc_range_test()`, `dac_output(path, *, volts=None)`, `current_out(current)`, `current_out_range()`, `calibrate(source="current_in")`, `calibration()`, `clear_calibration(part=None)`, `calibrate_dac(path, points)`, `calibrate_adc_gain(source, *, range="normal")`, `DMM_SET_POINTS` |
2525
2574
  | Captures | `capture_adc(...)`, `capture_la(..., send=None)`, `capture_correlated(...)`, `decode(source, protocol="i2c", ...)` |
@@ -2536,7 +2585,8 @@ few built from other shapes); `to_dict()` goes the other way where a type is sen
2536
2585
 
2537
2586
  | Type | Returned by / used for | Fields and members |
2538
2587
  |---|---|---|
2539
- | `LaVoltage` | `get_la_voltage`, `set_la_voltage` | `voltage`, `readback`, `is_set` |
2588
+ | `LaVoltage` | `get_la_voltage`, `set_la_voltage` | `voltage`, `readback`, `is_set`, `pin21` (a `Pin21`, digital v3r4 only) |
2589
+ | `Pin21` | `LaVoltage.pin21` | `source`, `setting`, `measured` (V), `state`, `up`, `ok` |
2540
2590
  | `TargetStatus` | `target_status` | `internal`, `external` (each an `EfuseState`), `supported`, `efuse(n)` |
2541
2591
  | `EfuseState` | `TargetStatus.efuse` | `enabled`, `fault`, `valid` |
2542
2592
  | `PowerStatus` | `power_status` | `internal`, `external` (each a `RailPower`), `pod`, `total_current`, `rail(n)` |
@@ -2547,7 +2597,7 @@ few built from other shapes); `to_dict()` goes the other way where a type is sen
2547
2597
  | `MacAddresses` | `mac_addresses` | `eth_mac`, `wifi_mac` (None while not known), `has_wifi`, `source` (`pod`, `server` or empty) |
2548
2598
  | `LanTls` | `lan_tls`, `set_lan_tls_https_only`, `regenerate_lan_tls`, `set_lan_tls_cert` | `port`, `https_only`, `sessions`, `origin` (`generated`/`user`), `key`, `subject`, `san`, `not_after`, `sha256` (what clients pin), `error` (no certificate) |
2549
2599
  | `UsbCcStatus` | `usb_cc` | `orientation`, `advertised`, `advertised_current` (A), `cc1_voltage`, `cc2_voltage` (V) |
2550
- | `PullState` | `pull_state`, `set_pull` | `la`, `enabled`, `direction`, `ohms`, `available` |
2600
+ | `PullState` | `pull_state`, `set_pull` | `la`, `enabled`, `direction`, `ohms`, `available`, `supported`, `strength` (digital v3r4) |
2551
2601
  | `LaPinState` | `la_pins`, `configure_gpio`, `la_dir` | `la`, `function`, `gpio`, `level`, `pull`, `pull_ohms`, `pull_on`, `pull_dirs`, `dir`, `warn`, `warnings`, `in_use` |
2552
2602
  | `GpioPin` (class) | `gpio`, `gpio_pins`, `signal` | `name`, `configure()`, `set(level)`, `high()`, `low()`, `activate()`, `deactivate()`, `is_active()`, `read()`, `wait_for(level, *, timeout)`, `pulse(width, *, count=1)`, `state()`, `release()` |
2553
2603
  | `ExtPin` (class) | `gpio`, `gpio_pins`, `signal` on an EXT pin | a `GpioPin` with `ext`, `pin`; `la` is `None`; `pulse()` raises `ExpansionError` |
@@ -2621,10 +2671,10 @@ reported keeps its default (`False`, `0` or `""`), so a feature check is just
2621
2671
 
2622
2672
  | Group | Fields |
2623
2673
  |---|---|
2624
- | Identity | `board`, `firmware_version`, `board_rev` (`"v2"`, `"v3"`, `"unknown"`, or `""`), `la_vccio_mv` (the LA bank voltage the pod reports) |
2674
+ | Identity | `board`, `firmware_version`, `board_rev` (`"v2"`, `"v3"`, `"v3r2"`, `"v3r4"` (digital v3r4), `"unknown"`, or `""`), `la_vccio_mv` (the LA I/O voltage the pod reports, 5000 in 5 V mode) |
2625
2675
  | 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)` |
2626
2676
  | 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) |
2627
- | 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) |
2677
+ | 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), `vref_out` (digital v3r4: pin 21 switched and measured, 5 V I/O, pulls with a strength on every channel), `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) |
2628
2678
  | 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) |
2629
2679
  | Boot health | `safe_mode`, `safe_reason`, `last_crash`, `reset_cause`, `boot_warning()` (a one-line warning after safe mode or a crash, else `None`) |
2630
2680
  | Source | `raw` (the map it was parsed from) |
@@ -170,6 +170,23 @@ the wiring profile sets no I/O voltage: set la_mv in it (bp.save_wiring(bp.wirin
170
170
  1800 for a 1.8 V board), or pass BenchPod(conn, la_voltage=3.3), or call bp.set_la_voltage(3.3)`
171
171
  (prefixed with the command, as every `FirmwareError` is).
172
172
 
173
+ **5 V I/O (digital board v3r4).** On a pod with the digital board v3r4 (`bp.supports("la_5v")`,
174
+ `bp.capabilities.vref_out`), `bp.set_la_voltage(5.0)` (or `la_mv: 5000` in the profile) keeps the
175
+ bank at 3.3 V and switches J1 pin 21, the pull-up rail, to 5 V; outputs reach 5 V through their
176
+ pull-up (`bp.set_pull(la, "up")`). What that means for the wiring is on the
177
+ [5 V page](https://embeddedci.com/docs/benchpod-targets/5v-rs485#5v-io). `FirmwareError` `BP0028`: 5 V did not come up. Other pods raise
178
+ `ValueError` before anything is sent. On v3r4, `LaVoltage.pin21` reports pin 21 (`None` elsewhere):
179
+
180
+ ```python
181
+ st = bp.get_la_voltage()
182
+ if st.pin21 and st.pin21.state == "high":
183
+ # a DUT signal above the I/O voltage lifts pin 21 through the pulls: select 5 V or remove it
184
+ print(f"pin 21 at {st.pin21.measured} V, set to {st.pin21.setting} V")
185
+ ```
186
+
187
+ `Pin21` has `source` (`"bank"` or `"5v"`), `setting` and `measured` (volts), `state` (`"ok"`,
188
+ `"high"`, `"low"`, `"short"` or `"unknown"`), `up` (high enough for the pulls) and `ok`.
189
+
173
190
  Other constructor arguments: `timeout` (seconds, default 30), `api_key`, `api_base`,
174
191
  `cloud_token`, `cloud_audience`, `cloud_user_token`, `lease`, `lease_wait`, `lease_ttl` (see [Cloud](#cloud-embeddedcidevice-name)),
175
192
  `wiring` and `wiring_source` (see [Wiring profile](#wiring-profile)) and `transport` (inject a
@@ -874,7 +891,7 @@ how finely a transient was resolved. Measured on a v2 pod:
874
891
 
875
892
  An overload is held at the limit for about 2.8 ms, then the eFuse trips (`TargetStatus` `fault`) and
876
893
  retries after ≈ 110 ms. A trip shorter than one sample does not show in a profile. The ADC's `current_in`
877
- input is a 4-20 mA loop terminal (249 Ω), not a way to measure the target's supply.
894
+ input is a 4-20 mA loop terminal (249 Ω, 100 Ω from analog module v3r5), not a way to measure the target's supply.
878
895
 
879
896
  ## Flashing
880
897
 
@@ -1126,9 +1143,9 @@ firmware the call raises `UnsupportedFeatureError` before anything is sent. The
1126
1143
  stop bit of what it receives; a byte with a wrong parity bit is still delivered, and
1127
1144
  `bp.status()["uart_rx_parity_error"]` turns true for the session.
1128
1145
 
1129
- 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. A 5 V UART needs a
1130
- level shifter, and Modbus RTU on RS-485 an external RS-485 transceiver powered at 3.3 V (or a 5 V
1131
- transceiver behind a level shifter), between the pod and the device.
1146
+ No pod has an RS-485 port, and boards before the digital v3r4 have no 5 V I/O: a 5 V UART needs a
1147
+ level shifter there, and Modbus RTU on RS-485 an external RS-485 transceiver powered at 3.3 V (or a
1148
+ 5 V transceiver behind a level shifter). The digital v3r4 has [5 V I/O](https://embeddedci.com/docs/benchpod-targets/5v-rs485#5v-io).
1132
1149
 
1133
1150
  **One wire (half duplex).** Some parts talk UART on a single pin, for example a boot ROM's
1134
1151
  programming pin. `half_duplex=True` runs the session on `rx` alone (`tx` defaults to the same
@@ -1194,6 +1211,17 @@ value. Which channels have one and which way each can pull depends on the board,
1194
1211
  The resistors are referenced to 3V3, so the pod won't engage one while the LA bank is at 1.8 V
1195
1212
  (`PullState.available` is false).
1196
1213
 
1214
+ **Digital board v3r4** (`bp.supports("la_pull_strength")`): every channel, LA1–LA14, pulls up or
1215
+ down with a 10k, a 2.2k or both (about 1.8k). You still name only the direction: the pod picks the
1216
+ strength from the pin's function (2.2k for I2C, one-wire UART, open drain, and pod outputs in 5 V
1217
+ mode; 10k otherwise), and `PullState.strength` says which (`"10k"`, `"2.2k"`, `"both"`, `"none"`
1218
+ when off). The pull-ups go to J1 pin 21, so they work at 1.8, 3.3 and 5 V. While pin 21 is down
1219
+ (shorted or held down) the pod turns every pull off and refuses new ones with `BP0029`; when the
1220
+ pod switches the DUT's power off, the pull-ups stay off until a rail is on again or you set a pull.
1221
+ While the pod holds a pull off like this, `PullState.enabled` and `state` say what is on the wire
1222
+ and `PullState.held` says why (`"pin21_down"`, `"dut_off"` or `"fault"`; `None` otherwise). The pod
1223
+ puts the pull back by itself (firmware after 3.10.12).
1224
+
1197
1225
  ```python
1198
1226
  from embeddedci.benchpod import PIN1, PIN2, PIN7
1199
1227
 
@@ -1262,7 +1290,9 @@ The other owners point to `bp.sensors.stop("<instance>")`, closing the session f
1262
1290
  `bp.open_uart()` or `bp.open_spi()`, or waiting for a flash or step train to finish. The pod's own
1263
1291
  text, with its raw protocol command, stays in `exc.firmware_message`.
1264
1292
 
1265
- `bp.la_pins()` lists every channel's `LaPinState` (`function`, `gpio` mode, `level`, `pull`, `pull_on`, `pull_dirs`),
1293
+ `bp.la_pins()` lists every channel's `LaPinState` (`function`, `gpio` mode, `level`, `pull`, `pull_on`, `pull_dirs`);
1294
+ `bp.la_pins(la=[3, 4])` only those channels. A listing too large for one cloud reply (a long
1295
+ sensor instance name on every channel) is read in two parts by itself (firmware after 3.10.12),
1266
1296
  and `bp.configure_gpio(channels, mode)` is the same group claim as `gpio_pins()` returning those states.
1267
1297
  Captures observe every channel whatever its function. GPIO channels stay GPIO — also across
1268
1298
  disconnects — until released (the pytest `benchpod` fixture releases them at session start and end),
@@ -1647,7 +1677,26 @@ the 5 V DMM line, see below); it serves every source in the low range and shows
1647
1677
  ### Calibrating the ADC offset
1648
1678
 
1649
1679
  `"current_in"` reads the 4-20 mA terminal (J8) across a 249 Ω resistor, so 4 mA is 0.996 V and 20 mA is
1650
- 4.98 V. Each pod's analog input has its own offset, from part tolerances: anywhere from a few mV
1680
+ 4.98 V. From analog module v3r5 (firmware 3.10.13+) the resistor is 100 Ω behind a series diode and
1681
+ a 30 mA current limiter, which lowers what the pod takes from the loop to about 4.3 V at 20 mA:
1682
+
1683
+ | | Module up to v3r4 | Module v3r5 and later |
1684
+ |---|---|---|
1685
+ | 4 mA / 20 mA | 0.996 V / 4.98 V | 0.4 V / 2.0 V |
1686
+ | Voltage taken from the loop at 20 mA | about 5 V | about 4.3 V |
1687
+ | Range `current_in` reads in by default | the range in use | `low` |
1688
+ | Resolution | about 4 µA per count | about 1.7 µA per count (low), 10 µA (normal) |
1689
+ | Measurable current | 0 to about 21 mA in the low range, more in normal | 0 to the limiter, 28.5 to 31.5 mA |
1690
+
1691
+ On v3r5, `adc_read("current_in")`, `analog_path("current_in")` and `capture_adc(source="current_in")`
1692
+ without `range` switch the ADC to the low range; the next route of another source or a DAC output
1693
+ gives the normal range back. A reading that sits near 30 mA whatever the loop does is the limiter.
1694
+ A reversed loop reads 0 (the diode blocks it). `AdcReading.sense_ohms` and
1695
+ `Calibration.sense_ohms` give the resistance the pod converts with (249, or 100 Ω in parallel with
1696
+ the ADC input divider: 99.990 normal, 99.995 low); captures of `current_in` use it for `currents`.
1697
+ Calibration is the same on both: J8 open is 0 V.
1698
+
1699
+ Each pod's analog input has its own offset, from part tolerances: anywhere from a few mV
1651
1700
  to about 50 mV. With J8 open the terminal is at 0 V, so the pod can measure that offset itself and
1652
1701
  keep it in its flash:
1653
1702
 
@@ -2478,7 +2527,7 @@ lease_wait=600.0, lease_ttl=120, wiring=None, lease_purpose=None)`. A context ma
2478
2527
  | GPIO expanders | `expansion(chip="", *, addr=None, sda=None, scl=None, spi=None, load=None, count=None, hz=None, pullups=None, names=None)` (see [GPIO expanders](#gpio-expanders)) |
2479
2528
  | UART | `capture_uart(...)`, `power_cycle_and_capture(...)`, `open_uart(...)` |
2480
2529
  | Bias resistors | `enable_pullup(*las)`, `disable_pullup(*las)`, `enable_pulldown(*las)`, `disable_pulldown(*las)` (LA7/LA8), `set_pull(la, enabled)`, `pull_state(la)`, `enabled_pulls()` |
2481
- | GPIO and pins | `gpio(la, mode="output", *, level=None)`, `gpio_pins(las, mode="output", *, level=None)`, `configure_gpio(las, mode="output", *, level=None)`, `set_gpio(la, level)` (`level` may be a list, one per channel), `read_gpio(la)`, `wait_for_level(la, level, *, timeout, poll=0.005)` (`False` when `timeout` passes first), `pin_levels()`, `la_pins()`, `la_dir(la=None, dir=None)`, `pin_directions(wiring=None)`, `apply_pin_directions(wiring=None)`, `pin_directions_status`, `release_gpio(*las)`, `la_step(la, *, steps, delay, dir_la=None, direction=0)` |
2530
+ | GPIO and pins | `gpio(la, mode="output", *, level=None)`, `gpio_pins(las, mode="output", *, level=None)`, `configure_gpio(las, mode="output", *, level=None)`, `set_gpio(la, level)` (`level` may be a list, one per channel), `read_gpio(la)`, `wait_for_level(la, level, *, timeout, poll=0.005)` (`False` when `timeout` passes first), `pin_levels()`, `la_pins(la=None)`, `la_dir(la=None, dir=None)`, `pin_directions(wiring=None)`, `apply_pin_directions(wiring=None)`, `pin_directions_status`, `release_gpio(*las)`, `la_step(la, *, steps, delay, dir_la=None, direction=0)` |
2482
2531
  | Emulated sensors | `sensors` (a `SensorEmulation`: `start(definition, *, instance=None, pins=None, address=None, baud=None, values=None)`, `define()`, `validate()`, `set()`, `fault()`, `clear_fault()`, `load_stimulus()`, `start_stimulus()`, `stop_stimulus()`, `stop()`, `status()`, `regs()`, `capture()`, `i2c_transactions()`, `library()`); see [Emulated sensors](#emulated-sensors) |
2483
2532
  | Analog | `analog_path(path, *, range=None)`, `adc_read(source="ext", *, range=None)`, `adc_range(range=None)`, `adc_range_test()`, `dac_output(path, *, volts=None)`, `current_out(current)`, `current_out_range()`, `calibrate(source="current_in")`, `calibration()`, `clear_calibration(part=None)`, `calibrate_dac(path, points)`, `calibrate_adc_gain(source, *, range="normal")`, `DMM_SET_POINTS` |
2484
2533
  | Captures | `capture_adc(...)`, `capture_la(..., send=None)`, `capture_correlated(...)`, `decode(source, protocol="i2c", ...)` |
@@ -2495,7 +2544,8 @@ few built from other shapes); `to_dict()` goes the other way where a type is sen
2495
2544
 
2496
2545
  | Type | Returned by / used for | Fields and members |
2497
2546
  |---|---|---|
2498
- | `LaVoltage` | `get_la_voltage`, `set_la_voltage` | `voltage`, `readback`, `is_set` |
2547
+ | `LaVoltage` | `get_la_voltage`, `set_la_voltage` | `voltage`, `readback`, `is_set`, `pin21` (a `Pin21`, digital v3r4 only) |
2548
+ | `Pin21` | `LaVoltage.pin21` | `source`, `setting`, `measured` (V), `state`, `up`, `ok` |
2499
2549
  | `TargetStatus` | `target_status` | `internal`, `external` (each an `EfuseState`), `supported`, `efuse(n)` |
2500
2550
  | `EfuseState` | `TargetStatus.efuse` | `enabled`, `fault`, `valid` |
2501
2551
  | `PowerStatus` | `power_status` | `internal`, `external` (each a `RailPower`), `pod`, `total_current`, `rail(n)` |
@@ -2506,7 +2556,7 @@ few built from other shapes); `to_dict()` goes the other way where a type is sen
2506
2556
  | `MacAddresses` | `mac_addresses` | `eth_mac`, `wifi_mac` (None while not known), `has_wifi`, `source` (`pod`, `server` or empty) |
2507
2557
  | `LanTls` | `lan_tls`, `set_lan_tls_https_only`, `regenerate_lan_tls`, `set_lan_tls_cert` | `port`, `https_only`, `sessions`, `origin` (`generated`/`user`), `key`, `subject`, `san`, `not_after`, `sha256` (what clients pin), `error` (no certificate) |
2508
2558
  | `UsbCcStatus` | `usb_cc` | `orientation`, `advertised`, `advertised_current` (A), `cc1_voltage`, `cc2_voltage` (V) |
2509
- | `PullState` | `pull_state`, `set_pull` | `la`, `enabled`, `direction`, `ohms`, `available` |
2559
+ | `PullState` | `pull_state`, `set_pull` | `la`, `enabled`, `direction`, `ohms`, `available`, `supported`, `strength` (digital v3r4) |
2510
2560
  | `LaPinState` | `la_pins`, `configure_gpio`, `la_dir` | `la`, `function`, `gpio`, `level`, `pull`, `pull_ohms`, `pull_on`, `pull_dirs`, `dir`, `warn`, `warnings`, `in_use` |
2511
2561
  | `GpioPin` (class) | `gpio`, `gpio_pins`, `signal` | `name`, `configure()`, `set(level)`, `high()`, `low()`, `activate()`, `deactivate()`, `is_active()`, `read()`, `wait_for(level, *, timeout)`, `pulse(width, *, count=1)`, `state()`, `release()` |
2512
2562
  | `ExtPin` (class) | `gpio`, `gpio_pins`, `signal` on an EXT pin | a `GpioPin` with `ext`, `pin`; `la` is `None`; `pulse()` raises `ExpansionError` |
@@ -2580,10 +2630,10 @@ reported keeps its default (`False`, `0` or `""`), so a feature check is just
2580
2630
 
2581
2631
  | Group | Fields |
2582
2632
  |---|---|
2583
- | Identity | `board`, `firmware_version`, `board_rev` (`"v2"`, `"v3"`, `"unknown"`, or `""`), `la_vccio_mv` (the LA bank voltage the pod reports) |
2633
+ | Identity | `board`, `firmware_version`, `board_rev` (`"v2"`, `"v3"`, `"v3r2"`, `"v3r4"` (digital v3r4), `"unknown"`, or `""`), `la_vccio_mv` (the LA I/O voltage the pod reports, 5000 in 5 V mode) |
2584
2634
  | 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)` |
2585
2635
  | 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) |
2586
- | 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) |
2636
+ | 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), `vref_out` (digital v3r4: pin 21 switched and measured, 5 V I/O, pulls with a strength on every channel), `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) |
2587
2637
  | 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) |
2588
2638
  | Boot health | `safe_mode`, `safe_reason`, `last_crash`, `reset_cause`, `boot_warning()` (a one-line warning after safe mode or a crash, else `None`) |
2589
2639
  | Source | `raw` (the map it was parsed from) |
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "embeddedci"
7
- version = "3.0.4"
7
+ version = "3.0.5"
8
8
  description = "BenchPod SDK and pytest plugin for EmbeddedCI hardware-in-the-loop testing"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -191,6 +191,9 @@ class Capabilities:
191
191
  nrst_pin: bool = False
192
192
  #: USB-C CC-line monitoring (rev3 pods): :meth:`BenchPod.usb_cc`.
193
193
  usb_cc: bool = False
194
+ #: J1 pin 21 is switched and measured, and the pod has 5 V I/O (digital board v3r4+): the
195
+ #: hardware fact ``vref_out``. :attr:`LaVoltage.pin21` reports pin 21.
196
+ vref_out: bool = False
194
197
  #: SPI master on four LA pins and SPI NOR flash programming (gateware >= v45):
195
198
  #: :meth:`BenchPod.open_spi`, :meth:`BenchPod.spi_flash`.
196
199
  spi_master: bool = False
@@ -423,7 +426,7 @@ class Capabilities:
423
426
  attr = _TABLE_ALIASES.get(name, name)
424
427
  if attr in _BOOL_FIELDS:
425
428
  setattr(self, attr, True)
426
- for fact in ("usb_cc", "pod_current", "nrst_pin"):
429
+ for fact in ("usb_cc", "pod_current", "nrst_pin", "vref_out"):
427
430
  if facts.get(fact) is True:
428
431
  setattr(self, fact, True)
429
432
 
@@ -72,6 +72,7 @@ from .constants import (
72
72
  LA_STEP_MAX_STEPS,
73
73
  LA_STEP_MIN_DELAY_US,
74
74
  LA_VOLTAGES,
75
+ LA_VOLTAGE_5V,
75
76
  PULL_DIRECTIONS,
76
77
  PULL_TABLE,
77
78
  REPLAY_MAPPINGS,
@@ -162,7 +163,9 @@ _CURRENT_OUT = "current_out"
162
163
  # The DAC output each named analog path drives (cal1/cal2 loop the 5 V / 12 V DAC back to the ADC).
163
164
  _ANALOG_PATH_DAC = {"dac_3v3": "3v3", "dac_5v": "5v", "dac_12v": "12v", "cal1": "5v", "cal2": "12v",
164
165
  "current_out": _CURRENT_OUT}
165
- #: The sense resistor on the 4-20 mA input (J8): ``current_in`` reads the voltage across it.
166
+ #: The sense resistor on the 4-20 mA input (J8): ``current_in`` reads the voltage across it. 249 Ω
167
+ #: on analog modules up to v3r4 and the default for firmware that does not say; from v3r5 the pod
168
+ #: reports its own value (``Calibration.sense_ohms``, 100 Ω with the ADC divider in parallel).
166
169
  _CURRENT_IN_SENSE_OHMS = 249.0
167
170
  #: The live zero a stopped current waveform returns to (microamps).
168
171
  _CURRENT_OUT_ZERO_UA = 4000
@@ -364,6 +367,9 @@ class BenchPod:
364
367
  # The DAC output this connection last routed (dac_output, analog_path, a routed waveform),
365
368
  # so a waveform played with route=False and no dac_path scales for it. None = unknown.
366
369
  self._routed_dac_path: Optional[str] = None
370
+ #: The pod put the ADC in the low range by itself, routing ``current_in`` on analog module
371
+ #: v3r5 (firmware 3.10.13+); the next DAC route puts it back, without saying so.
372
+ self._adc_low_auto = False
367
373
  self._api_base = api_base or os.environ.get(API_BASE_ENV)
368
374
  self._api_key = api_key or os.environ.get(API_KEY_ENV)
369
375
  self._cloud_user_token = cloud_user_token
@@ -1097,7 +1103,13 @@ class BenchPod:
1097
1103
  # -- LA I/O-bank voltage ------------------------------------------------
1098
1104
 
1099
1105
  def set_la_voltage(self, voltage: float) -> LaVoltage:
1100
- """Select the LA I/O-bank voltage: ``1.8`` or ``3.3`` volts (1.8 V needs a rev3 pod).
1106
+ """Select the LA I/O-bank voltage: ``1.8`` or ``3.3`` volts (1.8 V needs a rev3 pod), or
1107
+ ``5.0`` on a pod with the digital board v3r4 (feature ``la_5v``).
1108
+
1109
+ At 5.0 the bank stays at 3.3 V, J1 pin 21 (the pull-up rail) goes to 5 V, and outputs
1110
+ reach 5 V through their pull-ups: https://embeddedci.com/docs/benchpod-targets/5v-rs485#5v-io
1111
+ Raises :class:`~embeddedci.benchpod.errors.FirmwareError` ``BP0028`` when 5 V did not come
1112
+ up. :attr:`LaVoltage.pin21` reports pin 21.
1101
1113
 
1102
1114
  Match it to the DUT's I/O voltage. It must be set before any LA-bank operation (flashing,
1103
1115
  the UART proxy, LA capture, pull resistors, sensor emulation), or the pod refuses them with
@@ -1106,11 +1118,25 @@ class BenchPod:
1106
1118
  profile, and firmware 3.10.10+ takes it from the profile on the first LA operation.
1107
1119
  """
1108
1120
  v = float(voltage)
1121
+ if abs(v - LA_VOLTAGE_5V) < 0.05:
1122
+ # 5 V I/O (digital v3r4): the pod keeps the bank at 3.3 V and moves pin 21 to 5 V.
1123
+ if not self.supports("la_5v"):
1124
+ raise ValueError("5 V I/O needs a BenchPod with the digital board v3r4 or later and "
1125
+ "firmware that has it (feature la_5v): use 1.8 or 3.3")
1126
+ with _classified_errors():
1127
+ return LaVoltage.from_reply(self.command({"cmd": "la_voltage", "mv": 5000}))
1109
1128
  match = next((ok for ok in LA_VOLTAGES if abs(v - ok) < 0.05), None)
1110
1129
  if match is None:
1111
- raise ValueError(f"la voltage must be 1.8 or 3.3 (volts), got {voltage!r}")
1130
+ five = " or 5.0 (this pod has 5 V I/O)" if self._has_5v() else ""
1131
+ raise ValueError(f"la voltage must be 1.8 or 3.3{five} (volts), got {voltage!r}")
1112
1132
  return LaVoltage.from_reply(self.command({"cmd": "la_voltage", "mv": int(round(match * 1000))}))
1113
1133
 
1134
+ def _has_5v(self) -> bool:
1135
+ try:
1136
+ return self.supports("la_5v")
1137
+ except BenchPodError:
1138
+ return False
1139
+
1114
1140
  def get_la_voltage(self) -> LaVoltage:
1115
1141
  """The current LA I/O-bank voltage (``voltage`` is ``None`` until one is selected)."""
1116
1142
  return LaVoltage.from_reply(self.command({"cmd": "la_voltage"}))
@@ -1744,8 +1770,10 @@ class BenchPod:
1744
1770
  if range is not None:
1745
1771
  check_choice(range, ADC_RANGES, "range")
1746
1772
  req["range"] = range
1773
+ before = self.capabilities.adc_range
1747
1774
  state = AnalogPathState.from_reply(self.command(req))
1748
1775
  self._follow_adc_range(state.range)
1776
+ self._note_auto_range(path == "current_in", range, before, state.range)
1749
1777
  if path in _ANALOG_PATH_DAC:
1750
1778
  self._routed_dac_path = _ANALOG_PATH_DAC[path]
1751
1779
  elif path == "off":
@@ -1766,6 +1794,7 @@ class BenchPod:
1766
1794
  req["volts"] = float(volts)
1767
1795
  out = DacOutput.from_reply(self.command(req))
1768
1796
  self._routed_dac_path = None if path == "off" else path
1797
+ self._dac_routed()
1769
1798
  return out
1770
1799
 
1771
1800
  # -- the 4-20 mA output (J9) ------------------------------------------------
@@ -1817,7 +1846,11 @@ class BenchPod:
1817
1846
 
1818
1847
  On ``current_in`` the reading also carries ``current``, the loop current in amps, and
1819
1848
  already has this pod's calibration offset taken out (:meth:`calibrate`); ``offset`` says
1820
- how much that was.
1849
+ how much that was. From analog module v3r5 (100 Ω sense resistor, 30 mA limiter, firmware
1850
+ 3.10.13+) ``current_in`` reads in the low range unless ``range`` says otherwise: about
1851
+ 1.7 µA per count, up to the limiter's 28.5 to 31.5 mA. The next route of another source or
1852
+ output gives the normal range back. ``sense_ohms`` is the resistance ``current`` was
1853
+ computed with.
1821
1854
 
1822
1855
  ``range`` switches the ADC input range first (:meth:`adc_range`): ``"low"`` reads up to
1823
1856
  ±5.46 V at about 6x the resolution on analog module v3r4+ (not on ``cal2``). The reading
@@ -1828,8 +1861,10 @@ class BenchPod:
1828
1861
  if range is not None:
1829
1862
  check_choice(range, ADC_RANGES, "range")
1830
1863
  req["range"] = range
1864
+ before = self.capabilities.adc_range
1831
1865
  reading = AdcReading.from_reply(self.command(req))
1832
1866
  self._follow_adc_range(reading.range)
1867
+ self._note_auto_range(source == "current_in", range, before, reading.range)
1833
1868
  return reading
1834
1869
 
1835
1870
  # -- the ADC input range (analog module v3r4+) -------------------------------
@@ -1853,6 +1888,8 @@ class BenchPod:
1853
1888
  check_choice(range, ADC_RANGES, "range")
1854
1889
  req["range"] = range
1855
1890
  state = AdcRangeState.from_reply(self.command(req))
1891
+ if range is not None:
1892
+ self._adc_low_auto = False
1856
1893
  self._set_adc_range_fit(state)
1857
1894
  return state
1858
1895
 
@@ -1875,6 +1912,20 @@ class BenchPod:
1875
1912
  unwrap = caps.adc_affine.unwrap if caps.adc_affine is not None else True
1876
1913
  caps.adc_affine = AffineCal(a=state.a or 0.0, b=state.b, unwrap=unwrap)
1877
1914
 
1915
+ def _note_auto_range(self, current_in: bool, asked: Optional[str], before: str, after: str) -> None:
1916
+ """After a route: on analog module v3r5 ``current_in`` without a ``range`` takes the low
1917
+ range by itself, and the next route of another path gives it back."""
1918
+ if asked is not None or not current_in:
1919
+ self._adc_low_auto = False
1920
+ elif after == "low" and before != "low":
1921
+ self._adc_low_auto = True
1922
+
1923
+ def _dac_routed(self) -> None:
1924
+ """A DAC output was routed: a low range ``current_in`` picked by itself is normal again."""
1925
+ if self._adc_low_auto:
1926
+ self._adc_low_auto = False
1927
+ self._follow_adc_range("normal")
1928
+
1878
1929
  def _follow_adc_range(self, rng: str) -> None:
1879
1930
  """A reply said the pod is in range ``rng``: re-read the fit when the cached one is for
1880
1931
  another range (``off`` and ``cal2`` put the range back to normal)."""
@@ -2645,7 +2696,8 @@ class BenchPod:
2645
2696
  else:
2646
2697
  unwrapped = (c + ADC_WRAP_SPAN if c < ADC_WRAP_THRESHOLD else c for c in cap.counts)
2647
2698
  cap.volts = [fit.a + fit.b * c for c in unwrapped]
2648
- cap.currents = [v / _CURRENT_IN_SENSE_OHMS for v in cap.volts]
2699
+ ohms = fit.sense_ohms or _CURRENT_IN_SENSE_OHMS
2700
+ cap.currents = [v / ohms for v in cap.volts]
2649
2701
  return cap
2650
2702
 
2651
2703
  def capture_la(self, samples: int = 4096, *, sample_rate_hz: Optional[float] = None,
@@ -2795,6 +2847,7 @@ class BenchPod:
2795
2847
  self.command({"cmd": "analog_path", "path": _CURRENT_OUT})
2796
2848
  else:
2797
2849
  self.command({"cmd": "dac_out", "path": dac_path})
2850
+ self._dac_routed()
2798
2851
  self._routed_dac_path = dac_path
2799
2852
 
2800
2853
  def _default_dac_path(self, route: bool) -> str:
@@ -2933,6 +2986,8 @@ class BenchPod:
2933
2986
  d = _dict(self.command(req))
2934
2987
  if route:
2935
2988
  self._routed_dac_path = dac_path # the pod routed it
2989
+ if dac_path != _CURRENT_OUT:
2990
+ self._dac_routed()
2936
2991
  return DacHandle(stop=self._stop_for(dac_path), dac_path=dac_path,
2937
2992
  cotrig=bool(d.get("cotrig", False)), data=d)
2938
2993
 
@@ -3448,13 +3503,50 @@ class BenchPod:
3448
3503
  # -- LA pin modes + GPIO --------------------------------------------------
3449
3504
  # The LA pins on the iCE40 (not STM32 GPIOs). Each has one function at a time; see gpio.py.
3450
3505
 
3451
- def la_pins(self) -> List[LaPinState]:
3506
+ def la_pins(self, la: Union[Pin, int, str, Sequence[Union[Pin, int, str]], None] = None
3507
+ ) -> List[LaPinState]:
3452
3508
  """Every LA channel's function (``none``, ``gpio``, ``uart_rx``, …), GPIO mode and level, and
3453
- bias resistor. A channel that is in use refuses other functions."""
3509
+ bias resistor. A channel that is in use refuses other functions.
3510
+
3511
+ ``la``: only these channels (a channel, a wiring name, or a list), in pin order. Firmware
3512
+ after 3.10.12 sends only those; older firmware sends all 14 and the SDK keeps the ones asked
3513
+ for. A full listing too large for one cloud reply (a long sensor instance name on every
3514
+ pin) is read in two parts by itself."""
3454
3515
  self._require_capability("la_pins", "LA pin modes and GPIO")
3516
+ if la == "all":
3517
+ la = None
3518
+ if la is not None:
3519
+ want = sorted(set(self._resolve_las(la, why="la_pins lists LA channels")))
3520
+ return [p for p in self._la_pins_query(want) if p.la in want]
3521
+ try:
3522
+ return self._la_pins_query(None)
3523
+ except FirmwareError as e:
3524
+ if "reply too large" not in str(getattr(e, "firmware_message", "") or e):
3525
+ raise
3526
+ first = self._la_pins_query(list(range(1, 8)))
3527
+ if len(first) > 7: # firmware without the subset: it listed everything again
3528
+ raise
3529
+ return first + [p for p in self._la_pins_query(list(range(8, 15))) if p.la >= 8]
3530
+
3531
+ def _la_pins_query(self, las: Optional[List[int]]) -> List[LaPinState]:
3532
+ req: Dict[str, Any] = {"cmd": "la_pins"}
3533
+ if las is not None:
3534
+ req["la"] = las
3455
3535
  with _classified_errors():
3456
- data = _dict(self.command({"cmd": "la_pins"}))
3457
- return [LaPinState.from_reply(e) for e in data.get("pins") or []]
3536
+ data = _dict(self.command(req))
3537
+ # Digital v3r4 says the directions once for every channel ("pull_dirs").
3538
+ dirs = data.get("pull_dirs")
3539
+ return [LaPinState.from_reply(e, pull_dirs=dirs if isinstance(dirs, list) else None)
3540
+ for e in data.get("pins") or []]
3541
+
3542
+ def _entry_pull_dirs(self, entries: Any) -> Optional[Tuple[str, ...]]:
3543
+ """The pull directions for listing replies that do not say them (la_dir, gpio): on digital
3544
+ v3r4 every channel pulls both ways, said only once in the la_pins reply."""
3545
+ if not isinstance(entries, list):
3546
+ return None
3547
+ bare = any(isinstance(e, dict) and isinstance(e.get("pull"), dict) and "dirs" not in e["pull"]
3548
+ for e in entries)
3549
+ return ("up", "down") if bare and self.supports("la_pull_strength") else None
3458
3550
 
3459
3551
  def la_dir(self, la: Union[Pin, int, str, Sequence[Union[Pin, int, str]], None] = None,
3460
3552
  dir: Optional[str] = None) -> List[LaPinState]:
@@ -3479,7 +3571,9 @@ class BenchPod:
3479
3571
  with _classified_errors():
3480
3572
  data = self.command(req)
3481
3573
  entries = data.get("pins") if isinstance(data, dict) else data
3482
- return [LaPinState.from_reply(e) for e in entries or []] if isinstance(entries, list) else []
3574
+ dirs = self._entry_pull_dirs(entries)
3575
+ return ([LaPinState.from_reply(e, pull_dirs=dirs) for e in entries or []]
3576
+ if isinstance(entries, list) else [])
3483
3577
 
3484
3578
  def pin_directions(self, wiring: Optional[Wiring] = None) -> Dict[int, str]:
3485
3579
  """The DUT direction of every pin the wiring profile names, as :meth:`la_dir` takes it:
@@ -3716,7 +3810,9 @@ class BenchPod:
3716
3810
  self._require_capability("la_pins", "GPIO")
3717
3811
  with _classified_errors():
3718
3812
  data = _dict(self.command(req))
3719
- pins = [LaPinState.from_reply(e) for e in data.get("pins") or []]
3813
+ entries = data.get("pins") or []
3814
+ dirs = self._entry_pull_dirs(entries)
3815
+ pins = [LaPinState.from_reply(e, pull_dirs=dirs) for e in entries]
3720
3816
  return pins or [LaPinState(la=la, function="gpio", gpio=mode, level=level) for la in las]
3721
3817
 
3722
3818
  def _resolve_las(self, la: Any, why: str = "") -> List[int]:
@@ -157,6 +157,9 @@ ADC_SOURCE_PATHS: Dict[str, str] = {"ext": "adc_ext", "cal1": "cal1", "cal2": "c
157
157
 
158
158
  #: LA I/O-bank voltages the pod supports (volts). 1.8 V needs a rev3 pod.
159
159
  LA_VOLTAGES: Tuple[float, ...] = (1.8, 3.3)
160
+ #: 5 V I/O: digital board v3r4 and later (feature ``la_5v``). The bank stays at 3.3 V and pin 21,
161
+ #: the rail the pull-ups pull to, goes to 5 V.
162
+ LA_VOLTAGE_5V: float = 5.0
160
163
 
161
164
  #: Pull directions a host asks for (``BenchPod.set_pull``). The pod picks the resistor value.
162
165
  PullDirection = Literal["up", "down", "off"]