How to control direction of brushed dc motor using apm 2.8 and mission planner

I want to control the direction of a brushed dc motor using a motor driver. I have connected it to APM 2.8. The direction pin of the motor driver is connected to a relay pin(A9) and the PWM pin is connected to output signal 1. But, I am not able to make it work. Can someone please help me with this issue? It will be a great help. Thank you.