Skip to main content

v2n-power-monitor

Live per-rail power table from the E1M-X EVK's on-board INA236 current/voltage monitors, read from a Linux/Yocto user-space app on the V2N Cortex-A55. One portable ina236 driver instance per rail, all on the shared on-board sensor I²C bus, printing bus voltage / current / power once a second.

:::note EVK-only / demo The INA236 monitors exist only on the EVK carriers — production E1M-X SoMs do not carry them. This is a bring-up / demo utility, not a production telemetry path. Rail map + shunt calibration come from <alp/boards/alp_e1m_x_evk.h>, so the constants live in the board definition, not in app code. :::

Source: examples/v2n/v2n-power-monitor/.

Rails​

RailINA236AddrShunt
3V3U210x4020 mΩ
1V8U310x4120 mΩ
VCAM2U320x4850 mΩ
VCAM3U340x4950 mΩ
5VU300x4A20 mΩ

board.yaml​

som:
sku: E1M-V2N101

preset: e1m-x-evk
supported_boards:
- e1m-x-evk

pins:
- { e1m: E1M_X_I2C0, macro: XEVK_I2C_BUS_SENSORS,
doc: "On-board sensor + INA236 power-monitor bus" }

cores:
a55_cluster:
app: ./src
peripherals: [i2c]

chips:
- ina236 # Five on-board high-side rail monitors (EVK-only)

diagnostics:
log_level: info

The app targets the a55_cluster (Linux/Yocto user space): the portable alp_i2c_* surface maps onto /dev/i2c-N here, and the same source compiles on Zephyr. It links libalp_chips.a (INA236 driver) ahead of libalp_sdk.so (the alp_i2c backend).

:::caution tan build blocks this slice — use the Yocto SDK path below A Yocto app-only slice needs a recipe: field naming the bitbake recipe that packages app: — a source path alone is never a valid bitbake target. No meta-alp-sdk recipe packages this app yet, so this board.yaml has no recipe:, and the orchestrator refuses to guess one:

core 'a55_cluster' has app: './src' but no recipe: -- add the bitbake recipe
name that packages this app source, or set image: to build a stock image instead

tan build / west alp-emit build-plan emit command: null for a55_cluster with a yocto-recipe-missing warning. The slice is carried as skipped rather than dropped, so the build does not hard-error — it just produces nothing for this app. The manual Yocto SDK CMake path below sidesteps the orchestrator and is unaffected. :::

Build (Yocto SDK)​

# Source the SDK that includes meta-alp-sdk (libalp_sdk.so + libalp_chips.a):
. /opt/poky/<ver>/environment-setup-aarch64-poky-linux

cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake
cmake --build build

Copy build/v2n-power-monitor to the target and run it (Ctrl-C to stop).

Expected output​

rail bus_V I_mA P_mW
3V3 0.099 0.00 0.0
1V8 0.002 0.00 0.0
VCAM2 0.000 0.00 0.0
VCAM3 0.000 0.00 0.0
5V 4.884 740.00 3614.0

Known board notes (current EVK revision)​

The app still runs; affected rails just read low (fixes land on the next board revision):

  • 3V3 / 1V8 read ~0 V on the bus-voltage register (VBUS-sense wiring); their shunt/current path is unaffected.
  • VCAM2 / VCAM3 read ~0 — camera rails are off unless a camera is powered.
  • Two extra addresses (0x42 / 0x43) also respond as INA236 but are not in the schematic BOM; this app ignores them.

The INA236 register semantics (device IDs + bus/shunt LSBs) are bench-confirmed on V2N.

See also​

Questions about this page? Discuss in Community Forum