Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-stm32l0/l1-src by
Revision 605:ded2017be6ab, committed 2015-08-13
- Comitter:
- mbed_official
- Date:
- Thu Aug 13 11:30:09 2015 +0100
- Parent:
- 604:19d487c995ec
- Child:
- 606:12ecb532fd15
- Commit message:
- Synchronized with git revision 163a66abdd17c224129f0199f6ed2f3c626cacab
Full URL: https://github.com/mbedmicro/mbed/commit/163a66abdd17c224129f0199f6ed2f3c626cacab/
STMF4 - pwmout_api.c freq fix
Changed in this revision
--- a/targets/cmsis/TARGET_NXP/TARGET_LPC15XX/LPC15xx.h Thu Aug 13 11:00:09 2015 +0100
+++ b/targets/cmsis/TARGET_NXP/TARGET_LPC15XX/LPC15xx.h Thu Aug 13 11:30:09 2015 +0100
@@ -159,9 +159,9 @@
typedef struct { /*!< GPIO_PORT Structure */
__IO uint8_t B[76]; /*!< Byte pin registers */
- __I uint32_t RESERVED0[45];
+ __I uint32_t RESERVED0[1005];
__IO uint32_t W[76]; /*!< Word pin registers */
- __I uint32_t RESERVED1[1908];
+ __I uint32_t RESERVED1[948];
__IO uint32_t DIR[3]; /*!< Port Direction registers */
__I uint32_t RESERVED2[29];
__IO uint32_t MASK[3]; /*!< Port Mask register */
--- a/targets/hal/TARGET_STM/TARGET_STM32F4/pwmout_api.c Thu Aug 13 11:00:09 2015 +0100
+++ b/targets/hal/TARGET_STM/TARGET_STM32F4/pwmout_api.c Thu Aug 13 11:30:09 2015 +0100
@@ -241,9 +241,9 @@
TimHandle.Init.Period = us - 1;
if (APBxCLKDivider == RCC_HCLK_DIV1)
- TimHandle.Init.Prescaler = (uint16_t)((PclkFreq*2) / 1000000) - 1; // 1 µs tick
+ TimHandle.Init.Prescaler = (uint16_t)((PclkFreq) / 1000000) - 1; // 1 µs tick
else
- TimHandle.Init.Prescaler = (uint16_t)((PclkFreq) / 1000000) - 1; // 1 µs tick
+ TimHandle.Init.Prescaler = (uint16_t)((PclkFreq)*2 / 1000000) - 1; // 1 µs tick
TimHandle.Init.ClockDivision = 0;
TimHandle.Init.CounterMode = TIM_COUNTERMODE_UP;
HAL_TIM_PWM_Init(&TimHandle);
