Extra quadrature encoder doesn't work if "MC_StartMotor1()" is executed
I set up a BLDC position control with NUCLEO-F446ZE and X-NUCLEO-IHM07M1. The BLDC motor has integrated rotary encoder, which is connected to X-NUCLEO-IHM07M1. To verify the accuracy of the integrated encoder, I set up an extra optical encoder, which is connected to NUCLEO-F446Ze Timer 4. Timer 4 is configured as encoder mode, see below, with GPIO PD12 (A), PD13(B) and PD14(Z).

Weird thing is that if I start the motor by command "MC_StartMotor1()", even if the motor is not moving, the reading value of TIM4->CNT keeps changing (cycles from 0 to 65535). If I stop the motor, the reading value of TIM4->CNT remains unchanged. Under this condition (motor state Idle), if I manually change the position, the reading value of TIM4->CNT changes accordingly and seems normal.
Anyone knows what happens there?
