diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-03-05 10:36:34 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-03-05 10:36:34 +0000 |
commit | 712ecf57f92786cded15efb214e3eea76ed0332a (patch) | |
tree | 75b9b6b7a577f324d4a48eaff9009a0fa873e2ba | |
parent | 7bd5e871890415c27fa14b360ea7b2651c5fd659 (diff) | |
download | ChibiOS-712ecf57f92786cded15efb214e3eea76ed0332a.tar.gz ChibiOS-712ecf57f92786cded15efb214e3eea76ed0332a.tar.bz2 ChibiOS-712ecf57f92786cded15efb214e3eea76ed0332a.zip |
Fixed bug #722.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9014 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c | 4 | ||||
-rw-r--r-- | readme.txt | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c b/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c index 748675885..767cd52a7 100644 --- a/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c +++ b/os/hal/ports/STM32/LLD/TIMv1/pwm_lld.c @@ -708,7 +708,7 @@ void pwm_lld_enable_channel(PWMDriver *pwmp, #if STM32_TIM_MAX_CHANNELS <= 4
pwmp->tim->CCR[channel] = width;
#else
- if (channel <= 4)
+ if (channel < 4)
pwmp->tim->CCR[channel] = width;
else
pwmp->tim->CCXR[channel - 4] = width;
@@ -733,7 +733,7 @@ void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel) { pwmp->tim->CCR[channel] = 0;
pwmp->tim->DIER &= ~(2 << channel);
#else
- if (channel <= 4) {
+ if (channel < 4) {
pwmp->tim->CCR[channel] = 0;
pwmp->tim->DIER &= ~(2 << channel);
}
diff --git a/readme.txt b/readme.txt index 09cc956ad..e1b4de613 100644 --- a/readme.txt +++ b/readme.txt @@ -95,6 +95,8 @@ - RT: Merged RT4.
- NIL: Merged NIL2.
- NIL: Added STM32F7 demo.
+- VAR: Fixed error in STM32 PWM driver regarding channels 4 and 5 (bug #722)
+ (backported to 3.0.6 and 16.1.4).
- VAR: Fixed wrong flash and ram size in linker script for maple mini
(bug #719).
- VAR: Fixed GCC 5.2 crashes while compiling ChibiOS (bug #718)(backported
|