A drive device for driving a power transistor, comprising: a plurality of registers each for holding a current value as a digital value; a variable current driver circuit (IDVC), to which the digital value of one of the plurality of registers is input, for driving the power transistor by drive current based on the digital value; a first detection circuit (TDET) for monitoring a voltage between terminals or a current between terminals of the power transistor in a switching period of the power transistor and detecting that the voltage between terminals or the current between terminals reaches a predetermined reference value; and a current switching circuit (ISWC) for selecting said one of the plurality of registers from the plurality of registers and switching the register to be selected using a detection result of the first detection circuit (TDET) as a trigger in the switching period, thereby making the drive current of the variable current driver circuit (IDVC) shift, wherein the first detection circuit (TDET) is adapted to detect at least one of a first voltage between terminals as a collector-emitter voltage or a drain-source voltage, a first current between terminals as a collector-emitter current or a drain-source current, and a second voltage between terminals as a gate-emitter voltage or a gate-source voltage in the power transistor, wherein the current switching circuit (ISWC) is adapted to select a first register included in the plurality of registers using a turn-on instruction of the power transistor from the outside as a trigger; and switch the register to be selected from the first register to a second register included in the plurality of registers using a detection result of a rise of the second voltage as the gate-emitter voltage between terminals to a reference or a rise start of the first current between terminals by the first detection circuit (TDET) as a trigger, and wherein the absolute value of a current value held in the second register is smaller than that of a current value held in the first register. a plurality of registers each for holding a current value as a digital value; a variable current driver circuit (IDVC), to which the digital value of one of the plurality of registers is input, for driving the power transistor by drive current based on the digital value; a first detection circuit (TDET) for monitoring a voltage between terminals or a current between terminals of the power transistor in a switching period of the power transistor and detecting that the voltage between terminals or the current between terminals reaches a predetermined reference value; and a current switching circuit (ISWC) for selecting said one of the plurality of registers from the plurality of registers and switching the register to be selected using a detection result of the first detection circuit (TDET) as a trigger in the switching period, thereby making the drive current of the variable current driver circuit (IDVC) shift, wherein the first detection circuit (TDET) is adapted to detect at least one of a first voltage between terminals as a collector-emitter voltage or a drain-source voltage, a first current between terminals as a collector-emitter current or a drain-source current, and a second voltage between terminals as a gate-emitter voltage or a gate-source voltage in the power transistor, wherein the current switching circuit (ISWC) is adapted to select a first register included in the plurality of registers using a turn-on instruction of the power transistor from the outside as a trigger; and switch the register to be selected from the first register to a second register included in the plurality of registers using a detection result of a rise of the second voltage as the gate-emitter voltage between terminals to a reference or a rise start of the first current between terminals by the first detection circuit (TDET) as a trigger, and wherein the absolute value of a current value held in the second register is smaller than that of a current value held in the first register.