Page 1 of 1
How many CCR Units need Chibios RT on STM32 (Q: TIM16,17 related)
Posted: Mon Jan 01, 2018 6:10 pm
by robert_o
In this post
http://www.chibios.com/forum/viewtopic.php?f=16&t=3875 it is said that the STM32 code for ChibiOS needs a comparator register. My question is: does it need just one and if that's the case is it possible to use TIM16,17 for the os, also how to implement TIM16/17 (i know about shared interrupts with TIM1).
Thank you.
Re: How many CCR Units need Chibios RT on STM32 (Q: TIM16,17 related)
Posted: Mon Jan 01, 2018 7:33 pm
by Giovanni
hi,
PWM just requires one channel, ICU two, GPT none.
The only issue are the shared IRQs.
Giovanni
Re: How many CCR Units need Chibios RT on STM32 (Q: TIM16,17 related)
Posted: Mon Jan 01, 2018 8:38 pm
by robert_o
I thought about the timer for the os (#define STM32_ST_USE_TIMER).
Re: How many CCR Units need Chibios RT on STM32 (Q: TIM16,17 related)
Posted: Mon Jan 01, 2018 10:46 pm
by Giovanni
Hi,
The OS timer needs one CCR.
Giovanni
Re: How many CCR Units need Chibios RT on STM32 (Q: TIM16,17 related)
Posted: Mon Jan 01, 2018 10:55 pm
by robert_o
Thank you. Could you please explain if there is a possibility to use TIM16 or 17 for the os. Both have one ccr and are 16bit. (I am using 32F100 Chip - there are no 32bit timers), and which files need changing.
Also is there a problem with the shared interrupt?
Thank you.
Re: How many CCR Units need Chibios RT on STM32 (Q: TIM16,17 related)
Posted: Mon Jan 01, 2018 11:06 pm
by Giovanni
Hi,
You need to change hal_st_lld.c and hal_st_lld.h. Shared interrupts are a problem if you try to activate the sharing timer with another driver, the ISR name would conflict and the result is a duplicated symbol during linking phase.
Giovanni