From 4ad8f8555515f753b22cc29a70b8cdbab1082f83 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sun, 28 Feb 2021 22:27:12 +0100 Subject: [PATCH] boards/arm/stm32/stm32f334-disco/src/stm32_smps.c: update according to the previous change in the PI controller --- boards/arm/stm32/stm32f334-disco/src/stm32_smps.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c b/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c index 05297e3392..9b13384534 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c +++ b/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c @@ -431,6 +431,10 @@ static int smps_start(FAR struct smps_dev_s *dev) /* Set PID controller saturation */ pid_saturation_set(&priv->pid, 0.0, BOOST_VOLT_MAX); + + /* Reset PI integral if saturated */ + + pi_ireset_enable(&priv->pid, true); #endif /* Get TIMA period value for given frequency */