A charging device with boundary mode control is disclosed. The charging
device includes a transformer, a power switch, a detection circuit and a
pulse-width modulation (PWM) controller. The power switch is electrically
connected to one end of a primary-side winding of the transformer. The
detection circuit is electrically connected to the primary-side winding
and the power switch. The detection circuit detects the resonance of the
parasitic capacitance of the power switch, thereby generating a detection
signal for boundary mode control. The PWM controller generates a
pulse-width modulation signal for driving the power switch, and turns on
the power switch according to the detection signal.