CN101321305B - Method for positioning mobile phone power on/off failure by using real-time clock - Google Patents

Method for positioning mobile phone power on/off failure by using real-time clock Download PDF

Info

Publication number
CN101321305B
CN101321305B CN2008100685323A CN200810068532A CN101321305B CN 101321305 B CN101321305 B CN 101321305B CN 2008100685323 A CN2008100685323 A CN 2008100685323A CN 200810068532 A CN200810068532 A CN 200810068532A CN 101321305 B CN101321305 B CN 101321305B
Authority
CN
China
Prior art keywords
close
machine open
real
time clock
fault location
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2008100685323A
Other languages
Chinese (zh)
Other versions
CN101321305A (en
Inventor
黄伟
周永喜
王涛
时慧钦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2008100685323A priority Critical patent/CN101321305B/en
Publication of CN101321305A publication Critical patent/CN101321305A/en
Application granted granted Critical
Publication of CN101321305B publication Critical patent/CN101321305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method for positioning a start-up/shut-down fault of a cell phone by using a clock. The invention is characterized in that the method comprises an initialization process and a fault positioning process; the initialization process is to store a delay time for start-up/shut-down into a non-volatile memory and initialize a clock when the cell phone is in idle state; the fault positioning process is a circular process comprising a shut-down process and a start-up process. The invention needs no modification to circuit of hardware and has low cost. The invention may be performed on all cell phones with a RTC clock; the invention is simple, reliable and fast, and is capable of recording related debugging information of start-up/shut-down so as to positioning a start-up/shut-down fault through inquiring the related debugging information.

Description

A kind of method of using the real-time clock positioning mobile phone power on/off failure
Technical field
The present invention relates to a kind of method of positioning mobile phone power on/off failure, relate in particular to the method for a kind of use RTC (RealTime Clock, real-time clock) technological orientation mobile phone power on/off failure.
Background technology
Now, mobile phone has been indispensable articles for daily use during people live, and the fault of mobile phone power on/off is very big to customer impact.According to statistics, what the mobile phone probability of malfunction was the highest is exactly power on/off failure, comprises that deadlocks of when start, machine open/close display abnormality, start can't be conversed, deadlock etc. when shutting down.How locating power on/off failure fast, and solve power on/off failure, is urgent problem.The method of taking at present is to utilize manually to carry out the machine open/close operation by the POWER key, because the fault of machine open/close occurs at random, manually carry out the machine open/close method of operating and be difficult to reappear fault, also can not get needed fault message power on/off failure is analyzed by the POWER key.
Industry automatic switching way commonly used at present is to use mechanical mode to transform by the POWER key or to mobile phone hardware, uses the method control POWER key of circuit.
Use mechanical mode press the POWER key, must complicated anchor clamps, realize complexity, be about to be eliminated.
Use circuit control mode, periodically make the pin of mobile phone internal control handset switch machine be the high-low level variation, realize the repeated switching of mobile phone.This kind mode comprises periodic signal generation module and cable module, and periodic signal generation module provides periodically high-low level signal by cable module to the pin of control handset switch machine, realizes the repeated switching cell-phone function.This method is controlled by circuit, reliability is than higher, but following shortcoming is arranged: 1, provide the switching on and shutting down signal owing to must add external circuits, interface must be provided on mobile phone, pin to switching on and shutting down is controlled, this need revise hardware designs, and can bring influence to performances such as electrostatic defendings, and is very inconvenient; 2, because each mobile phone must be connected to signal generating module by a cable, must increase cost and loss, and can't recording-related information after the reproduction fault.
Summary of the invention
The object of the present invention is to provide a kind of method of using the real-time clock positioning mobile phone power on/off failure, need revise hardware, can not write down the technical problem of relevant power on/off failure information with automatic switching in the solution prior art.
For solving the problems of the technologies described above, the technical solution used in the present invention is: a kind of method of using the real-time clock positioning mobile phone power on/off failure, it is characterized in that this method comprises initialization procedure and fault location process,
Described initialization procedure is: when mobile phone enters idle condition, the machine open/close delay time is stored in the nonvolatile memory into the initialization real-time clock;
Described fault location process is a cyclic process, comprises shutdown process and start process,
Described shutdown process: when the real-time clock timing to the interruption unused time that obtains according to described machine open/close delay time, the Debugging message of fault location be used for before the record shutdown in described nonvolatile memory, the real-time clock reclocking is set real-time clock according to described machine open/close delay time and is interrupted shutting down after the available machine time;
Described start process: when the described interruption available machine time is arrived in the real-time clock timing, mobile phone powers on after the start, the Debugging message of fault location be used for before the record start in described nonvolatile memory, the real-time clock reclocking, set real-time clock after the interruption unused time according to described machine open/close delay time, wait for that the real-time clock timing is to interrupting carrying out shutdown process after the unused time;
The termination condition of described fault location process comprises: when being used for being used for before the Debugging message of fault location or the start Debugging message of fault location before repeating to shut down, close real-time clock, finish the fault location process.
Preferably, in the initialization procedure, when mobile phone enters idle condition, also machine open/close preset times, machine open/close total degree are stored in the described nonvolatile memory.
Preferably, in the start process, before the real-time clock reclocking, described machine open/close total degree and described machine open/close preset times are compared, if deposit in the described nonvolatile memory after described machine open/close total degree less than described machine open/close preset times, then adds up described machine open/close total degree;
The termination condition of described fault location process also comprises: if described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
Preferably, in the start process, before the real-time clock reclocking, the described machine open/close total degree back of adding up is compared with described machine open/close preset times, if the machine open/close total degree after described machine open/close total degree less than described machine open/close preset times, then will add up deposits in the described nonvolatile memory;
The termination condition of described fault location process also comprises: if described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
Preferably, in the initialization procedure, when mobile phone enters idle condition, also the fault message of setting is stored in the described nonvolatile memory.
Preferably, the termination condition of described fault location process also comprises: when being used for being used for before the Debugging message of fault location or the start fault message of Debugging message and setting of fault location before the shutdown when identical, close real-time clock, end fault location process.
Preferably, in the initialization procedure, when mobile phone enters idle condition, machine open/close preset times, machine open/close total degree are stored in the described nonvolatile memory, also the fault message of setting is stored in the described nonvolatile memory.
Preferably, in the start process, before the real-time clock reclocking, described machine open/close total degree and described machine open/close preset times are compared, if deposit in the described nonvolatile memory after described machine open/close total degree less than described machine open/close preset times, then adds up described machine open/close total degree;
The termination condition of described fault location process also comprises:
When being used for being used for before the Debugging message of fault location or the start fault message of Debugging message and setting of fault location before the shutdown when identical, close real-time clock, end fault location process;
If described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
Preferably, in the start process, before the real-time clock reclocking, the described machine open/close total degree back of adding up is compared with described machine open/close preset times, if the machine open/close total degree after described machine open/close total degree less than described machine open/close preset times, then will add up deposits in the described nonvolatile memory;
The termination condition of described fault location process also comprises:
When being used for being used for before the Debugging message of fault location or the start fault message of Debugging message and setting of fault location before the shutdown when identical, close real-time clock, end fault location process;
The termination condition of described fault location process also comprises: if described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
Beneficial effect of the present invention is:
1, need not carry out the modification of hardware circuit, cost is low.On having the mobile phone of RTC clock, all can both realize; 2, method provided by the invention is simple, reliable, speed is fast.As long as carry out the setting of automatic switching pattern, set the machine open/close time-delay, information such as machine open/close number of times, mobile phone will carry out the operation of repetition machine open/close under the parameter condition of setting.Auto Power On under shutdown mode carries out power-off operation after the time of delay adjustments, repeat machine open/close and stop after reaching corresponding number of times; 3, the corresponding machine open/close Debugging message of record promptly before start operation back and power-off operation, is stored corresponding Debugging message in nonvolatile memory, as Flash, thereby can locate power on/off failure by inquiring about corresponding Debugging message.
Description of drawings
Fig. 1 is the shutdown process of an embodiment provided by the invention;
Fig. 2 is the start process of an embodiment provided by the invention.
Embodiment
The present invention will be further described below in conjunction with embodiment.
The operation principle of the method for positioning mobile phone power on/off failure provided by the invention is to utilize the clocking capability of RTC clock, interrupt function, writes Debugging message to nonvolatile memory and realizes quick position-sensing switch machine fault.
The user sets after the automatic switching pattern, when mobile phone is in standby mode, at first the RTC clock is carried out the initialization setting, give initialization value, secondly set RTC break period according to the delay time of setting, wait the RTC clock count to arrive the time of setting after, produce and interrupt, interrupt service routine resets the break period of RTC clock, calls the shutdown function and carries out power-off operation.Behind the mobile phone shutdown, the RTC clock still continues timing, waits to have count down to RTC break period, produces and interrupts, and the start operation powers on.So repeat, just can carry out automatic repeat switch machine operation, if reach the switching on and shutting down number of times or the reproduction fault of setting, then close the RTC clock, mobile phone no longer carries out the operation of repetition machine open/close.
Method provided by the invention is: a kind of method of using the real-time clock positioning mobile phone power on/off failure, it is characterized in that this method comprises initialization procedure and fault location process,
Described initialization procedure is: when mobile phone enters idle condition, the machine open/close delay time is stored in the nonvolatile memory into the initialization real-time clock;
Described fault location process is a cyclic process, comprises shutdown process and start process,
Described shutdown process: when the real-time clock timing to the interruption unused time that obtains according to described machine open/close delay time, the Debugging message of fault location be used for before the record shutdown in described nonvolatile memory, the real-time clock reclocking is set real-time clock according to described machine open/close delay time and is interrupted shutting down after the available machine time;
Described start process: when the described interruption available machine time is arrived in the real-time clock timing, mobile phone powers on after the start, the Debugging message of fault location be used for before the record start in described nonvolatile memory, the real-time clock reclocking, set real-time clock after the interruption unused time according to described machine open/close delay time, carry out shutdown process;
The termination condition of described fault location process comprises: when being used for being used for before the Debugging message of fault location or the start Debugging message of fault location before repeating to shut down, close real-time clock, finish the fault location process.
In a preferred embodiment of the invention, in the initialization procedure, when mobile phone enters idle condition, also machine open/close preset times, machine open/close total degree are stored in the described nonvolatile memory.
In a preferred embodiment of the invention, in the start process, before the real-time clock reclocking, described machine open/close total degree and described machine open/close preset times are compared, if deposit in the described nonvolatile memory after described machine open/close total degree less than described machine open/close preset times, then adds up described machine open/close total degree;
The termination condition of described fault location process also comprises: if described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
In a preferred embodiment of the invention, in the start process, before the real-time clock reclocking, the described machine open/close total degree back of adding up is compared with described machine open/close preset times, if the machine open/close total degree after described machine open/close total degree less than described machine open/close preset times, then will add up deposits in the described nonvolatile memory;
The termination condition of described fault location process also comprises: if described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
In a preferred embodiment of the invention, in the initialization procedure, when mobile phone enters idle condition, also further the fault message of setting is stored in the described nonvolatile memory.
In a preferred embodiment of the invention, the termination condition of described fault location process also comprises: when being used for being used for before the Debugging message of fault location or the start fault message of Debugging message and setting of fault location before the shutdown when identical, close real-time clock, finish the fault location process.
In a preferred embodiment of the invention, in the initialization procedure, when mobile phone enters idle condition, on storage machine open/close preset times, the machine open/close total degree basis in the described nonvolatile memory, also further the fault message of setting is stored in the described nonvolatile memory.
In a preferred embodiment of the invention, in the start process, before the real-time clock reclocking, described machine open/close total degree and described machine open/close preset times are compared, if deposit in the described nonvolatile memory after described machine open/close total degree less than described machine open/close preset times, then adds up described machine open/close total degree;
The termination condition of described fault location process also comprises:
When being used for being used for before the Debugging message of fault location or the start fault message of Debugging message and setting of fault location before the shutdown when identical, close real-time clock, end fault location process;
If described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
In a preferred embodiment of the invention, in the start process, before the real-time clock reclocking, the described machine open/close total degree back of adding up is compared with described machine open/close preset times, if the machine open/close total degree after described machine open/close total degree less than described machine open/close preset times, then will add up deposits in the described nonvolatile memory;
The termination condition of described fault location process also comprises:
When being used for being used for before the Debugging message of fault location or the start fault message of Debugging message and setting of fault location before the shutdown when identical, close real-time clock, end fault location process;
The termination condition of described fault location process also comprises: if described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
As shown in Figure 1, the shutdown process of a preferred embodiment provided by the invention comprises the steps:
Step 201, the RTC clock moves under open state;
Step 202, whether timing if then carry out 203, otherwise then returns 201 to interrupting the unused time to the RTC clock;
Step 203, the RTC clock enters interrupt service routine then;
Step 204, the corresponding detecting information of storage is helped the location and is solved fault in nonvolatile memory;
Step 205 is reset the RTC clock and is picked up counting;
Step 206, the taking-up machine open/close is delayed time and is set the RTC interruption available machine time from nonvolatile memory;
Step 207 is called the shutdown function and is carried out power-off operation.
As shown in Figure 2, the start process of a preferred embodiment provided by the invention may further comprise the steps:
Step 301, the RTC clock moves under cut-off condition;
Step 302, whether timing if then carry out 303, otherwise then returns 301 to interrupting the available machine time to the RTC clock;
The start that powers on of step 303, mobile phone;
Step 304 enters interrupt handling routine;
Step 305, the corresponding Debugging message of storage is helped the location and is solved fault in nonvolatile memory;
Step 306 is taken out machine open/close total degree and default machine open/close number of times from nonvolatile memory;
Step 307, machine open/close total degree and default machine open/close number of times compare, if the machine open/close total degree is then carried out 308, otherwise carried out 309 more than or equal to default machine open/close number of times;
Step 308, end operation;
Step 309 deposits nonvolatile memory in after adding up the machine open/close total degree once;
Step 310 is reset the RTC clock and is picked up counting;
Step 311, the taking-up machine open/close is delayed time and is set the RTC interruption unused time from nonvolatile memory.

Claims (9)

1. a method of using the real-time clock positioning mobile phone power on/off failure is characterized in that, this method comprises initialization procedure and fault location process,
Described initialization procedure is: when mobile phone enters idle condition, the machine open/close delay time is stored in the nonvolatile memory into the initialization real-time clock;
Described fault location process is a cyclic process, comprises shutdown process and start process,
Described shutdown process: when the real-time clock timing to the interruption unused time that obtains according to described machine open/close delay time, the Debugging message of fault location be used for before the record shutdown in described nonvolatile memory, the real-time clock reclocking is set real-time clock according to described machine open/close delay time and is interrupted shutting down after the available machine time;
Described start process: when the described interruption available machine time is arrived in the real-time clock timing, mobile phone powers on after the start, the Debugging message of fault location be used for before the record start in described nonvolatile memory, the real-time clock reclocking, set real-time clock after the interruption unused time according to described machine open/close delay time, carry out shutdown process;
The termination condition of described fault location process comprises: when being used for being used for before the Debugging message of fault location or the start Debugging message of fault location before repeating to shut down, close real-time clock, finish the fault location process.
2. the method for use real-time clock positioning mobile phone power on/off failure as claimed in claim 1, it is characterized in that, in the initialization procedure, when mobile phone enters idle condition, also machine open/close preset times, machine open/close total degree are stored in the described nonvolatile memory.
3. the method for use real-time clock positioning mobile phone power on/off failure as claimed in claim 2, it is characterized in that, in the start process, before the real-time clock reclocking, described machine open/close total degree and described machine open/close preset times are compared, if deposit in the described nonvolatile memory after described machine open/close total degree less than described machine open/close preset times, then adds up described machine open/close total degree;
The termination condition of described fault location process also comprises: if described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
4. the method for use real-time clock positioning mobile phone power on/off failure as claimed in claim 2, it is characterized in that, in the start process, before the real-time clock reclocking, the described machine open/close total degree back of adding up is compared with described machine open/close preset times, if the machine open/close total degree after described machine open/close total degree less than described machine open/close preset times, then will add up deposits in the described nonvolatile memory;
The termination condition of described fault location process also comprises: if described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
5. the method for use real-time clock positioning mobile phone power on/off failure as claimed in claim 1 is characterized in that, in the initialization procedure, when mobile phone enters idle condition, also the fault message of setting is stored in the described nonvolatile memory.
6. the method for use real-time clock positioning mobile phone power on/off failure as claimed in claim 5, it is characterized in that, the termination condition of described fault location process also comprises: when being used for being used for before the Debugging message of fault location or the start fault message of Debugging message and setting of fault location before the shutdown when identical, close real-time clock, finish the fault location process.
7. the method for use real-time clock positioning mobile phone power on/off failure as claimed in claim 2 is characterized in that, in the initialization procedure, when mobile phone enters idle condition, further the fault message of setting is stored in the described nonvolatile memory.
8. the method for use real-time clock positioning mobile phone power on/off failure as claimed in claim 7, it is characterized in that, in the start process, before the real-time clock reclocking, described machine open/close total degree and described machine open/close preset times are compared, if deposit in the described nonvolatile memory after described machine open/close total degree less than described machine open/close preset times, then adds up described machine open/close total degree;
The termination condition of described fault location process also comprises:
When being used for being used for before the Debugging message of fault location or the start fault message of Debugging message and setting of fault location before the shutdown when identical, close real-time clock, end fault location process;
If described machine open/close total degree is closed real-time clock more than or equal to described machine open/close preset times, finish the fault location process.
9. the method for use real-time clock positioning mobile phone power on/off failure as claimed in claim 7, it is characterized in that, in the start process, before the real-time clock reclocking, the described machine open/close total degree back of adding up is compared with described machine open/close preset times, if the machine open/close total degree after described machine open/close total degree less than described machine open/close preset times, then will add up deposits in the described nonvolatile memory;
The termination condition of described fault location process also comprises:
When being used for being used for before the Debugging message of fault location or the start Debugging message and the identical or described machine open/close total degree of the fault message of setting of fault location before the shutdown during more than or equal to described machine open/close preset times, close real-time clock, finish the fault location process.
CN2008100685323A 2008-07-16 2008-07-16 Method for positioning mobile phone power on/off failure by using real-time clock Active CN101321305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100685323A CN101321305B (en) 2008-07-16 2008-07-16 Method for positioning mobile phone power on/off failure by using real-time clock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100685323A CN101321305B (en) 2008-07-16 2008-07-16 Method for positioning mobile phone power on/off failure by using real-time clock

Publications (2)

Publication Number Publication Date
CN101321305A CN101321305A (en) 2008-12-10
CN101321305B true CN101321305B (en) 2011-04-20

Family

ID=40181078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100685323A Active CN101321305B (en) 2008-07-16 2008-07-16 Method for positioning mobile phone power on/off failure by using real-time clock

Country Status (1)

Country Link
CN (1) CN101321305B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223445A (en) * 2011-06-21 2011-10-19 中兴通讯股份有限公司 Method and system for positioning crash problem of mobile terminal
CN106544813B (en) * 2016-09-30 2018-07-31 无锡小天鹅股份有限公司 The method of counting and device of the washing machine cycle of operation
CN106680734A (en) * 2016-12-20 2017-05-17 宇龙计算机通信科技(深圳)有限公司 Monitoring method of terminal faults and terminal

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026715A (en) * 2007-02-09 2007-08-29 四川长虹电器股份有限公司 Circuit working state real-time monitoring method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026715A (en) * 2007-02-09 2007-08-29 四川长虹电器股份有限公司 Circuit working state real-time monitoring method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2007-141653A 2007.06.07

Also Published As

Publication number Publication date
CN101321305A (en) 2008-12-10

Similar Documents

Publication Publication Date Title
CN101395584B (en) JTAG power collapse debug
CN101615152B (en) Method and device for detecting hot plug fault of storage card
CN100517244C (en) System protection method and apparatus in abnormal reset
US8838187B2 (en) Detecting circuit for electric quantity, processing device and method for state detection of mobile telephone in standby
CN101321305B (en) Method for positioning mobile phone power on/off failure by using real-time clock
CN101431763A (en) Method and apparatus for implementing base station power-down alarm by using interrupt
CN210804315U (en) Automatic power-on circuit and mainboard
CN102103508A (en) Electronic device and startup and shutdown method thereof
CN101360290A (en) Method and terminal implementing timed startup of terminal
CN102098385B (en) Terminal shell-based shutdown method and terminal
CN100492221C (en) Device and method for realizing alarm clock function
CN102833830A (en) Mobile intelligent terminal and method for awakening same
CN101150811A (en) A device and method for standby control in mobile terminal
CN106020893B (en) Using the method and device of installation
CN102759975A (en) Start-up and shut-down management system and method of electronic device
CN107231386B (en) Application state conversion method and device and mobile terminal
CN102375759A (en) Method for preventing code reentry by using finite-state machine
CN101202458B (en) Power supply circuit
CN102402272A (en) Electronic device with network connecting function and method applied to same
CN102572110A (en) Smart phone power-down protection system and method
CN103376877B (en) A kind of multi-core processor clock control device and control method
CN107402626A (en) Using cycle synchronisation management method, device, storage medium and electronic equipment
CN103297620A (en) Power-down protection system and method for smart phone
CN101989936B (en) Test method and system of single plate fault
CN101630278A (en) Method for recording crash abnormal information of electronic device and electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant