Code to reverse BDC motor using Allegro A4963 controller

We are having a challenge finding the correct bit code to reverse a BDC motor using the A4963 controller.

My software engineer has tried several sequences, and can get the motor to stop and go, but not reverse!

Has anyone else used the A4963 to run a BDC motor in two directions?

If so, what’s the magic code sequence?

Here is information out of the data sheet.
The DIR bit determines the direction of rotation. Forward is
defined as DIR = 0, and the phase state sequence increments as
defined in Table 1. Reverse is when DIR = 1, and the phase state
sequence decrements.The BRK bit can be set to apply an electrodynamic brake which will decelerate a rotating motor. It will
also provide some holding torque for a stationary motor. When
RUN = 1, BRK = 1, and the PWM is inactive for longer than the
PWM brake time, all low-side MOSFETs will be turned on, and
all high-side MOSFETs turned off, effectively applying a short
between the motor windings. This allows the reverse voltage
generated by the rotation of the motor (motor bemf) to set up a
current in the motor phase windings that will produce a braking torque. This braking torque will always oppose the direction
of rotation of the motor. The strength of the braking or holding
torque will depend on the motor parameters. No commutation
takes place during braking, and no current control is available.
Care must be taken to ensure that the braking current does not
exceed the capability of the low-side MOSFETs.
There are three motor control methods included in the A4963.
These are:
• open-loop speed (voltage) control
• closed-loop torque (current) control
• closed-loop speed control
In addition, the open-loop speed control can be regulated using
direct or indirect PWM duty cycle control.

Thank you John!

We attempted to write a bit sequence with the DIR=0 and DIR=1 but the reverse still did not work. We tried several other variations of RUN bits, with no luck either. We will take a closer look at the data sheet info., but sure could use some example code to confirm reverse sequence. Thanks again for looking into this for us!