GPT and timer 14 on STM32F0....
Posted: Fri Oct 23, 2015 1:55 pm
Hi,
I have a simple thing I want "done" with a timer, so I enabled GPT, and decided the simplest timer I could find would suffice..... I picked "TIM14". But I'm getting a bunch of compiler errors. As a test, I went to testhal/STM32/STM32F0xx/ADC, enabled GPT in halconf.h, and then enabled TIM1 in mcuconf.h. That compiles fine. Then I enabled TIM14 as well and:
Should I produce a patch? It's probably less work for you because you're more familiar with the code, but I can probably manage....
I have a simple thing I want "done" with a timer, so I enabled GPT, and decided the simplest timer I could find would suffice..... I picked "TIM14". But I'm getting a bunch of compiler errors. As a test, I went to testhal/STM32/STM32F0xx/ADC, enabled GPT in halconf.h, and then enabled TIM1 in mcuconf.h. That compiles fine. Then I enabled TIM14 as well and:
Code: Select all
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c:379:2: error: #error "STM32_TIM14_HANDLER not defined"
#error "STM32_TIM14_HANDLER not defined"
^
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c: In function 'gpt_lld_start':
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c:660:7: warning: implicit declaration of function 'rccEnableTIM14' [-Wimplicit-function-declaration]
rccEnableTIM14(FALSE);
^
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c:661:7: warning: implicit declaration of function 'rccResetTIM14' [-Wimplicit-function-declaration]
rccResetTIM14();
^
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c:663:24: error: 'STM32_TIM14_NUMBER' undeclared (first use in this function)
nvicEnableVector(STM32_TIM14_NUMBER, STM32_GPT_TIM14_IRQ_PRIORITY);
^
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c:663:24: note: each undeclared identifier is reported only once for each function it appears in
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c: In function 'gpt_lld_stop':
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c:804:25: error: 'STM32_TIM14_NUMBER' undeclared (first use in this function)
nvicDisableVector(STM32_TIM14_NUMBER);
^
../../../../os/hal/ports/STM32/LLD/TIMv1/gpt_lld.c:806:7: warning: implicit declaration of function 'rccDisableTIM14' [-Wimplicit-function-declaration]
rccDisableTIM14(FALSE);
^Should I produce a patch? It's probably less work for you because you're more familiar with the code, but I can probably manage....