diff --git a/demos/STM32/RT-STM32F446ZE-NUCLEO144/debug/RT-STM32F446ZE-NUCLEO144 (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F446ZE-NUCLEO144/debug/RT-STM32F446ZE-NUCLEO144 (OpenOCD, Flash and Run).launch index 9f9c83200..89c8e86d3 100644 --- a/demos/STM32/RT-STM32F446ZE-NUCLEO144/debug/RT-STM32F446ZE-NUCLEO144 (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32F446ZE-NUCLEO144/debug/RT-STM32F446ZE-NUCLEO144 (OpenOCD, Flash and Run).launch @@ -33,7 +33,7 @@ - + diff --git a/demos/STM32/RT-STM32F446ZE-NUCLEO144/main.c b/demos/STM32/RT-STM32F446ZE-NUCLEO144/main.c index 33e022883..bc6222035 100644 --- a/demos/STM32/RT-STM32F446ZE-NUCLEO144/main.c +++ b/demos/STM32/RT-STM32F446ZE-NUCLEO144/main.c @@ -34,13 +34,13 @@ static THD_FUNCTION(Thread1, arg) { palSetLine(LINE_LED2); chThdSleepMilliseconds(50); palSetLine(LINE_LED3); - chThdSleepMilliseconds(200); + chThdSleepMilliseconds(150); palClearLine(LINE_LED1); chThdSleepMilliseconds(50); palClearLine(LINE_LED2); chThdSleepMilliseconds(50); palClearLine(LINE_LED3); - chThdSleepMilliseconds(200); + chThdSleepMilliseconds(150); } } diff --git a/os/hal/ports/STM32/STM32F4xx/hal_lld.c b/os/hal/ports/STM32/STM32F4xx/hal_lld.c index 1cfa9c49c..8f3aba7db 100644 --- a/os/hal/ports/STM32/STM32F4xx/hal_lld.c +++ b/os/hal/ports/STM32/STM32F4xx/hal_lld.c @@ -288,12 +288,10 @@ void stm32_clock_init(void) { #endif #if !defined(STM32F413xx) RCC->DCKCFGR = dckcfgr | - STM32_TIMPRE | STM32_PLLSAIDIVR | - STM32_PLLSAIDIVQ | STM32_PLLI2SDIVQ; + STM32_TIMPRE | STM32_PLLSAIDIVQ | STM32_PLLI2SDIVQ; #else RCC->DCKCFGR = dckcfgr | - STM32_TIMPRE | - STM32_PLLDIVR | STM32_PLLI2SDIVR; + STM32_TIMPRE | STM32_PLLDIVR | STM32_PLLI2SDIVR; #endif } #endif diff --git a/os/hal/ports/STM32/STM32F4xx/hal_lld.h b/os/hal/ports/STM32/STM32F4xx/hal_lld.h index cc5f1ee7b..87061fe7d 100644 --- a/os/hal/ports/STM32/STM32F4xx/hal_lld.h +++ b/os/hal/ports/STM32/STM32F4xx/hal_lld.h @@ -204,40 +204,20 @@ * @brief Clock of timers connected to APB1 * (Timers 2, 3, 4, 5, 6, 7, 12, 13, 14). */ -#if !defined(STM32F446xx) || defined(__DOXYGEN__) #if (STM32_PPRE1 == STM32_PPRE1_DIV1) || defined(__DOXYGEN__) #define STM32_TIMCLK1 (STM32_PCLK1 * 1) #else #define STM32_TIMCLK1 (STM32_PCLK1 * 2) #endif -#else /* defined(STM32F446xx) */ -#if STM32_PPRE1 == STM32_PPRE1_DIV1 -#define STM32_TIMCLK1 (STM32_PCLK1 * 1) -#elif STM32_PPRE1 == STM32_PPRE1_DIV2 -#define STM32_TIMCLK1 (STM32_PCLK1 * 2) -#else -#define STM32_TIMCLK1 (STM32_PCLK1 * 4) -#endif -#endif /* defined(STM32F446xx) */ /** * @brief Clock of timers connected to APB2 (Timers 1, 8, 9, 10, 11). */ -#if !defined(STM32F446xx) || defined(__DOXYGEN__) #if (STM32_PPRE2 == STM32_PPRE2_DIV1) || defined(__DOXYGEN__) #define STM32_TIMCLK2 (STM32_PCLK2 * 1) #else #define STM32_TIMCLK2 (STM32_PCLK2 * 2) #endif -#else /* defined(STM32F446xx) */ -#if STM32_PPRE2 == STM32_PPRE2_DIV1 -#define STM32_TIMCLK2 (STM32_PCLK2 * 1) -#elif STM32_PPRE2 == STM32_PPRE2_DIV2 -#define STM32_TIMCLK2 (STM32_PCLK2 * 2) -#else -#define STM32_TIMCLK2 (STM32_PCLK2 * 4) -#endif -#endif /* defined(STM32F446xx) */ #else /* STM32_HAS_RCC_DCKCFGR && (STM32_TIMPRE == STM32_TIMPRE_HCLK) */ #if (STM32_PPRE1 == STM32_PPRE1_DIV1) || \ diff --git a/readme.txt b/readme.txt index 62af28253..940e497a5 100644 --- a/readme.txt +++ b/readme.txt @@ -196,8 +196,6 @@ - EX: Updated LIS302DL to 1.1.0 (backported to 18.2.1). - EX: Updated LPS25H to 1.1.0 (backported to 18.2.1). - EX: Updated LSM303DLHC to 1.1.0 (backported to 18.2.1). -- HAL: Fixed invalid timer frequency calculation for STM32F446 (bug #1002) - (backported to 18.2.2 and 17.6.5). - HAL: Fixed invalid checks in STM32H7 HAL (bug #1000) (backported to 18.2.2). - OTH: Fixed problem in STM32H743 GCC linker file (bug #998)