Patent ID: 11336291

Abstract:
A semiconductor device has an A/D converter configured to convert an analog signal representing a current flowing in a control target into a digital signal, an overcurrent determination unit configured to, based on the analog signal, determine that an overcurrent has occurred in the control target when the current flowing in the control target has exceeded an overcurrent threshold, and determine that the overcurrent has not occurred in the control target when the current flowing in the control target has not exceeded the overcurrent threshold, a drive control signal generation unit configured to generate a drive control signal for controlling driving of the control target so that the current flowing in the control target is equal to a target current, based on a conversion result of the A/D converter, and generate the drive control signal to reduce the current flowing in the control target when the overcurrent determination unit determines that the overcurrent has occurred, and an overcurrent threshold setting unit configured to set the overcurrent threshold based on the conversion result of the A/D converter and the target current.