weenyPRU icon indicating copy to clipboard operation
weenyPRU copied to clipboard

Lathe spindle hardware quadrature encoder ?

Open tuxcnc opened this issue 6 months ago • 0 comments

The STM32F103C8T6 has 3 counters capable for hardware quadrature encoders. I found all are used.

extern TIM_HandleTypeDef htim1; // spindle PWM extern TIM_HandleTypeDef htim2; // timer compare used to reset step pins after step, all 4 channels extern TIM_HandleTypeDef htim3; // servo thread 1kHz extern TIM_HandleTypeDef htim4; // base thread 50kHz

But... The servo_thread is 50*base_thread, so it can be service by one timer, I suppose.

Is it possible to free one timer and use it for hardware quadrature encoder ?

tuxcnc avatar Aug 24 '24 16:08 tuxcnc