Monitor the XIAO's battery and make the XIAO the production board
The production OBU is now a Seeed XIAO ESP32-C5 (8 MB flash, one native USB-C port) on a LiPo with no protection board. The firmware reads the cell on GPIO6 (divider switched by GPIO26) every 5 s, sends it in STATUS (battery_mv and battery_flags, octets 103-105; decoders accept 103 or >= 106 octets), warns below 3.50 V and deep-sleeps below 3.30 V when no phone is on USB, waking every 5 min to check the cell again. Thresholds are in Kconfig; host test `make battery`. The app shows voltage, a rough percentage and the low/critical state on the ESP32-C5 card and in the top bar. With several bonded micrOBUs (a replaced board stays bonded), the BLE link tries the one that last connected first and moves on to the next after each failure. tools/station_status_watch.py reads STATUS from the native port.
This commit is contained in:
+10
-4
@@ -27,9 +27,10 @@ Changed or added for this project (search for `MicrOBU:` in the sources):
|
||||
Here a request with GN security profile 1 goes out with the previous firmware's `geonet.c` header
|
||||
and the position of the last PoTi (`Station::unsecured_request`); the app's "Sign outgoing
|
||||
messages" setting decides per message.
|
||||
- **Console on UART0.** ESP_LOG stays on the CH343 bridge port (COM3 on the bench); the native port
|
||||
carries only link frames. The colleague's single-port board routes the log into LOG frames there
|
||||
(`CONFIG_MICROBU_LOG_OVER_LINK`, off here).
|
||||
- **Console on UART0.** ESP_LOG stays on UART0 (GPIO11/12, pads D6/D7 on the XIAO); the native port
|
||||
carries only link frames. The earlier bench board had a CH343 bridge on UART0 (COM3); the XIAO has
|
||||
none, so its log is invisible unless a UART adapter is attached. The colleague's single-port board
|
||||
routes the log into LOG frames on the native port (`CONFIG_MICROBU_LOG_OVER_LINK`, off here).
|
||||
- **BLE pauses while USB is in use** (`CONFIG_MICROBU_BLE_USB_IDLE_MS`, 3 s): BLE and ITS-G5 share
|
||||
the C5's one RF front end. Whether a live BLE connection disturbs 5.9 GHz is still unmeasured
|
||||
(TODO.md).
|
||||
@@ -38,7 +39,12 @@ Changed or added for this project (search for `MicrOBU:` in the sources):
|
||||
- The Wi-Fi RX callback's 2.4 KB capture buffer is static rather than on the driver task's stack
|
||||
(the previous firmware's commit 04b0076 fixed the same risk).
|
||||
- Manual country policy and the TX-power read-back from the previous firmware's radio bring-up.
|
||||
- The activity LED (GPIO27 on the colleague's XIAO board) is off unless configured.
|
||||
- The activity LED (GPIO27 on the XIAO) is off unless configured (`CONFIG_MICROBU_TX_LED_GPIO`).
|
||||
- **Production board is the XIAO ESP32-C5 (2026-10-05):** 8 MB flash, one native USB-C port, flashed
|
||||
on COM10 on the bench. Battery: STATUS carries `battery_mv`/`battery_flags` (octets 103-105, a
|
||||
MicrOBU extension; decoders accept 103 or >= 106 octets) and the board deep-sleeps below 3.30 V
|
||||
when no phone is on USB, to protect a cell with no protection board. Details and thresholds:
|
||||
FLASHING.md, "Battery and pins".
|
||||
|
||||
Credentials: the app ships `assets/demo-chain.vcr`, a throwaway chain generated 2026-09-23 with the
|
||||
colleague's `vidf_issue` (root `6E7D0374FB021901`, AA `B3312F29844299E0`, AT `B80B49387A4C12EB`
|
||||
|
||||
Reference in New Issue
Block a user