A voltage regulator comprising: at least one power switch (12, 14) adapted to convey power between respective input and output terminals of said voltage regulator; and a digital controller adapted to control operation of said at least one power switch (12, 14) responsive to an output of said voltage regulator, said digital controller comprising: a first digital control loop including a first analog-to-digital converter providing a first digital error signal representing a difference between a first output measurement of said voltage regulator and an analog version of a digital reference value, a first digital filter providing a digital control output based on said first digital error signal, and a digital pulse width modulator providing a control signal to said at least one power switch (12, 14), said control signal having a pulse width corresponding to said digital control output; and a second digital control loop including a second analog-to-digital converter providing a second output measurement of said voltage regulator, said second digital control loop providing a second digital error signal representing a difference between said second output measurement and said digital reference value, said second analog-to-digital converter having greater resolution than said first analog-to-digital converter, said second digital error signal passing through a second digital filter (74, 104), said output of said second digital filter (74, 104) being used to adjust one of said digital reference value and said first output measurement. at least one power switch (12, 14) adapted to convey power between respective input and output terminals of said voltage regulator; and a digital controller adapted to control operation of said at least one power switch (12, 14) responsive to an output of said voltage regulator, said digital controller comprising: a first digital control loop including a first analog-to-digital converter providing a first digital error signal representing a difference between a first output measurement of said voltage regulator and an analog version of a digital reference value, a first digital filter providing a digital control output based on said first digital error signal, and a digital pulse width modulator providing a control signal to said at least one power switch (12, 14), said control signal having a pulse width corresponding to said digital control output; and a second digital control loop including a second analog-to-digital converter providing a second output measurement of said voltage regulator, said second digital control loop providing a second digital error signal representing a difference between said second output measurement and said digital reference value, said second analog-to-digital converter having greater resolution than said first analog-to-digital converter, said second digital error signal passing through a second digital filter (74, 104), said output of said second digital filter (74, 104) being used to adjust one of said digital reference value and said first output measurement. a first digital control loop including a first analog-to-digital converter providing a first digital error signal representing a difference between a first output measurement of said voltage regulator and an analog version of a digital reference value, a first digital filter providing a digital control output based on said first digital error signal, and a digital pulse width modulator providing a control signal to said at least one power switch (12, 14), said control signal having a pulse width corresponding to said digital control output; and a second digital control loop including a second analog-to-digital converter providing a second output measurement of said voltage regulator, said second digital control loop providing a second digital error signal representing a difference between said second output measurement and said digital reference value, said second analog-to-digital converter having greater resolution than said first analog-to-digital converter, said second digital error signal passing through a second digital filter (74, 104), said output of said second digital filter (74, 104) being used to adjust one of said digital reference value and said first output measurement.