Patent ID: 9672048
Date: 2017-06-06
CPC Classifications: G06F

Claim:
1. An electronic apparatus, comprising: a processing unit, executing an operating system; a timer, coupled to the processing unit; and a basic input/output system unit, coupled to the processing unit, wherein when the operating system executed by the processing unit is in a work state, and a sleep signal is received, the processing unit stores a flag to a storage unit, and controls the operating system to enter a sleep state, wherein when the operating system executed by the processing unit is in the sleep state, and the processing unit receives a wake-up signal, the processing unit extracts a first program code from the basic input/output system unit to execute a wake-up procedure to switch the operating system from the sleep state to the work state, wherein when the processing unit executes the wake-up procedure through the basic input/output system unit and determines that the storage unit stores the flag, the processing unit controls the timer to start a first timing procedure during the wake-up procedure, wherein when the processing unit determines that a timing value of the first timing procedure exceeds a first time threshold and the operating system fails to switch from the sleep state to the work state, the processing unit executes a reset procedure through the basic input/output system unit, wherein when the processing unit determines that the timing value of the first timing procedure does not exceeds the first time threshold and the operating system successfully switches from the sleep state to the work state, the processing unit clears the flag stored in the storage unit.