AnsweredAssumed Answered

timer problem at low period value

Question asked by ionut.fasola on Mar 21, 2016
Latest reply on Mar 22, 2016 by Clive One
MCU: STM32F100C6T6 ; clocks: 12MHz external
sysclk=hclk=pclk1=pclk2=12MHz

I have configured TIM16 as follow

     TIM_TimeBaseStructure3.TIM_Period = 5;//
     TIM_TimeBaseStructure3.TIM_Prescaler = 12-1;//
     TIM_TimeBaseStructure3.TIM_ClockDivision = 0;
     TIM_TimeBaseStructure3.TIM_CounterMode = TIM_CounterMode_Up;
     TIM_TimeBaseInit(TIM16, &TIM_TimeBaseStructure3);

in TIM16 interrupt a GPIO pin is toggled. 

It seems i can't get on scope waveforms smaller than ~ 20 microseconds, i was expecting 5 microseconds
But if i put Period=100 ( ARR register) i get 100 microseconds as expected; the period seems to the right one for period values bigger than the prescaler. value

Are there problems with timers at low period value

Outcomes