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:
@@ -53,7 +53,13 @@ Main changes against the colleague's firmware:
|
||||
`V2X_RX` (0x85), whose body is the old `SERIAL_MSG_V2X_RX` payload.
|
||||
- **Unsigned sending kept.** The colleague's station refuses unsecured requests; here they go out
|
||||
with the previous firmware's `geonet.c` header.
|
||||
- **Console on UART0** (CH343, COM3 on the bench); the native USB port carries only link frames.
|
||||
- **Console on UART0** (GPIO11/12; the earlier two-port bench board had a CH343 bridge there, COM3);
|
||||
the native USB port carries only link frames. The production board is now a **Seeed XIAO ESP32-C5**
|
||||
(8 MB flash, a single native USB-C port, COM10 on the bench) running from a LiPo on its BAT pads.
|
||||
- **Battery:** the XIAO's own divider (GPIO6, enabled by GPIO26) is read every 5 s and sent in STATUS
|
||||
(`battery_mv`, `battery_flags`, octets 103-105); the app shows the voltage, a rough percentage and a
|
||||
low/critical warning on the ESP32-C5 card and in the top bar. Below 3.30 V with no phone on USB the
|
||||
board deep-sleeps, because the prototype cell has no protection board. See `obu-firmware/FLASHING.md`.
|
||||
- **BLE pauses advertising while USB is in use** (BLE and ITS-G5 share one RF front end).
|
||||
- **NVS 80 KB instead of 24 KB**, app at 0x20000. At 24 KB the BLE bond could not be stored and the
|
||||
phone had to pair on every connection.
|
||||
|
||||
Reference in New Issue
Block a user