A magnetic field sensor, comprising: a plurality of magnetic field sensing elements (30a-30h), each configured to generate a respective magnetic field sensing element output signal responsive to a magnetic field, wherein the magnetic field sensing element output signals form a measured magnetic field signal having a phase indicative of an angle of the magnetic field; and a phase-locked loop coupled to receive the measured magnetic field signal and configured to generate an angle signal having a value proportional to the angle of the magnetic field, wherein the phase-locked loop is responsive to a clock signal having a frequency related to a frequency of the measured magnetic field signal, wherein the phase-locked loop comprises: a phase detector having a first input responsive to the measured magnetic field signal and a second input responsive to a feedback signal having a respective phase, wherein the phase detector is configured to compare the phase of the measured magnetic field signal and the phase of the feedback signal to generate a difference signal indicative of a difference between the phase of the measured magnetic field signal and the phase of the feedback signal; and an oscillator responsive to the angle signal to generate the feedback signal, wherein the feedback signal has a phase that minimizes the difference signal. a plurality of magnetic field sensing elements (30a-30h), each configured to generate a respective magnetic field sensing element output signal responsive to a magnetic field, wherein the magnetic field sensing element output signals form a measured magnetic field signal having a phase indicative of an angle of the magnetic field; and a phase-locked loop coupled to receive the measured magnetic field signal and configured to generate an angle signal having a value proportional to the angle of the magnetic field, wherein the phase-locked loop is responsive to a clock signal having a frequency related to a frequency of the measured magnetic field signal, wherein the phase-locked loop comprises: a phase detector having a first input responsive to the measured magnetic field signal and a second input responsive to a feedback signal having a respective phase, wherein the phase detector is configured to compare the phase of the measured magnetic field signal and the phase of the feedback signal to generate a difference signal indicative of a difference between the phase of the measured magnetic field signal and the phase of the feedback signal; and an oscillator responsive to the angle signal to generate the feedback signal, wherein the feedback signal has a phase that minimizes the difference signal. a phase detector having a first input responsive to the measured magnetic field signal and a second input responsive to a feedback signal having a respective phase, wherein the phase detector is configured to compare the phase of the measured magnetic field signal and the phase of the feedback signal to generate a difference signal indicative of a difference between the phase of the measured magnetic field signal and the phase of the feedback signal; and an oscillator responsive to the angle signal to generate the feedback signal, wherein the feedback signal has a phase that minimizes the difference signal.