cancel
Showing results for 
Search instead for 
Did you mean: 

Correct use of UIF flag for counting internal clock cycles

Onkar Chincholkar
Associate II
Posted on January 19, 2018 at 12:10

I am writing a simple timer1 based counter derived from internal clock

As soon as TIMx->CR1 |= TIM_CR1_CEN; is executed the counter is overwritten to 0(irrespective of any value stored in CEN register, if it is written) and as soon as CEN == 0 the update interrupt flag UIF goes high.

For such functionality what is the use of UIF flag or how can we use the UIF flag?

Controller used - STM32F051R8T6(Discovery board)

IDE used - Attolic truestudio

Thanks for patient reading

Regards

Onkar

#stm32f0-counter
1 REPLY 1
Andrew Neil
Chief II
Posted on January 19, 2018 at 12:29

Duplicate:

https://community.st.com/0D50X00009XkWrHSAV