From 198b5c486decffd8caeebf5ea4977a3a34540476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Wed, 10 Apr 2019 10:03:06 +0200 Subject: [PATCH] [ion] LED: fix TIM3 prescaler --- ion/src/device/shared/drivers/led.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ion/src/device/shared/drivers/led.cpp b/ion/src/device/shared/drivers/led.cpp index 7644040b7..c49ffda4f 100644 --- a/ion/src/device/shared/drivers/led.cpp +++ b/ion/src/device/shared/drivers/led.cpp @@ -105,10 +105,10 @@ void shutdownTimer() { void setPeriodAndDutyCycles(Mode mode, float dutyCycleRed, float dutyCycleGreen, float dutyCycleBlue, uint16_t period) { switch (mode) { case Mode::PWM: - /* Let's set the prescaler to 1. Increasing the prescaler would slow down + /* Let's set the prescaler to 1 (PSC = 0). Increasing the prescaler would slow down * the modulation, which can be useful when debugging or when we want an * actual blinking. */ - TIM3.PSC()->set(1); + TIM3.PSC()->set(0); TIM3.ARR()->set(PWMPeriod); period = PWMPeriod; break;