diff --git a/src/hal/src/pm_stm32f4.c b/src/hal/src/pm_stm32f4.c index b52cb84169..26bd616093 100644 --- a/src/hal/src/pm_stm32f4.c +++ b/src/hal/src/pm_stm32f4.c @@ -256,6 +256,15 @@ static void pmGracefulShutdown() syslinkSendPacket(&slp); } +static void pmEnableBatteryStatusAutoupdate() +{ + SyslinkPacket slp = { + .type = SYSLINK_PM_BATTERY_AUTOUPDATE, + }; + + syslinkSendPacket(&slp); +} + void pmSyslinkUpdate(SyslinkPacket *slp) { if (slp->type == SYSLINK_PM_BATTERY_STATE) { @@ -399,6 +408,10 @@ void pmTask(void *param) pmSetChargeState(charge500mA); systemWaitStart(); + // Continuous battery voltage and status messages must be enabled + // after system startup to avoid syslink queue overflow. + pmEnableBatteryStatusAutoupdate(); + while(1) { vTaskDelay(100);