fix(boards/auterion/fmu-v6s): no battery and 5V warnings on USB-C power

On USB-C power alone, USB back-feeds VBAT to ~4-5V through the 5V buck,
which shows up as a low battery on both the ADC and the ESC battery.
Treat VBAT up to 5.6V as no battery connected for both.

USB-C alone delivers ~4.65-4.8V on the 5V rail, which trips the 4.7V
avionics check. Its most demanding consumer is the CAN transceiver
(4.5-5.5V); the PMIC needs only 3.8V for its 3.3V rails. Lower the
minimum to 4.5V.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: alexcekay <alexander@auterion.com>
This commit is contained in:
alexcekay authored and Marin D committed 2026-11-25 16:35:41 +01:00
1 parent f1a26b1bee
commit 59de4fde54
1 file changed
+9
@@ -98,6 +98,15 @@
#define ADC1_CH(n) (n)
#define SYSTEM_ADC_BASE STM32_ADC1_BASE
/* Don't show battery voltage warnings when connected using only USB-C */
#define BOARD_ADC_OPEN_CIRCUIT_V (5.6f)
/* USB-C can back feed the ESC which keeps the ESCs alive without a battery */
#define BOARD_ESC_BATTERY_OPEN_CIRCUIT_V (5.6f)
/* The minimum voltage the board still works with correctly */
#define BOARD_AVIONICS_5V_MIN_V (4.5f)
/* Define GPIO pins used as ADC N.B. Channel numbers must match below */
/* PC3_C connected to PC3 internally, which connects to GPIO_ADC12_INP13 */