Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cores/arduino/HardwareTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,7 @@ uint32_t HardwareTimer::getTimerClkFreq()
/* case RCC_APB2_DIV1: */
case RCC_APB2_DIV2:
case RCC_APB2_DIV4:
/* Note: in such cases, HCLK = (APBCLK * DIVx) */
uwTimclock = HAL_RCC_GetHCLKFreq();
break;
case RCC_APB1_DIV8:
Expand All @@ -1316,7 +1317,7 @@ uint32_t HardwareTimer::getTimerClkFreq()
case RCC_APB1_DIV2:
/* case RCC_APB2_DIV1: */
case RCC_APB2_DIV2:
// uwTimclock*=1;
/* Note: in such cases, HCLK = (APBCLK * DIVx) */
uwTimclock = HAL_RCC_GetHCLKFreq();
break;
case RCC_APB1_DIV4:
Expand Down Expand Up @@ -1349,6 +1350,7 @@ uint32_t HardwareTimer::getTimerClkFreq()
case RCC_HCLK_DIV1:
case RCC_HCLK_DIV2:
case RCC_HCLK_DIV4:
/* Note: in such cases, HCLK = (APBCLK * DIVx) */
uwTimclock = HAL_RCC_GetHCLKFreq();
break;
case RCC_HCLK_DIV8:
Expand Down