I use an MT6701 magnetic rotary sensor mounted on the motor shaft, running in AB[Z] mode. This is used to measure the angle of the motor, and generate the correct PWM signals for the three motor coils. My inner current-control loop runs at 15kHz, using a PI controller.