Patent ID: 7602595

Claim:
A semiconductor device comprising: a switching element having a sense terminal and that outputs at the sense terminal a sense current, in shunt and at a fixed ratio of a main current flowing in said switching element; a sense resistor having a first end connected to said sense terminal and a second end that is grounded; a correction current generating circuit that supplies and extracts a correction current at the first end of said sense resistor; an overcurrent protective circuit that receives a sense voltage generated when the sense current and the correction current flow through said sense resistor, and outputs a stop signal when the sense voltage is larger than a reference voltage; a driving circuit that stops driving said switching element when the stop signal is received from said overcurrent protective circuit; and a temperature sensor measuring temperature of said switching element, wherein said correction current generating circuit increases or decreases the correction current so that the correction current is proportional to the temperature of said switching element that is sensed by said temperature sensor.