Dagu 4 channel motor controller only runs forward

I've got a Dagu 4 channel motor controller that I'm using with a Rover 5 chassis all being controlled by a BeagleBone Back running Debian Wheezy from the SD card.

The controller receives 5v VCC from the BeagleBone and VBat is connected to the 6xAA that came with the chassis. Only one motor is connected with the PWM pin going to P9_14 (GPIO_40) and the DIR pin on P9_12 (GPIO_60).

When I do this sort of thing:

echo 1 > /sys/class/gpio/gpio60/value
echo 0 > /sys/devices/ocp.3/pwm_test_P9_14.18/polarity
echo 500000 > /sys/devices/ocp.3/pwm_test_P9_14.18/period
echo 500000 > /sys/devices/ocp.3/pwm_test_P9_14.18/duty

..then the motor turns at full speed as expected. When I then do this:

echo 0 > /sys/class/gpio/gpio60/value

Instead of reversing direction, the motor stops dead.

The weird thing is when I hook the whole thing up to an Arduino the motors run in both directions ok so the hardware is not faulty.

Does anyone have any ideas what I could be doing wrong on the BeagleBone?

Thanks in advance.

I can only ask,
what about changing the polarity? You might want to make sure the motor has stopped before sending it a full speed reverse command. I will confess that my BBB is still waiting for me to really dig in to it, but, when I do, I will likely use python to actuate things in the real world.

Reverse the polarity? Dr

Reverse the polarity?  Dr Who fan?  ;)  All that does is mean that 0 becomes 100% for the duty cycle instead of 0%.

I’m actually using JavaScript to do it, but these wrapper libraries (PyBBIO included) all seem to use sysfs behind the scenes.

Apparently you can see some massive performance gains by using /dev/mem instead but it’s yet to become a problem for me.