aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/STM32/pwm_lld.h16
-rw-r--r--readme.txt2
-rw-r--r--todo.txt2
3 files changed, 13 insertions, 7 deletions
diff --git a/os/hal/platforms/STM32/pwm_lld.h b/os/hal/platforms/STM32/pwm_lld.h
index fcd66bbda..b22e3a315 100644
--- a/os/hal/platforms/STM32/pwm_lld.h
+++ b/os/hal/platforms/STM32/pwm_lld.h
@@ -250,22 +250,24 @@ struct PWMDriver {
* Please refer to the STM32 HAL driver documentation
* and/or the STM32 Reference Manual for the right clock
* source.
- * @param[in] nsec PWM clock cycle time in nanoseconds
+ * @param[in] pwmclk PWM clock frequency in cycles
* @return The value to be stored in the @p pc_psc field of the
* @p PWMConfig structure.
*/
-#define PWM_COMPUTE_PSC(clksrc, nsec) \
- ((uint16_t)(((clksrc) / (1000000000 / (nsec))) - 1))
+#define PWM_COMPUTE_PSC(clksrc, pwmclk) \
+ ((uint16_t)(((clksrc) / (pwmclk)) - 1))
/**
* @brief PWM cycle period initialization utility.
* @note The calculated value must fit into an unsigned 16 bits integer.
*
- * @param[in] clkperiod PWM clock period in nanoseconds
- * @param[in] pwmperiod PWM cycle period in nanoseconds
+ * @param[in] pwmclk PWM clock frequency in cycles
+ * @param[in] pwmperiod PWM cycle period in microseconds
+ * @return The value to be stored in the @p pc_arr field of the
+ * @p PWMConfig structure.
*/
-#define PWM_COMPUTE_ARR(clkperiod, pwmperiod) \
- ((uint16_t)(((clkperiod) / (1000000000 / (pwmperiod))) - 1))
+#define PWM_COMPUTE_ARR(pwmclk, pwmperiod) \
+ ((uint16_t)(((pwmclk) / (1000000 / (pwmperiod))) - 1))
/**
* @brief Converts from degrees to pulse width.
diff --git a/readme.txt b/readme.txt
index 1158720ea..0ed03f9fc 100644
--- a/readme.txt
+++ b/readme.txt
@@ -65,6 +65,8 @@
*****************************************************************************
*** 2.1.4 ***
+- FIX: Fixed wrong initializer macros in STM32 PWM driver (bug 3114319).
+- FIX: Fixed syntax error in STM32 PWM driver(bug 3114266).
- FIX: Fixed typo in board name (bug 3113574)(backported to 2.0.7).
- FIX: Fixed defective event wait functions with timeout (bug 3113443)
(backported to 2.0.7).
diff --git a/todo.txt b/todo.txt
index 5d4d29835..b676577f4 100644
--- a/todo.txt
+++ b/todo.txt
@@ -53,6 +53,8 @@ N Evaluate if to add a synchronous API to the UART driver, eventually do so.
* STM8L-Discovery demo.
* Add the STM32F100 (Value Line) sub-family to the official STM32 HAL support.
* STM32VL-Discovery demo.
+ - Problem, some IRQ vectors have a different vector name in the STM32F100
+ sub-family. Use vector numbers instead?
* Remove the PAL default configuration from the various hal_lld.c and move
them into board.c files, this will remove an ugly dependency.
* Realign the STM8 port to the new STM8L one as options, naming conventions