energy_between_gpi_edges
Compute energy over complete intervals when an Otii GPI pin is high or low, enabling precise measurement of firmware active or sleep phases.
Instructions
Energy during the n:th (0-based occurrence) interval where Otii digital input GPI
pin (1 or 2) is high (or low if high=false), from the edge into that level to the edge
out of it. For firmware that sets a GPIO wired to the Otii GPI while in a phase, e.g. active
or sleeping; this is more precise than UART log markers. The level at recording start is not
an edge, so only complete intervals count. The GPI channel must have been recorded (measure
with channels=["i1"] or ["i2"], and exp_voltage set to the device's IO voltage). Use
occurrence >= 1 to skip a first interval that includes start-up. Defaults to the latest
recording.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pin": "<pin>"
},
"name": "energy_between_gpi_edges"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pin | Yes | ||
| high | No | ||
| device | No | ||
| occurrence | No | ||
| recording_id | No |