Square wave control is also called 6 step control.
Because In one electrical cycle there will be 6 switch status.
Every switch status will generate a vector torque force which can drive the motor to rotate.
In square wave control method, there are 2 key point to take control.
One is the switch status which correspond with the motor rotor positions. We can get that from Hall sensor or Back EMF signals.
The other one is the PWM driver duty which can control the torque force to target motor.
1