cancel
Showing results for 
Search instead for 
Did you mean: 

Prescaler Value for the Timer in Encoder mode

Neo M
Associate II
Posted on September 29, 2016 at 16:42

I am using TIM4 of STM32F767 in Encoder mode. The period is set to 1000. The CNT value changes as follows: 0->1000->1->1000->0 and so on. On monitoring the DIR bit, I found that it keeps oscillating between 0 and 1. Can someone help me with figuring out whats wrong?

UPDATE: The DIR bit oscillates irrespective of prescaler value. The CNT Value sometimes changes as 2->3->2->1. It depends on the value of DIR at that time. The DIR always goes 1-1-0-0-1-1-0-0...and so on

#stm32 #stm32f7-encoder-mode
0 REPLIES 0