It is because during a change of direction, the signal on the DIR pin changes too quickly compared to the signal on the STEP pin. The driver does not yet take into account the change of direction and the first pulse is incorrect.
To fix the problem, you need to add a delay between the state change of the DIR pin and the pulse on the STEP pin.
It is because during a change of direction, the signal on the DIR pin changes too quickly compared to the signal on the STEP pin. The driver does not yet take into account the change of direction and the first pulse is incorrect. To fix the problem, you need to add a delay between the state change of the DIR pin and the pulse on the STEP pin.