Device for controlling the switching from a conducting state to a non conducting state or from a non conducting state to a conducting state of at least one semiconductor power (Q1a, Q1b) switch providing current to a load, the device receiving an input signal that is intended to drive the semiconductor power switch, wherein the device comprises: - means for determining a first and a second threshold (TH1, TH2) from a value of a power supply, the semiconductor power switch is connected to, - means for sensing the drain to source voltage of the semiconductor power switch when the semiconductor power switch switches from the conducting state to the non conducting state, - means for comparing, during the switching of the semiconductor power switch from the conducting state to the non conducting state, the drain to source voltage to the first threshold value, - means for combining the input signal with a voltage that is representative of the derivative of the drain to source voltage if the drain to source voltage is higher than the first threshold value, the means for combining the input signal and the voltage that is representative of the derivative of the drain to source voltage are adapted to drive the gate of the semiconductor power switch in order to limit the rate of change of the drain-source voltage, - means for sensing the drain to source voltage of the semiconductor power switch when the semiconductor power switch switches from the non conducting state to the conducting state, - means for comparing, during the switching of the semiconductor power switch from the non conducting state to the conducting state, the drain to source voltage to the second threshold value, - means for combining the input signal with a voltage that is representative of the derivative of the drain to source voltage if the drain to source voltage is lower than the second threshold value, the means for combining the input signal and the voltage that is representative of the derivative of the drain to source voltage are adapted to drive the gate of the semiconductor power switch in order to limit the rate of change of the drain-source voltage. - means for determining a first and a second threshold (TH1, TH2) from a value of a power supply, the semiconductor power switch is connected to, - means for sensing the drain to source voltage of the semiconductor power switch when the semiconductor power switch switches from the conducting state to the non conducting state, - means for comparing, during the switching of the semiconductor power switch from the conducting state to the non conducting state, the drain to source voltage to the first threshold value, - means for combining the input signal with a voltage that is representative of the derivative of the drain to source voltage if the drain to source voltage is higher than the first threshold value, the means for combining the input signal and the voltage that is representative of the derivative of the drain to source voltage are adapted to drive the gate of the semiconductor power switch in order to limit the rate of change of the drain-source voltage, - means for sensing the drain to source voltage of the semiconductor power switch when the semiconductor power switch switches from the non conducting state to the conducting state, - means for comparing, during the switching of the semiconductor power switch from the non conducting state to the conducting state, the drain to source voltage to the second threshold value, - means for combining the input signal with a voltage that is representative of the derivative of the drain to source voltage if the drain to source voltage is lower than the second threshold value, the means for combining the input signal and the voltage that is representative of the derivative of the drain to source voltage are adapted to drive the gate of the semiconductor power switch in order to limit the rate of change of the drain-source voltage.