From af0a2cee78dd8dfd173e28b814ba757b9ef2022c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 21 Nov 2010 12:28:46 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2407 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/pwm_lld.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/hal/platforms/STM32/pwm_lld.h b/os/hal/platforms/STM32/pwm_lld.h index a1a6c905e..194e60b48 100644 --- a/os/hal/platforms/STM32/pwm_lld.h +++ b/os/hal/platforms/STM32/pwm_lld.h @@ -262,12 +262,12 @@ struct PWMDriver { * @note The calculated value must fit into an unsigned 16 bits integer. * * @param[in] pwmclk PWM clock frequency in cycles - * @param[in] pwmperiod PWM cycle period in microseconds + * @param[in] pwmperiod PWM cycle period in nanoseconds * @return The value to be stored in the @p pc_arr field of the * @p PWMConfig structure. */ #define PWM_COMPUTE_ARR(pwmclk, pwmperiod) \ - ((uint16_t)(((pwmclk) / (1000000 / (pwmperiod))) - 1)) + ((uint16_t)(((pwmclk) / (1000000000 / (pwmperiod))) - 1)) /** * @brief Converts from fraction to pulse width.