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.
616 B
616 B
| 1 | # Name, Type, SubType, Offset, Size, Flags |
|---|---|
| 2 | # MicrOBU: NVS 80 KB instead of the colleague's 24 KB (their board has 4 MB of flash, ours 8 MB: the XIAO ESP32-C5; the earlier bench board had 16 MB). |
| 3 | # NVS holds the BLE bond, the credential bundle and PHY calibration; at 24 KB, with Wi-Fi settings the |
| 4 | # previous firmware had left in it, there was no room for the bond, so the board forgot the phone |
| 5 | # after every connection. The app therefore moves from 0x10000 to 0x20000 (64 KB aligned). |
| 6 | nvs, data, nvs, 0x9000, 0x14000, |
| 7 | phy_init, data, phy, 0x1D000, 0x1000, |
| 8 | factory, app, factory, 0x20000, 0x300000, |