A device , comprising: an inductor (110, L) selectively coupled to an output and a power supply; a first transistor (102, M3) coupled between the power supply and the inductor; a second transistor (104, M4) coupled to the first transistor and between the inductor and a ground voltage; a first comparator configured to compare the voltage at the output and a reference voltage and convey a signal indicative of the comparison; a second comparator coupled between the second transistor and the ground voltage, configured to detect an amount of current flowing through the second transistor; and a controller configured to: detect an over-current event if an amount of current flowing from the power supply to the inductor is equal to or greater than a current threshold detect a low-voltage event if a voltage at the output is less than or equal to a reference voltage, and in response to the over-current event, switch off the first transistor and switch on the second transistor to prevent current from flowing from the power supply to the inductor; characterised in that the device further comprising: a third comparator configured to compare a current through the first transistor and a third transistor coupled to the first transistor, wherein the controller is further configured to receive an output of the third comparator to detect if the amount of current from the power supply to the inductor is equal to or greater than the current threshold. an inductor (110, L) selectively coupled to an output and a power supply; a first transistor (102, M3) coupled between the power supply and the inductor; a second transistor (104, M4) coupled to the first transistor and between the inductor and a ground voltage; a first comparator configured to compare the voltage at the output and a reference voltage and convey a signal indicative of the comparison; a second comparator coupled between the second transistor and the ground voltage, configured to detect an amount of current flowing through the second transistor; and a controller configured to: detect an over-current event if an amount of current flowing from the power supply to the inductor is equal to or greater than a current threshold detect a low-voltage event if a voltage at the output is less than or equal to a reference voltage, and in response to the over-current event, switch off the first transistor and switch on the second transistor to prevent current from flowing from the power supply to the inductor; detect an over-current event if an amount of current flowing from the power supply to the inductor is equal to or greater than a current threshold detect a low-voltage event if a voltage at the output is less than or equal to a reference voltage, and in response to the over-current event, switch off the first transistor and switch on the second transistor to prevent current from flowing from the power supply to the inductor; characterised in that the device further comprising: a third comparator configured to compare a current through the first transistor and a third transistor coupled to the first transistor, wherein the controller is further configured to receive an output of the third comparator to detect if the amount of current from the power supply to the inductor is equal to or greater than the current threshold. a third comparator configured to compare a current through the first transistor and a third transistor coupled to the first transistor, wherein the controller is further configured to receive an output of the third comparator to detect if the amount of current from the power supply to the inductor is equal to or greater than the current threshold. <EOS>