From a86b48c578db236dddea8f141db7607741d48e57 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 12 Sep 2013 17:45:10 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6298 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/STM32/TIMv1/st_lld.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os/hal') 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 | -- cgit v1.2.3