Patent ID: 8539273

Claim:
An electronic device, comprising: a central processing unit (CPU), wherein the CPU comprises a first pin and a second pin; and a microcontroller (MCU), wherein the MCU sets power of the first pin and the second pin to a low voltage level and thereby stops supplying power to the CPU when the CPU enters a sleep mode, the MCU is operable to wake up the CPU from the sleep mode according to a determination that a charger device is inserted into the electronic device, the determination being according to whether power is supplied from the charger device, and when the MCU determines that the charger device is inserted into the electronic device, the MCU sets the power of the first pin and the second pin to a high voltage level and thereby starts to supply power to the CPU to wake up the CPU; wherein after the CPU wakes up, the CPU detects a type of the charger device, and adjusts charging current from the charger device to the electronic device.