2016-05-29 08:42 PM
Hello, i am in the path of developing brush-less DC servo system for CNC mill,
Because i will use motor encoder, as well as position quadrature encoder, i need ability of hardware tracking step and dir impulses. It would be best to use signed counter, so my PID loop will be as efficiency as it can be and with no jitter.Basically i need 32b counter that counts external impulses with up/down mode selection by external pin. But it i was unable to find how to do that. Any idea how
? I really don't want to use interrupt on STEP pin, that will check direction and do cnt++ or cnt-- operation, that can be problem, when i get pulses at more than 100kHz2016-05-31 06:30 AM
Have a look at encoder mode with SMS= 001 or SMS=010.
2016-05-31 07:15 AM
Hi karpavicius.linas,
I recommend you to take a look on both following Timer examples in : -''TIM-Encoder'' at this path : stm32cubef4_1.11\STM32Cube_FW_F4_V1.12.0\Projects\STM324xG_EVAL\Examples\TIM\TIM_Encoder -''TIM_6Steps'' at this path: stm32cubef4_1.11\STM32Cube_FW_F4_V1.12.0\Projects\STM324xG_EVAL\Examples\TIM\TIM_6Steps -Hannibal-2016-06-01 09:30 PM
Thank you all, will try to explore that :)