A circuit for protection of an external power switch in a switch mode power supply, SMPS, the circuit comprising: a variable resistor ; a switch coupled to the variable resistor in series, wherein: a first end of the series combination of the variable resistor and the switch is connected to a connection point; and the other end of the series combination of the variable resistor and the switch is connected to a first pin ; a fixed value resistor coupled between the connection point and a second pin ; and a comparator comprising: a first input coupled to the connection point; and a second input connectable to a source of the external power switch ; wherein the comparator is configured to, when the circuit is connected to the SMPS: compare a voltage at the first input with a voltage at the second input when the external power switch is in ON state in order to output a signal to indicate an overtemperature of the external power switch based on the comparison, wherein the circuit is couplable to the SMPS such that the variable resistor , the fixed value resistor , the external power switch and a resistor of the SMPS form a Wheatstone bridge as follows: the resistor of the SMPS is coupled between the second pin and the source of the external power switch ; and the ON-state resistance of the external power switch is connected between: i) the terminal of the resistor of the SMPS that is not connected to the second pin ; and ii) the first pin . a variable resistor ; a switch coupled to the variable resistor in series, wherein: a first end of the series combination of the variable resistor and the switch is connected to a connection point; and the other end of the series combination of the variable resistor and the switch is connected to a first pin ; a fixed value resistor coupled between the connection point and a second pin ; and a comparator comprising: a first input coupled to the connection point; and a second input connectable to a source of the external power switch ; a first input coupled to the connection point; and a second input connectable to a source of the external power switch ; wherein the comparator is configured to, when the circuit is connected to the SMPS: compare a voltage at the first input with a voltage at the second input when the external power switch is in ON state in order to output a signal to indicate an overtemperature of the external power switch based on the comparison, wherein the circuit is couplable to the SMPS such that the variable resistor , the fixed value resistor , the external power switch and a resistor of the SMPS form a Wheatstone bridge as follows: the resistor of the SMPS is coupled between the second pin and the source of the external power switch ; and the ON-state resistance of the external power switch is connected between: i) the terminal of the resistor of the SMPS that is not connected to the second pin ; and ii) the first pin . the resistor of the SMPS is coupled between the second pin and the source of the external power switch ; and the ON-state resistance of the external power switch is connected between: i) the terminal of the resistor of the SMPS that is not connected to the second pin ; and ii) the first pin . <EOS>