I've tried troubleshooting the driver pin by pin and i noticed something.
The motor direction is controlled by the Dir pin on the driver. This driver pin is in turn controlled through DIO of my DAQ card. For me to turn in the 'noisy' direction, my pin has to be pulled LOW. When i tried connecting this pin directly to D Gnd, the noise stops and the motor runs smoothly.
This is kinda wierd, so i tried probing my original DIO pin which controls the Dir signal with HIGH and LOW and everything seems ok, high is 5 and low is 0. I tried swapping with other DIO pins, and it's still the same.
Is there some way to rectify this? Is my LOW not 'low' enough?