aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/TIMv1/st_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/TIMv1/st_lld.c')
-rw-r--r--os/hal/ports/STM32/TIMv1/st_lld.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/os/hal/ports/STM32/TIMv1/st_lld.c b/os/hal/ports/STM32/TIMv1/st_lld.c
index 507cad948..090b7a4fe 100644
--- a/os/hal/ports/STM32/TIMv1/st_lld.c
+++ b/os/hal/ports/STM32/TIMv1/st_lld.c
@@ -83,11 +83,11 @@
#error "STM32_ST_USE_TIMER specifies an unsupported timer"
#endif
-#if ST_CLOCK_SRC % OSAL_SYSTICK_FREQUENCY != 0
+#if ST_CLOCK_SRC % OSAL_ST_FREQUENCY != 0
#error "the selected ST frequency is not obtainable because integer rounding"
#endif
-#if (ST_CLOCK_SRC / OSAL_SYSTICK_FREQUENCY) - 1 > 0xFFFF
+#if (ST_CLOCK_SRC / OSAL_ST_FREQUENCY) - 1 > 0xFFFF
#error "the selected ST frequency is not obtainable because TIM timer prescaler limits"
#endif
@@ -95,11 +95,11 @@
#if OSAL_ST_MODE == OSAL_ST_MODE_PERIODIC
-#if STM32_HCLK % OSAL_SYSTICK_FREQUENCY != 0
+#if STM32_HCLK % OSAL_ST_FREQUENCY != 0
#error "the selected ST frequency is not obtainable because integer rounding"
#endif
-#if (STM32_HCLK / OSAL_SYSTICK_FREQUENCY) - 1 > 0xFFFFFF
+#if (STM32_HCLK / OSAL_ST_FREQUENCY) - 1 > 0xFFFFFF
#error "the selected ST frequency is not obtainable because SysTick timer counter limits"
#endif
@@ -183,7 +183,7 @@ void st_lld_init(void) {
ST_ENABLE_CLOCK();
/* Initializing the counter in free running mode.*/
- STM32_ST_TIM->PSC = (ST_CLOCK_SRC / OSAL_SYSTICK_FREQUENCY) - 1;
+ STM32_ST_TIM->PSC = (ST_CLOCK_SRC / OSAL_ST_FREQUENCY) - 1;
STM32_ST_TIM->ARR = ST_ARR_INIT;
STM32_ST_TIM->CCMR1 = 0;
STM32_ST_TIM->CCR[0] = 0;
@@ -199,7 +199,7 @@ void st_lld_init(void) {
#if OSAL_ST_MODE == OSAL_ST_MODE_PERIODIC
/* Periodic systick mode, the Cortex-Mx internal systick timer is used
in this mode.*/
- SysTick->LOAD = (STM32_HCLK / OSAL_SYSTICK_FREQUENCY) - 1;
+ SysTick->LOAD = (STM32_HCLK / OSAL_ST_FREQUENCY) - 1;
SysTick->VAL = 0;
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk |
SysTick_CTRL_ENABLE_Msk |