Summary of the invention
The technical problem to be solved in the present invention is, for the above-mentioned defect of prior art, provides a kind of mobile terminal deadlock check processing method, system and mobile terminal.Whether the present invention crashes by detecting mobile terminal voluntarily, and is preserved by internal storage data when crashing, mobile terminal restart after by the internal storage data preserved by Internet Transmission to mobile terminal manufacturer, convenient analyze deadlock reason, provide users with the convenient.
The technical scheme that technical solution problem of the present invention adopts is as follows:
A kind of mobile terminal deadlock check processing method, wherein, comprises step:
S, in advance the counter be arranged in mobile terminal to be connected with providing the signal source of periodically test waveform signal, by described counter, one-period test waveform signal often to be sent to signal source and carrying out counting and add 1;
A, control mobile terminal baseband processor reset counter every first schedule time, described in the microcontroller periodic detection of mobile terminal, whether counter resets, when detecting that the value of counter exceedes predetermined threshold within second schedule time, then judge that mobile terminal crashes;
B, to crash when judgement mobile terminal, then by described microcontroller by the data Replica in internal memory in power down nonvolatile memory, and reset movement terminal;
C, when after mobile terminal is restarted, the internal storage data be kept in power down nonvolatile memory being sent to the terminal of specifying.
Described mobile terminal deadlock check processing method, wherein, described step S specifically comprises:
S10, the first input end CIN of the counter be arranged in mobile terminal with the signal source crystal oscillator providing periodically test waveform signal to be connected, to control the waveform of described crystal oscillator output fixed frequency;
S11, the clear terminal pin CCLR of counter being connected baseband processor, resetting for carrying out counting, by counter output COUT connection microcontroller and baseband processor;
S12, the control counter rising edge to first input end CIN waveform counts, when there is a rising edge at first input end CIN place, counter adds 1, when Counter Value exceedes predetermined threshold, output terminal COUT will become high level, and when counter does not exceed predetermined threshold, output terminal COUT is low level; Clear terminal pin CCLR makes the value vanishing of counter for resetting counter.
Described mobile terminal deadlock check processing method, wherein, described steps A specifically comprises:
A1, control mobile terminal baseband processor reset counter every first schedule time;
Described in the microcontroller periodic detection of A2, mobile terminal, whether counter resets, if when detecting that the value of counter exceedes predetermined threshold within second schedule time, the output terminal COUT of counter produces a rising edge look-at-me;
A3, described rising edge look-at-me detected when the interrupt request pin of microcontroller, judge that counter does not reset, and judge that mobile terminal crashes.
Described mobile terminal deadlock check processing method, wherein, described step C specifically comprises:
After C1, mobile terminal are restarted, first baseband processor judges whether counter output is high level, if high level, then judges that restarting mobile terminal deadlock caused;
C2, baseband processor are sent to the terminal of specifying by restarting the internal storage data that front described microcontroller copies in described power down nonvolatile memory by network;
C3, control baseband processor are to counter O reset.
Described mobile terminal deadlock check processing method, wherein, described power down nonvolatile memory is FLASH memory, described fixed frequency is set to F, described predetermined threshold is set to L, and described first schedule time is T1, and described second schedule time is T2, wherein: L/F>T1, L/F=T2.
A kind of mobile terminal deadlock detecting processing system, wherein, system comprises:
Pre-set module, in advance the counter be arranged in mobile terminal being connected with providing the signal source of periodically test waveform signal, by described counter, one-period test waveform signal often being sent to signal source and carrying out counting and add 1;
Reset and detection module, counter is reset every first schedule time for controlling mobile terminal baseband processor, described in the microcontroller periodic detection of mobile terminal, whether counter resets, when detecting that the value of counter exceedes predetermined threshold within second schedule time, then judge that mobile terminal crashes;
Copy and reseting module, for when judging that mobile terminal crashes, then by described microcontroller by the data Replica in internal memory in power down nonvolatile memory, and reset movement terminal;
Transmission and control module, for when after mobile terminal is restarted, the internal storage data be kept in power down nonvolatile memory being sent to the terminal of specifying.
Described mobile terminal deadlock detecting processing system, wherein, described in pre-set module and specifically comprise:
Connecting and control module, for being connected by the first input end CIN of the counter be arranged in mobile terminal with the signal source crystal oscillator providing periodically test waveform signal, controlling the waveform that described crystal oscillator exports fixed frequency;
Reset unit, for the clear terminal pin CCLR of counter is connected baseband processor, reset for carrying out counting, counter output COUT is connected microcontroller and baseband processor;
Counting unit, count for the rising edge of control counter to first input end CIN waveform, when there is a rising edge at first input end CIN place, counter adds 1, when Counter Value exceedes predetermined threshold, output terminal COUT will become high level, and when counter does not exceed predetermined threshold, output terminal COUT is low level; Clear terminal pin CCLR makes the value vanishing of counter for resetting counter.
Described mobile terminal deadlock detecting processing system, wherein, described clearing and detection module specifically comprise:
Controlling and reset unit, every first schedule time, counter being reset for controlling mobile terminal baseband processor;
Detecting unit, for mobile terminal microcontroller periodic detection described in counter whether reset, if when detecting that the value of counter exceedes predetermined threshold within second schedule time, the output terminal COUT of counter produces a rising edge look-at-me;
Judging unit, detects described rising edge look-at-me for the interrupt request pin when microcontroller, judges that counter does not reset, and judges that mobile terminal crashes.
Described mobile terminal deadlock detecting processing system, wherein, described in copy and specifically comprise with reseting module:
Judging unit, after restarting for mobile terminal, first baseband processor judges whether counter output is high level, if high level, then judges that restarting mobile terminal deadlock caused;
Transmitting element, is sent to the terminal of specifying for baseband processor by restarting the internal storage data that front described microcontroller copies in described power down nonvolatile memory by network;
Reset unit, for controlling baseband processor to counter O reset;
Described power down nonvolatile memory is FLASH memory, and described fixed frequency is set to F, and described predetermined threshold is set to L, and described first schedule time is T1, and described second schedule time is T2, wherein: L/F>T1, L/F=T2.
A kind of mobile terminal, wherein, comprising: counter, crystal oscillator, microcontroller, baseband processor;
Counter, it comprises the first input pin CIN and clear terminal pin CCLR, an output terminal COUT; Its first input end CIN connects crystal oscillator, and clear terminal pin CCLR connects the counting dump block of baseband processor, and output terminal COUT connects microcontroller and baseband processor; The rising edge of counter to first input end CIN waveform counts, when there is a rising edge at first input end CIN place, counter adds 1, and when Counter Value exceedes predetermined threshold, output terminal COUT will become high level, and when counter does not exceed predetermined threshold, output terminal COUT is low level; Clear terminal pin CCLR makes the value vanishing of counter for resetting counter;
Crystal oscillator, for exporting the waveform of fixed frequency, its fixed frequency is set to FR;
Microcontroller, the interrupt pin IRQ of its linkage counter output terminal COUT, is configured to rising edge and interrupts by interrupt pin IRQ; When interrupt pin IRQ place detects that rising edge interrupts, microcontroller will be judged to be that mobile terminal crashes, then the data Replica in internal memory in power down nonvolatile memory, then send reset signal to the reset pin BRST of baseband controller and carry out reset movement terminal;
Baseband processor, comprises counting dump block, start detection module;
Counting dump block, for resetting every one first count value of the schedule time to counter;
Start detection module, for the output terminal COUT of linkage counter; When mobile terminal-opening, whether the output terminal COUT of start detection module detection counter is high level, if internal storage data when then the last time be kept in advance in power down nonvolatile memory crashes by baseband processor after powering sends to designated terminal; Baseband processor passes through clear terminal pin CCLR to counter O reset simultaneously.The invention provides a kind of mobile terminal deadlock check processing method, system and mobile terminal, method comprises: be connected with providing the signal source of cyclical signal by counter in advance, often sends one-period signal carry out counting and add 1 by counter to signal source; Control mobile terminal baseband processor to reset counter every first schedule time, described in the microcontroller periodic detection of mobile terminal, whether counter resets, when detecting that the value of counter exceedes predetermined threshold within second schedule time, then mobile terminal crashes; When judgement mobile terminal crash, then by described microcontroller by the data Replica in internal memory in power down nonvolatile memory, reset movement terminal; When after mobile terminal is restarted, the internal storage data be kept in power down nonvolatile memory being sent to the terminal of specifying.The present invention can enable mobile terminal deadlock be detected voluntarily and internal storage data when crashing be preserved be supplied to mobile terminal manufacturer to analyze, and provides users with the convenient.
Embodiment
For making object of the present invention, technical scheme and advantage clearly, clearly, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
First preferred embodiment of a kind of mobile terminal deadlock check processing method of the present invention, as shown in Figure 1, comprises step:
Step S100, in advance counter to be connected with providing the signal source of cyclical signal, by counter, one-period signal often to be sent to signal source and carrying out counting and add 1.
During concrete enforcement, step S100 specifically comprises:
Step S10, the first input end CIN of the counter 100 be arranged in mobile terminal with the signal source crystal oscillator 200 providing periodically test waveform signal to be connected, shown in figure 2, to control the waveform of described crystal oscillator output fixed frequency;
Step S11, the clear terminal pin CCLR of counter is connected baseband processor (with reference to shown in figure 2), for carrying out counting clearing, by counter output COUT connection microcontroller and baseband processor;
Step S12, the control counter rising edge to first input end CIN waveform counts (shown in figure 2), when there is a rising edge at first input end CIN place, counter adds 1, when Counter Value exceedes predetermined threshold, output terminal COUT will become high level, and when counter does not exceed predetermined threshold, output terminal COUT is low level; Clear terminal pin CCLR makes the value vanishing of counter for resetting counter.
Step S200, control mobile terminal baseband processor reset counter every first schedule time, described in the microcontroller periodic detection of mobile terminal, whether counter resets, when detecting that the value of counter exceedes predetermined threshold within second schedule time, then judge that mobile terminal crashes.
During concrete enforcement, baseband processor is a vitals of mobile terminal, is equivalent to a protocol processor, is responsible for data processing and the storage of mobile terminal.
During concrete enforcement, step S200 specifically comprises:
Step S201, control mobile terminal baseband processor reset counter every first schedule time;
During concrete enforcement, except running the program of mobile terminal, also run a counting dump block in baseband processor, counting dump block resets every the count value of the first schedule time T1 to counter; The clear terminal pin CCLR of counting dump block linkage counter, counting dump block is reset counter by the clear terminal pin CCLR of counter; The first input end CIN of counter connects crystal oscillator, and crystal oscillator output frequency F is fixed as the waveform of FR; The rising edge of counter to first input end CIN waveform counts, and when there is a rising edge at first input end CIN place, counter adds 1.
Described in the microcontroller periodic detection of step S202, mobile terminal, whether counter resets, if when detecting that the value of counter exceedes predetermined threshold within second schedule time, the output terminal COUT of counter produces a rising edge look-at-me;
During concrete enforcement, the interrupt pin IRQ linkage counter output terminal COUT of microcontroller, and interrupt pin IRQ is made into rising edge interruption by microcontroller; High level (it is low level that counter does not exceed predetermined threshold output terminal COUT) will be become when Counter Value exceedes predetermined threshold hour counter output terminal COUT.
Step S203, described rising edge look-at-me detected when the interrupt request pin of microcontroller, judge that counter does not reset, and judge that mobile terminal crashes.
During concrete enforcement, if the value of counter exceedes predetermined threshold L, the output terminal of counter changes to high level from low level, produces a rising edge.The interrupt pin IRQ of microcontroller detects this rising edge, learns that mobile terminal now crashes.
Described fixed frequency is set to F, and described predetermined threshold is set to L, and described first schedule time is T1, and described second schedule time is T2, wherein: L/F>T1, L/F=T2.
Specific embodiment is as follows, if the fixed frequency FR of crystal oscillator is 10Hz, the predetermined threshold CTH of counter is 60, and schedule time T1 is 2 seconds; Then baseband processor can reset counter under normal circumstances to ensure that the count value of counter can not more than CTH(that is 60 every 2 seconds), but the task of 2 seconds clearing counters can not be performed when mobile terminal crashes, cause the value of counter to increase always, if continuous 6 seconds (CTH/FR=60/10Hz=6 second) does not perform the clearing to counter, illustrate that mobile terminal crashes, what deserves to be explained is and stayed the surplus of 4 seconds to be supplied to counting dump block time enough to reset counter here.
Step S300, to crash when judgement mobile terminal, then by described microcontroller by the data Replica in internal memory in power down nonvolatile memory, and reset movement terminal.
Step S400, when after mobile terminal is restarted, the internal storage data be kept in power down nonvolatile memory being sent to the terminal of specifying.
During concrete enforcement, described step S400 specifically comprises:
After step S401, mobile terminal are restarted, first baseband processor judges whether counter output is high level, if high level, then judges to restart and caused because mobile terminal crashes;
Step S402, baseband processor are sent to the terminal of specifying by restarting the internal storage data that front described microcontroller copies in described power down nonvolatile memory by network;
During concrete enforcement, mobile terminal is by forms such as WIFI or carrier data business, and the internal storage data preserved when crashing is sent to mobile terminal manufacturer, and for mobile terminal, manufacturer analyzes.
Step S403, control baseband processor are to counter O reset.
During concrete enforcement, baseband processor is reset counter by clear terminal pin CCLR.
During concrete enforcement, described power down nonvolatile memory is FLASH memory.
During concrete enforcement, the functional block diagram of a kind of mobile terminal embody rule embodiment of the present invention, as shown in Figure 2, mobile terminal provided by the present invention comprises:
Counter 100, it comprises two input pins CIN, CCLR, an output terminal COUT; Its first input end CIN connects crystal oscillator 200, and clear terminal pin CCLR connects the counting dump block 410 of baseband processor 400, and output terminal COUT connects microcontroller 300 and baseband processor 400; The rising edge of counter 100 pairs of first input end CIN waveforms counts, when there is a rising edge at first input end CIN place, counter 100 adds 1, and when counter 100 value exceedes threshold value CTH, output terminal COUT will become high level (when counter 100 does not exceed threshold value CTH, output terminal COUT is low level); Clear terminal pin CCLR makes the value vanishing of counter 100 for resetting counter 100.
Crystal oscillator 200, for exporting the waveform of fixed frequency, fixed frequency is herein set to FR;
Microcontroller 300, the interrupt pin IRQ of its linkage counter 100 output terminal COUT, is configured to rising edge and interrupts by interrupt pin IRQ; When interrupt pin IRQ place detects that rising edge interrupts, microcontroller 300 will think that mobile terminal crashes, it can the data Replica in internal memory to FLASH(or other power down nonvolatile memories) in, then send reset signal to the reset pin BRST of baseband controller 400 and carry out reset movement terminal;
Baseband processor 400, inside comprises counting dump block 410, start detection module 420;
Counting dump block 410, this module resets every the count value of a set time T1 to counter 100, if counting dump block 410 can normally perform, illustrates that mobile terminal is working properly;
Start detection module 420, the output terminal COUT of this model calling counter 100; When mobile terminal-opening, whether start detection module 420 will the output terminal COUT of detection counter 100 be high level, then illustrate that this start detects that mobile terminal crashes by microcontroller 300 triggered if yes, the internal storage data when last time be kept in advance in FLASH can crash by baseband processor 400 after powering sends to mobile terminal manufacturer by WIFI or carrier data business; Baseband processor 400 can be reset counter 100 by clear terminal pin CCLR simultaneously.
During concrete enforcement, the process flow diagram of the deadlock detection of the second preferred embodiment of a kind of mobile terminal deadlock check processing method of the present invention, as shown in Figure 3, mobile terminal operating procedure is after powering as follows:
Step S1, mobile terminal-opening, start detection module checks whether counter output COUT is high level, if be high level, performs step S2, otherwise performs step S3;
Step S2, illustrate this start be by microcontroller detect mobile terminal crash triggered, internal storage data when being crashed the last time be kept in advance in FLASH memory sends to mobile terminal manufacturer by WIFI or carrier data business; So that mobile terminal manufacturer analyzes; Perform step S3 afterwards;
Step S3, counting dump block reset counter; Perform step S4 afterwards;
Step S4, startup time-out time are the timer of T1 (preferably, T1 is 2 seconds); Perform step S5 afterwards
Step S5, judge that whether timer is overtime, then perform step S6 if yes, if otherwise perform step S5;
Step S6, counting dump block reset counter, and then reset timer performs step S5.
Be more than the execution flow process after mobile terminal-opening, when crashing appears in mobile terminal, when namely overtime CTH/FR counting dump block does not cause counter output pin to become high level from low level to counter O reset, will following steps be performed:
Step K 1, microcontroller will the data Replica in internal memory in FLASH memory (or other power down nonvolatile memories), then send reset signal to the reset pin BRST of baseband controller and carry out reset movement terminal; Perform step S1 afterwards.
As from the foregoing, a kind of mobile terminal deadlock check processing method provided by the invention, detected by mobile terminal self and crash and internal storage data during deadlock is stored on power down nonvolatile memory, and control mobile terminal reset, internal storage data after last time crashes after restarting by mobile terminal sends to mobile terminal manufacturer to analyze by network, provides users with the convenient.
Based on above-described embodiment, present invention also offers a kind of mobile terminal deadlock detecting processing system, as shown in Figure 4.Wherein, system comprises:
Pre-set module 500, in advance the counter be arranged in mobile terminal being connected with providing the signal source of periodically test waveform signal, by described counter, one-period test waveform signal often being sent to signal source and carrying out counting and add 1; As detailed above.
Reset and detection module 510, counter is reset every first schedule time for controlling mobile terminal baseband processor, described in the microcontroller periodic detection of mobile terminal, whether counter resets, when detecting that the value of counter exceedes predetermined threshold within second schedule time, then judge that mobile terminal crashes; As detailed above.
Copy and reseting module 520, for when judging that mobile terminal crashes, then by described microcontroller by the data Replica in internal memory in power down nonvolatile memory, and reset movement terminal; As detailed above.
Transmission with control module 530, for when judge mobile terminal crash, then by described microcontroller by the data Replica in internal memory in power down nonvolatile memory, reset movement terminal; As detailed above.
Described mobile terminal deadlock detecting processing system, wherein, described in pre-set module 500 and specifically comprise:
Connecting and control module, for being connected by the first input end CIN of the counter be arranged in mobile terminal with the signal source crystal oscillator providing periodically test waveform signal, controlling the waveform that described crystal oscillator exports fixed frequency; As detailed above.
Reset unit, for the clear terminal pin CCLR of counter is connected baseband processor, reset for carrying out counting, counter output COUT is connected microcontroller and baseband processor; As detailed above.
Counting unit, count for the rising edge of control counter to first input end CIN waveform, when there is a rising edge at first input end CIN place, counter adds 1, when Counter Value exceedes predetermined threshold, output terminal COUT will become high level, and when counter does not exceed predetermined threshold, output terminal COUT is low level; Clear terminal pin CCLR makes the value vanishing of counter for resetting counter; As detailed above.
Described mobile terminal deadlock detecting processing system, wherein, described clearing and detection module 510 specifically comprise:
Controlling and reset unit, every first schedule time, counter being reset for controlling mobile terminal baseband processor; As detailed above.
Detecting unit, for mobile terminal microcontroller periodic detection described in counter whether reset, if when detecting that the value of counter exceedes predetermined threshold within second schedule time, the output terminal COUT of counter produces a rising edge look-at-me; As detailed above.
Judging unit, detects described rising edge look-at-me for the interrupt request pin when microcontroller, judges that counter does not reset, and judges that mobile terminal crashes; As detailed above.
Described mobile terminal deadlock detecting processing system, wherein, described in copy and specifically comprise with reseting module 530:
Judging unit, after restarting for mobile terminal, first baseband processor judges whether counter output is high level, if high level, then judges that restarting mobile terminal deadlock caused; As detailed above.
Transmitting element, is sent to the terminal of specifying for baseband processor by restarting the internal storage data that front described microcontroller copies in described power down nonvolatile memory by network; As detailed above.
Reset unit, for controlling baseband processor to counter O reset; As detailed above.
Above-mentioned any one mobile terminal deadlock detecting processing system, wherein, described power down nonvolatile memory is FLASH memory, described fixed frequency is set to F, described threshold value is set to L, and described first schedule time is T1, and described second schedule time is T2, wherein: L/F>T1, L/F=T2; As detailed above.
In sum, the invention provides a kind of mobile terminal deadlock check processing method, system and mobile terminal, method comprises: be connected with providing the signal source of cyclical signal by counter in advance, often sends one-period signal carry out counting and add 1 by counter to signal source; Control mobile terminal baseband processor to reset counter every first schedule time, described in the microcontroller periodic detection of mobile terminal, whether counter resets, when detecting that the value of counter exceedes predetermined threshold within second schedule time, then judge that mobile terminal crashes; When judgement mobile terminal crashes, then by described microcontroller by the data Replica in internal memory in power down nonvolatile memory, and reset movement terminal; When after mobile terminal is restarted, the internal storage data be kept in power down nonvolatile memory being sent to the terminal of specifying.The present invention can enable mobile terminal deadlock be detected voluntarily and internal storage data when crashing be preserved be supplied to mobile terminal manufacturer to analyze, and provides users with the convenient.
Should be understood that, application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can be improved according to the above description or convert, and all these improve and convert the protection domain that all should belong to claims of the present invention.