To make sure it’s not my code, or connecting the wrong arduino pin is at fault, I even manually connected DIR to GND or +5V. But that still does not clearly define the direction.
By manually giving a short connection of DIR to HIGH/LOW, I sometimes manage to switch the direction - and it then just keeps turning that way.
All worked fine with an A4988. I then compared the wiring of the two.
After setting FAULT to HIGH (basically the same wiring as for the A4988) it worked.
I’m glad to hear your driver is working for you now. On our DRV8825 carrier, it should not be necessary to connect anything to the nFAULT pin if you have nRESET and nSLEEP tied high as recommended in our standard minimal wiring diagram (from the product page), which seems to match what your guide suggests:
However, as that product page explains, the board also includes circuitry that allows you to pull nSLEEP and nRESET up by tying them together and connecting a logic voltage to nFAULT instead, which makes it easier to use this board as a drop-in replacement for an A4988:
So if driving nFAULT high got your driver working, it’s possible there was an issue with the nRESET and/or nSLEEP connections in your original setup (although it’s not clear to me why that would have affected the behavior of the DIR pin only). If you are interested in troubleshooting that further, please post some pictures of your setup showing your driver and connections, and we can check if anything looks problematic.
I did have RESET and SLEEP directly connected to VDD.
So I am not sure what I could have gotten wrong on that end.
But on the other hand I could no longer reproduce the problem either.
RESET and SLEEP on VDD and not connecting FAULT works too, now.
The only difference I am aware of is that I adjusted the driver current.
Not sure how any of that would affect the DIR though.
Anyway - it might stay a mystery.