TIM1 as a OS Timer
Posted: Fri Nov 20, 2015 11:36 pm
I'm trying to port an application to a STM32F103CBT6. This version of cpu has only 4 timers, and I use TIM2, TIM3 and TIM4 for PWM capture and PWM generation. So I suppose I have to change the default timer on mcuconf.h to TIM1 by assigning the variable STM32_ST_USE_TIMER to 1. I use the board configuration for Olimex P103 (which has #define STM32F103_MCUCONF on mcuconf.h file)
However, when compiling it gives an error:
Does anybody encountered some time this error and could give me an advise?
However, when compiling it gives an error:
Code: Select all
In file included from ../ChibiOS_3.0.2/os/hal/include/st.h:46:0,
from ../ChibiOS_3.0.2/os/rt/ports/ARMCMx/chcore_timer.h:32,
from ../ChibiOS_3.0.2/os/rt/ports/ARMCMx/chcore.h:202,
from ../ChibiOS_3.0.2/os/rt/include/ch.h:74,
from ../ChibiOS_3.0.2/os/rt/src/chvt.c:29:
../ChibiOS_3.0.2/os/hal/ports/STM32/LLD/TIMv1/st_lld.h:93:2: error: #error "STM32_ST_USE_TIMER specifies an unsupported timer"
#error "STM32_ST_USE_TIMER specifies an unsupported timer"
Does anybody encountered some time this error and could give me an advise?