Welcome to the Accelstepper Forum!
When I know more, I can perhaps ask better questions, but here's a start.
- What driver board exactly are you using? The only reference I can find for "x42_v1.3" is in Chinese, which I cannot read.
- The comment in the code implies you are using an esp32. Correct? What version?
- Why are you using the FULL2WIRE and not the DRIVER interface type? Markings on the board show STP and DIR. You might try using this interface type.
- Are you using microstepping? If so, what ratio?
- Have you tried using lower step rates? You could try 2500 and even 250 and see if the problem persists.
I look forward to knowing more about your driver board, stepper motor, and microcontroller. In the mean time, try the things suggested and let me know what happens.
-jim