aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01>2018-04-11 08:21:02 +0000
committergdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01>2018-04-11 08:21:02 +0000
commitfcdf0394ed7601627d17e4262076c9e2dd4cfa59 (patch)
tree4df06cbfbb3ad7e77113b93024b0ed9bd6360c8a
parentda8b8145de60acc87975d5f0d0d4324144d45ceb (diff)
downloadChibiOS-fcdf0394ed7601627d17e4262076c9e2dd4cfa59.tar.gz
ChibiOS-fcdf0394ed7601627d17e4262076c9e2dd4cfa59.tar.bz2
ChibiOS-fcdf0394ed7601627d17e4262076c9e2dd4cfa59.zip
Fixed bug #934.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11879 110e8d01-0319-4d1e-a829-52ad28d1bb01
-rw-r--r--os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c4
-rw-r--r--readme.txt2
2 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c b/os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c
index a59105215..6bf31ebc0 100644
--- a/os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c
+++ b/os/hal/ports/STM32/LLD/TIMv1/hal_pwm_lld.c
@@ -771,8 +771,8 @@ void pwm_lld_enable_periodic_notification(PWMDriver *pwmp) {
/* If the IRQ is not already enabled care must be taken to clear it,
it is probably already pending because the timer is running.*/
if ((dier & STM32_TIM_DIER_UIE) == 0) {
+ pwmp->tim->SR = ~STM32_TIM_SR_UIF;
pwmp->tim->DIER = dier | STM32_TIM_DIER_UIE;
- pwmp->tim->SR &= STM32_TIM_SR_UIF;
}
}
@@ -813,8 +813,8 @@ void pwm_lld_enable_channel_notification(PWMDriver *pwmp,
/* If the IRQ is not already enabled care must be taken to clear it,
it is probably already pending because the timer is running.*/
if ((dier & (2 << channel)) == 0) {
- pwmp->tim->DIER = dier | (2 << channel);
pwmp->tim->SR = ~(2 << channel);
+ pwmp->tim->DIER = dier | (2 << channel);
}
}
diff --git a/readme.txt b/readme.txt
index 84a5c8b5e..dbb79d4f3 100644
--- a/readme.txt
+++ b/readme.txt
@@ -111,6 +111,8 @@
- EX: Updated LIS302DL to 1.1.0 (backported to 18.2.1).
- EX: Updated LPS25H to 1.1.0 (backported to 18.2.1).
- EX: Updated LSM303DLHC to 1.1.0 (backported to 18.2.1).
+- HAL: Fixed problem clearing UIF timer flag in STM32 PWM driver (bug #934)
+ (backported to 18.2.1 and 17.6.5).
- HAL: Fixed USB Serial driver problem with zero-size OUT transactions
(bug #933)(backported to 18.2.1 and 17.6.5).
- HAL: Fixed race condition in STM32 QSPI driver (bug #932)(backported to