AnsweredAssumed Answered

how to transmit the CNT in interrupt upon encoder interface mode

Question asked by wu hui on Aug 29, 2017
Latest reply on Aug 29, 2017 by wu hui

hello:

i use the encoder in encoder interface mode of TIMER,it can read the CNT of TIM4  correctly in main ,but this is not my target. i want to get the CNT when the TIMER count up or count down, so it must in a interrupt.

so i enable the capture/compare mode of TIM4,but in the capture callbak function,the printed CNT is wrong。the wrong; the correct。 

now how can i transmit the CNT in interrupt upon encoder interface mode,i think the capture/compare mode is a wrong way.

Look forward to your reply

Outcomes