Testing an h-bridge using the power supply and/or signal generator to control a DC motor
The difference between PH/EN mode and IN/IN mode can be understood by looking at the truth table given in the data sheet (pg 7). When Under IN/IN mode you are essentially controlling each output port individually. Hence energizing one output port and leaving the other open will operate the motor in a particular direction.

Under PH/EN mode what you are doing is allowing the logic circuit inside to control the direction of movement, instead of energizing and de-energizing each coil individually. Hence the truth table for PH/EN mode is much smaller. For driving a DC motor PH/EN mode is sufficient.

To check if the board is working Give VCC and ground as usual.

1) set mode to 1

2) AIN1 = 0

3) AIN2 = 1

4) nsleep = 1

With the motor connected across AOUT1 and AOUT2 the motor should run in the forward direction.

If you wish to provide PWM to control the speed of the motor send a pwm signal to AIN2 which is the enable pin (AIN2 is the phase/direction pin). By changing the Duty cycle you may vary the speed.

You can also confirm that this method works by looking at the timing diagram given in page 6.