AnsweredAssumed Answered

setting up counter of the quadrature decoder in software

Question asked by Alexey Usoltsev on Dec 2, 2015
Latest reply on Dec 8, 2015 by Alexey Usoltsev

Hi guys!

I've got an issue. I want to set up CNT value in the code. And now I can't get the CNT of QD to be certain value  after initialization. If i write something to it - nothing changes. I've tryed to set CNINT value and after initialization change it. It leads to immediate change to CNTINT after i synchronize CNTINT buffer.

FTM_HAL_SetCounterInitVal(FTM1_BASE_PTR,2550); (previously set to 4000)

FTM_HAL_SetSoftwareTriggerCmd(FTM1,true);

(synchronization by software is setted up in the initialisation block)

 

The problem is that CNT value rules my PWM on the other channel and it is not safe to start from CNTINT and need to be started more like from MOD value.

 

Any ideas?

 

Best regards,

Alexey.

Outcomes