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
| Rail | INA236 | Addr | Shunt |
|---|---|---|---|
| 3V3 | U21 | 0x40 | 20 mΩ |
| 1V8 | U31 | 0x41 | 20 mΩ |
| VCAM2 | U32 | 0x48 | 50 mΩ |
| VCAM3 | U34 | 0x49 | 50 mΩ |
| 5V | U30 | 0x4A | 20 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).
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.