cancel
Showing results for 
Search instead for 
Did you mean: 

Update ARR value when timer is enable ?

hazall
Associate III

I want to update ARR new value when timer eneble(counter is counting). What can I do to update it quickly without time latency (like setting the UG bit) ? I am using stm32f0.

1 REPLY 1

Don't set TIMx_CR1.ARPE.

Be warned, that if you set ARR to value below CNT, in that cycle CNT will count up to the maximum for given timer (i.e. 0xffff for 16-bit timer or 0xffffffff for 32-bit timer) (purpose of ARR preload is exactly to prevent this).

JW