cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a better way to handle a quadrature encoder Z phase signal than using external interrupts??

Tonypan
Associate II

When use G Series MCUs to implement an quadrature encoder interface.

i can't select Slave mode(Reset mode) while selected the Encoder Mode.

:sad_but_relieved_face:

2 REPLIES 2

Encoder mode utilizes the slave-mode controller, which can have only one function at a time, i.e. it cannot simultaneously be in reset mode. Read the TIM chapter in RM.

> Is there a better way to handle a quadrature encoder Z phase signal than using external interrupts??

What is "better"?

You can for example arrange for DMA being triggered from the zeroing input (either traditionally through some other TIM, or directly through EXTI if the given STM32's DMAMUX allows it), to transfer a zero from memory to TIMx_CNT.

JW

😁

If there are many interrupts in the system with different priorities, there may be a delay in clearing with external interrupts. So what I mean is that the mechanism can directly trigger counter reset without MCU instruction will be better.

I don't understand the technology of DMAMUX. I'll go to the datasheet first