A circuit comprising: a supply voltage input for receiving a supply voltage (V IN); a drive output; a driver stage having an input and further having an output for a drive signal that can drive an external load, in particular a LED flash component, connected to the drive output; a control circuit having a first input and an output for a control signal generated by the control circuit, the control circuit and the driver stage connected together to define a control loop, wherein the output of the driver stage is connected to the first input of the control circuit and the output of the control circuit is connected to the input of the driver stage; and a headroom sensing circuit having an output for a headroom signal (HDRM_out) representative of a difference between the supply voltage (V IN) and a voltage at the drive output of the circuit, the control circuit having a second input connected to the output of the headroom sensing circuit, wherein a response characteristic of the control loop is set based on the headroom signal (HDRM_out) received from the headroom sensing circuit, characterized in that the circuit further comprising a load sensing circuit having an output for a load signal (Ld_sns_out) representative of an electrical loading on the circuit, the control circuit further having a third input connected to the output of the load sensing circuit, wherein the response characteristic of the control loop is further set based on the load signal received from the load sensing circuit; wherein the control circuit comprises an amplifier stage and a compensation network, wherein the compensation network comprises a capacitor (C c2) having a selectable capacitance set by the headroom signal (HDRM out), wherein the setting of the capacitor (C c2) varies a bandwidth of the control circuit. a supply voltage input for receiving a supply voltage (V IN); a drive output; a driver stage having an input and further having an output for a drive signal that can drive an external load, in particular a LED flash component, connected to the drive output; a control circuit having a first input and an output for a control signal generated by the control circuit, the control circuit and the driver stage connected together to define a control loop, wherein the output of the driver stage is connected to the first input of the control circuit and the output of the control circuit is connected to the input of the driver stage; and a headroom sensing circuit having an output for a headroom signal (HDRM_out) representative of a difference between the supply voltage (V IN) and a voltage at the drive output of the circuit, the control circuit having a second input connected to the output of the headroom sensing circuit, wherein a response characteristic of the control loop is set based on the headroom signal (HDRM_out) received from the headroom sensing circuit, characterized in that the circuit further comprising a load sensing circuit having an output for a load signal (Ld_sns_out) representative of an electrical loading on the circuit, the control circuit further having a third input connected to the output of the load sensing circuit, wherein the response characteristic of the control loop is further set based on the load signal received from the load sensing circuit; wherein the control circuit comprises an amplifier stage and a compensation network, wherein the compensation network comprises a capacitor (C c2) having a selectable capacitance set by the headroom signal (HDRM out), wherein the setting of the capacitor (C c2) varies a bandwidth of the control circuit.