Problem in arduino UNO while controlling BLDC motor

"I have used all the 12 pins of arduino (from 2 to 13)."
You still have 14 to 19 left as well (aka A0 to A5).

As AWOL indicates, not enough info provided. Post all your code, a schematic, the motor types used, and the power source for the motor.