Page 1 of 1

STM32F105RBT6 timer resolution for thickless mode

Posted: Tue Jun 30, 2015 5:23 pm
by Debbio
Good evening!
Free running mode starts with general purpose Timer 2 as timer for system timing..
st_lld.c reports a section where timer resolution capabilities are checked

Code: Select all

#if STM32_ST_USE_TIMER == 2
#if (OSAL_ST_RESOLUTION == 32) && !STM32_TIM2_IS_32BITS
#error "TIM2 is not a 32bits timer"
#endif

According to datasheets tim2 to tim5 are 16 bits , but under stm32_registry.h i found

Code: Select all

#define STM32_TIM2_IS_32BITS                TRUE

Is that correct ??

I noticed the mismatch when i tryied to substitute TIM2 with TIM5 , i need TIM2 free for a pwm..
Is this chip STM32F10X_CL ?
According to datasheet for 105/107 TIM2 could not be used as timer for free running ? the same for TIM5 ?
The system seems run stable with TIM2 free running.. is TIM5 16 or 32 bits for this particular device ?
Is there any viable TIM to substitute TIM2 for th system timing in my case ?

Re: STM32F105RBT6 timer resolution for thickless mode

Posted: Wed Jul 01, 2015 9:19 pm
by Debbio
Anyone ?
I depicted something really uncorrect ?
There is a reference in another thread?

Re: STM32F105RBT6 timer resolution for thickless mode

Posted: Wed Jul 01, 2015 9:26 pm
by Giovanni
Hi,

I took note, I will verify ASAP (weekend likely).

On the F1 timers should be all 16 bits so it is likely an error. You can run in tickless mode even using 16 bits timers, just configure chconf.h for that.

Giovanni

Re: STM32F105RBT6 timer resolution for thickless mode

Posted: Thu Jul 02, 2015 2:52 pm
by Debbio
Ok Giovanni..
BTW TIM5 16 bit should be ok for system timer.
Have a nice weekend ( it is not an urgent task )

Re: STM32F105RBT6 timer resolution for thickless mode

Posted: Sat Jul 04, 2015 8:12 am
by Giovanni
Hi,

All fixed, it was a copy/paste error.

Giovanni