If the motor is spinning and LD3 is OFF, the motor should be reversed. This can be done by swapping wires or, by writting to BLDC motor controller over I2c. This could be simply implemented in code, ...