STM32F105RBT6 timer resolution for thickless mode

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
Debbio
Posts: 16
Joined: Fri Jan 11, 2013 10:42 am

STM32F105RBT6 timer resolution for thickless mode

Post 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 ?
Debbio
Posts: 16
Joined: Fri Jan 11, 2013 10:42 am

Re: STM32F105RBT6 timer resolution for thickless mode

Post by Debbio »

Anyone ?
I depicted something really uncorrect ?
There is a reference in another thread?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F105RBT6 timer resolution for thickless mode

Post 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
Debbio
Posts: 16
Joined: Fri Jan 11, 2013 10:42 am

Re: STM32F105RBT6 timer resolution for thickless mode

Post by Debbio »

Ok Giovanni..
BTW TIM5 16 bit should be ok for system timer.
Have a nice weekend ( it is not an urgent task )
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F105RBT6 timer resolution for thickless mode

Post by Giovanni »

Hi,

All fixed, it was a copy/paste error.

Giovanni
Post Reply