A switching power supply comprising: a switch switching at a switching frequency, the switch having an input terminal for coupling to an input voltage (V in); an inductor having a first terminal coupled to an output terminal of the switch so as to conduct current to a second terminal of the inductor during an on-time of the switch, current through the inductor ramping up during the on-time of the switch, current through the inductor having a low frequency DC component and a higher frequency AC component; a current detection circuit for detecting the current through the inductor comprising: a first detection circuit generating a first voltage signal (V sen) corresponding to the AC component of current through the inductor, the first detection circuit configured to process the AC component to increase a signal-to-noise ratio in the AC component; a second detection circuit generating a second voltage signal (V sen) corresponding to the DC component of current through the inductor, the second detection circuit configured to filter switching noise from the DC component to reduce the switching noise in the DC component; and a summing circuit summing the first voltage signal (V sen) and the second voltage(V sen) signal to generate a third voltage signal(V sen) corresponding to the current through the inductor; and a pulse width modulation, PWM, comparator comparing the third voltage signal (V sen) to a control voltage (V C), corresponding to an output voltage (V O) of the power supply, to control a peak current through the inductor, an output of the PWM comparator triggering when the third voltage signal (V sen) approximately equals the control voltage (V C) for controlling a duty-cycle of the switch to generate a regulated output voltage (V O) of the power supply. a switch switching at a switching frequency, the switch having an input terminal for coupling to an input voltage (V in); an inductor having a first terminal coupled to an output terminal of the switch so as to conduct current to a second terminal of the inductor during an on-time of the switch, current through the inductor ramping up during the on-time of the switch, current through the inductor having a low frequency DC component and a higher frequency AC component; a current detection circuit for detecting the current through the inductor comprising: a first detection circuit generating a first voltage signal (V sen) corresponding to the AC component of current through the inductor, the first detection circuit configured to process the AC component to increase a signal-to-noise ratio in the AC component; a second detection circuit generating a second voltage signal (V sen) corresponding to the DC component of current through the inductor, the second detection circuit configured to filter switching noise from the DC component to reduce the switching noise in the DC component; and a summing circuit summing the first voltage signal (V sen) and the second voltage(V sen) signal to generate a third voltage signal(V sen) corresponding to the current through the inductor; and a first detection circuit generating a first voltage signal (V sen) corresponding to the AC component of current through the inductor, the first detection circuit configured to process the AC component to increase a signal-to-noise ratio in the AC component; a second detection circuit generating a second voltage signal (V sen) corresponding to the DC component of current through the inductor, the second detection circuit configured to filter switching noise from the DC component to reduce the switching noise in the DC component; and a summing circuit summing the first voltage signal (V sen) and the second voltage(V sen) signal to generate a third voltage signal(V sen) corresponding to the current through the inductor; and a pulse width modulation, PWM, comparator comparing the third voltage signal (V sen) to a control voltage (V C), corresponding to an output voltage (V O) of the power supply, to control a peak current through the inductor, an output of the PWM comparator triggering when the third voltage signal (V sen) approximately equals the control voltage (V C) for controlling a duty-cycle of the switch to generate a regulated output voltage (V O) of the power supply.