mbed-os/libraries/mbed
Martin Simpson bbfd190206 Update pwmout_api.c
Line 244 changed PclkFreq*2 to PcklFreq
Line 246 changed PclkFreq to PclkFreq*2

This is proposed as the current pwmout_api.c gives the wrong period/frequency when using e.g."mypwm.period_ms(1);"
For PWM1 1ms gave 500Hz and PWM2,3 and 4 gave 2KHz

Applied to source as above and re-compiled this gave 1KHz outputs for all PWM's selected
Tried on NUCLEO STM32F401RE will effect other NUCLEO-STM32F4 as above

HAL Clocks are as follows for the F401RE Board:  PCLK1=42000000 PCLK2=84000000 HCLK=84000000

Kind Regards

Martin
2015-07-27 12:16:45 +01:00
..
api mbed lib revision - 103 2015-07-21 14:38:29 +02:00
common [mbed] Modified MBED_ASSERT to use error() 2015-07-13 10:20:11 -06:00
hal Serial - constness for tx 2015-06-09 10:02:27 +01:00
targets Update pwmout_api.c 2015-07-27 12:16:45 +01:00
CMakeLists.txt ensure startup code is included when building for armcc 2015-06-26 18:42:12 +01:00
module.json use mbed-classic as the module name; use YOTTA_GLOBAL_INCLUDE_DIRS 2015-06-23 16:29:04 +01:00