CN114035477A - Equipment awakening method, device and system - Google Patents

Equipment awakening method, device and system Download PDF

Info

Publication number
CN114035477A
CN114035477A CN202111333360.XA CN202111333360A CN114035477A CN 114035477 A CN114035477 A CN 114035477A CN 202111333360 A CN202111333360 A CN 202111333360A CN 114035477 A CN114035477 A CN 114035477A
Authority
CN
China
Prior art keywords
main control
control chip
mode
controller
data receiving
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.)
Pending
Application number
CN202111333360.XA
Other languages
Chinese (zh)
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.)
Beijing Runke General Technology Co Ltd
Original Assignee
Beijing Runke General Technology Co Ltd
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 Beijing Runke General Technology Co Ltd filed Critical Beijing Runke General Technology Co Ltd
Priority to CN202111333360.XA priority Critical patent/CN114035477A/en
Publication of CN114035477A publication Critical patent/CN114035477A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Abstract

The invention provides a device awakening method, a device and a system, wherein when a main control chip of a low-power consumption device is in a deep sleep state, a data receiving port of the main control chip is in an interrupt IO mode, and when the main control chip receives an awakening instruction which comprises a low level signal and is sent by a controller through the data receiving port, the awakening operation of the main control chip is carried out, the mode of the data receiving port is controlled to be switched into a serial port receiving IO mode, and an awakening response message is sent to the controller through the data sending port, so that the awakening of the main control chip is realized, and the reliability of the device is improved. And then, under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to an interrupt IO mode, and entering a deep sleep mode. Namely, under the condition that the communication message sent by the controller is not received within the specified time, the deep sleep mode is entered again so as to save the power consumption.

Description

Equipment awakening method, device and system
Technical Field
The present invention relates to the field of device wake-up, and in particular, to a device wake-up method, apparatus, and system.
Background
At present, low-power consumption devices which need to perform serial port communication externally, such as environment monitoring devices and smart meters, generally adopt batteries for power supply, and have high requirements on power consumption, generally, the devices have working time requirements of 5 years or even 10 years, and in order to reduce power consumption, the non-working time of a main control chip of the devices is required to be in a deep sleep state.
In the deep sleep state, the communication port of the main control chip is in a closed state, and the main control chip cannot perform data receiving and transmitting operations through the communication port, so that the reliability is reduced.
Disclosure of Invention
In view of this, the present invention provides a device wake-up method, apparatus and system, so as to solve the problem that in a deep sleep state, a communication port of a main control chip is in a closed state, and the main control chip cannot perform data transceiving operation through the communication port, thereby reducing reliability.
In order to solve the technical problems, the invention adopts the following technical scheme:
a device wake-up method is applied to a main control chip in low-power-consumption devices, and when the main control chip is in a deep sleep state, a data receiving port of the main control chip is in an interrupt IO mode; the device wake-up method comprises the following steps:
when a wake-up instruction including a low level signal sent by a controller is received through the data receiving port, a main control chip wake-up operation is carried out, and the mode of the data receiving port is controlled to be switched to a serial port receiving IO mode;
sending a wake-up response message to the controller through a data sending port;
and under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to the interrupt IO mode, and entering a deep sleep mode.
Optionally, after controlling the mode of the data receiving port to be switched to the serial port receiving IO mode, the method further includes:
starting a first timer;
determining whether a communication message sent by the controller is received through the data receiving port within a first preset time period by using a first timer; correspondingly, determining that the communication message sent by the controller is not received through the data receiving port within the specified time includes:
and if the first timer is used for determining that the communication message sent by the controller is not received through the data receiving port within the first preset time, determining that the communication message sent by the controller is not received through the data receiving port within the specified time.
Optionally, the method further comprises:
resetting the first timer when determining that the communication message sent by the controller is received through the data receiving port within the designated time;
and processing the communication message, sending a communication feedback message to the controller after the communication message is processed, controlling the mode of the data receiving port to be switched to the interrupt IO mode and entering a deep sleep mode under the condition that a new communication message sent by the controller is not received through the data receiving port again within a first preset time period of the first timer.
Optionally, the main control chip wake-up operation is performed, including:
and carrying out equipment initialization operation.
A device awakening method is applied to a controller, a main control chip in low-power-consumption equipment which is in communication connection with the controller is in a deep sleep state, and a data receiving port of the main control chip is in an interrupt IO mode;
the device wake-up method comprises the following steps:
sending a wake-up instruction comprising a low-level signal to a data receiving port of the main control chip so as to enable the main control chip to perform wake-up operation of the main control chip and control the mode of the data receiving port to be switched into a serial port receiving IO mode;
and receiving a wake-up response message sent by a data sending port of the main control chip.
Optionally, after receiving the wake-up response packet sent by the data sending port of the main control chip, the method further includes:
sending a communication message to a data receiving port of the main control chip, so that the main control chip resets a first timer under the condition that the main control chip receives the communication message within a first preset time of the first timer, processes the communication message, sends a communication feedback message to the controller after the communication message is processed, and controls the mode of the data receiving port to be switched to the interrupt IO mode and enter a deep sleep mode under the condition that a new communication message sent by the controller is not received again through the data receiving port within the first preset time of the first timer; and the master control chip starts a timer after the mode of the data receiving port is switched to a serial port receiving IO mode.
Optionally, receiving a wake-up response packet sent by a data sending port of the main control chip includes:
starting a second timer;
within a second preset time of the second timer, under the condition of receiving a wake-up response message sent by a data sending port of the main control chip, outputting communication success information;
and outputting communication failure information when the wake-up response message sent by the data sending port of the main control chip is not received within a second preset time of the second timer.
An equipment awakening device is applied to a main control chip in low-power-consumption equipment, and a data receiving port of the main control chip is in an interrupt IO mode when the main control chip is in a deep sleep state; the device wake-up apparatus includes:
the first mode switching module is used for performing wake-up operation on a main control chip and controlling the mode of the data receiving port to be switched into a serial port receiving IO mode under the condition that a wake-up instruction including a low level signal sent by a controller is received through the data receiving port;
the message sending module is used for sending a wake-up response message to the controller through the data sending port;
and the second mode switching module is used for controlling the mode of the data receiving port to be switched to the interrupt IO mode and enter a deep sleep mode under the condition that the communication message sent by the controller is determined not to be received through the data receiving port within the specified time.
A device wake-up device is applied to a controller, a main control chip in low-power consumption equipment which is in communication connection with the controller is in a deep sleep state, and a data receiving port of the main control chip is in an interrupt IO mode;
the device wake-up apparatus includes:
the data sending module is used for sending a wake-up instruction comprising a low-level signal to a data receiving port of the main control chip so as to enable the main control chip to carry out wake-up operation on the main control chip and control the mode of the data receiving port to be switched into a serial port receiving IO mode;
and the data receiving module is used for receiving the awakening response message sent by the data sending port of the main control chip.
A device wake-up system comprising a low power device and a controller;
the low-power consumption equipment is used for executing the equipment awakening method applied to the main control chip in the low-power consumption equipment;
the controller is used for executing the device awakening method applied to the controller;
the sending port of the controller is connected with the data receiving port of the low-power consumption equipment; the receiving port of the controller is connected with the data transmitting port of the low-power consumption equipment; and the grounding end of the controller is connected with the grounding end of the low-power consumption equipment.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a device awakening method, a device and a system, wherein when a main control chip of low-power consumption equipment is in a deep sleep state, a data receiving port of the main control chip is in an interrupt IO mode, and when the main control chip receives an awakening instruction which comprises a low level signal and is sent by a controller through the data receiving port, the awakening operation of the main control chip is carried out, the mode of the data receiving port is controlled to be switched into a serial port receiving IO mode, and an awakening response message is sent to the controller through the data sending port, so that the awakening of the main control chip is realized, and the reliability of the equipment is improved. And then, under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to the interrupt IO mode, and entering a deep sleep mode. Namely, under the condition that the communication message sent by the controller is not received within the specified time, the deep sleep mode is entered again so as to save the power consumption.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a device wake-up system according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for waking up a device according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for waking up a device according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for waking up a device according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus wake-up apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another device wake-up apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, low-power consumption equipment, that is, equipment which has low power consumption and needs to perform serial port communication externally, such as an environment monitoring device, an intelligent electric meter and the like, generally adopts a battery for power supply, has a high requirement on power consumption, generally has a working time requirement of 5 years or even 10 years, and requires that a main control chip of the equipment is in a deep sleep state during non-working time in order to reduce power consumption.
In the deep sleep state, the communication port of the main control chip is in a closed state, and the main control chip cannot perform data receiving and transmitting operations through the communication port, so that the reliability is reduced.
To solve this technical problem, the following two methods can be adopted:
1. the port of the device is improved, so that the main Control chip of the device supports the function of deep awakening of the serial port, and the device can be awakened by directly connecting the main Control chip (such as a Micro Control Unit, which is abbreviated as MCU) serial port. Wherein, the MCU is also called a micro control unit.
However, this method needs to improve the main control chip of the device, and has poor versatility, and the serial port of the device adopts a low-power serial port, that is, the serial port still works in a sleep state, and the power consumption is high.
2. An IO port of the device is newly added, the IO port is connected with an external controller, an external IO (for example, General Purpose Input Output, GPIO for short, also referred to as General Purpose Input/Output port) is used to provide an Input signal for the main control chip, and after the main control chip identifies the effective level of the Input signal, the device enters a working state and keeps the state to perform communication.
In this way, an additional IO port of the device is required, and after the main control chip is awakened, the main control chip is always in a working state, which increases power consumption.
Therefore, a method for waking up a device, which does not require improvement of the device and consumes less power when waking up, is needed.
Therefore, the mode of the data receiving port can be adjusted to be an interrupt IO mode, low-level awakening is supported, the main control chip can be awakened when the low level is received, and the mode of the data receiving port is set to be the interrupt IO mode again and enters a deep sleep state under the condition that a communication message sent by an external controller cannot be received within a certain time, so that power consumption is saved.
More specifically, when a main control chip of the low-power consumption device is in a deep sleep state, a data receiving port of the main control chip is in an interrupt IO mode, and when the main control chip receives a wake-up instruction including a low-level signal sent by a controller through the data receiving port, the wake-up operation of the main control chip is performed, the mode of the data receiving port is controlled to be switched into a serial port receiving IO mode, and a wake-up response message is sent to the controller through the data sending port, so that the wake-up of the main control chip is realized, and the reliability of the device is improved. And then, under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to an interrupt IO mode, and entering a deep sleep mode. Namely, under the condition that the communication message sent by the controller is not received within the specified time, the deep sleep mode is entered again so as to save the power consumption.
On the basis of the above content, an embodiment of the present invention provides an apparatus wake-up system, including a low power consumption apparatus and a controller, referring to fig. 1, the controller (an upper computer in fig. 1) is connected to the low power consumption apparatus through a USB serial port (or a serial port of the upper computer itself), and a sending port TX2 of the controller is connected to a data receiving port RX1 of the low power consumption apparatus; the receiving port RX2 of the controller is connected with the data transmitting port TX1 of the low-power consumption device; the ground terminal GND of the controller is connected with the ground terminal GND of the low-power consumption device, the GND is used for providing a communication reference ground, and the RX1 of the low-power consumption device is connected with the power supply VCC through a pull-up resistor. It should be noted that the data sending port of the low power consumption device is also the data sending port of the main control chip, and the data receiving port of the low power consumption device is also the data receiving port of the main control chip.
In a case that the low power consumption device is an environment monitoring device, in an implementation manner, the main control chip may be wakened only when the environment monitoring device reaches a specific wake-up condition, and if the acceleration exceeds a measurement range or a timing acquisition cycle is reached, the main control chip may be wakened up and starts an acquisition task. The invention solves the problem of how to awaken the main control chip and perform data transceiving operation when the main control chip is in the deep sleep state. It should be noted that some environment monitoring devices may not be provided with an acceleration sensor, and at this time, the main control chip may be awakened when a timing acquisition cycle is reached.
On the basis of the device wake-up system, another embodiment of the present invention provides a device wake-up method, which is applied to a main control chip (such as the MCU in fig. 1) in a low power consumption device.
The data receiving port RX1 of the main control chip has two modes, one is an interrupt IO mode, in this mode, the pull-up resistor ensures that RX1 is in a high level state when no communication is performed, when the controller sends a wake-up command, such as a wake-up message, a start bit (a low level) of the wake-up message is sent first, and when the pin RX1 of the data receiving port RX1 of the main control chip is changed from the high level to the low level, the main control chip is woken up by external interrupt.
The other mode is a serial port receiving IO mode, and in the mode, the port can normally receive data.
When the main control chip is in a deep sleep state, the data receiving port of the main control chip is in an interrupt IO mode and can be awakened through low level.
Referring to fig. 2, the device wake-up method includes:
and S11, when the wake-up instruction including the low level signal sent by the controller is received through the data receiving port, performing the wake-up operation of the main control chip, and controlling the mode of the data receiving port to be switched to a serial port receiving IO mode.
Specifically, when the low power consumption device needs to be woken up, the controller sends a wake-up message to the data receiving port RX1 of the main control chip of the low power consumption device through the sending port TX2, which causes the RX1 level to change from high to low, so that the falling edge of the RX1 of the main control chip is used to interrupt and wake up the sleeping main control chip.
At this time, the main control chip performs a main control chip wake-up operation, which may specifically be an operation such as device initialization and serial port initialization. Then, the mode of the data receiving port is controlled to be switched to a serial port receiving IO mode, so that the data receiving port can normally receive data.
And S12, sending a wake-up response message to the controller through the data sending port.
In practical application, the main control chip can reply the controller wake-up message response, that is, the wake-up response message. Then, the controller starts a first timer, may set the first timer to time a first preset time (for example, 10s, which may be set according to an actual scene in an actual application), and then keeps the wake-up state and continuously queries whether to receive the communication packet sent by the controller. The first preset timing time is the timing duration of the first timer in the main control chip.
In addition, the first timer may be started after the mode of the control data receiving port is switched to the serial port receiving IO mode and before the wakeup response message is sent. In this embodiment, the starting of the first timer may be set before or after the main control chip replies the wakeup response message, specifically according to an actual scene.
It should be noted that, after the controller sends the wake-up message to the data receiving port RX1 of the main control chip of the low power consumption device through the sending port TX2, the second timer may be started to determine whether the wake-up response message fed back by the main control chip is successfully received within a timing duration (a second preset time, for example, 10s) of the second timer. And the second preset timing time is the timing duration of a second timer in the controller.
And in the second preset time of the second timer, under the condition of receiving the awakening response message sent by the data sending port of the main control chip, the communication is successful, the successful communication information is output, and then the communication message can be continuously sent and the timer is reset. And within the second preset time of the second timer, if the message response of the main control chip is not received, the communication is ended.
And in the second preset time of the second timer, under the condition that the awakening response message sent by the data sending port of the main control chip is not received, the communication failure is explained, the communication failure information is output, and the communication is ended.
And S13, under the condition that the communication message sent by the controller is determined not to be received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to an interrupt IO mode, and entering a deep sleep mode.
In this embodiment, if the first timer is started after the mode of controlling the data receiving port is switched to the serial port receiving IO mode, the first timer is used to determine whether the communication packet sent by the controller is received through the data receiving port within a first preset time.
And if the first timer is used for determining that the communication message sent by the controller is not received through the data receiving port within the first preset time, determining that the communication message sent by the controller is not received through the data receiving port within the specified time.
That is to say, when the first timer times to 10s, and a subsequent communication packet sent by the controller is not received, in order to reduce power consumption, the mode of the data receiving port is controlled to be switched to the interrupt IO mode, and the deep sleep mode is entered.
In this embodiment, when the main control chip of the low power consumption device is in a deep sleep state, the data receiving port of the main control chip is in an interrupt IO mode, and when the main control chip receives a wake-up instruction including a low level signal sent by the controller through the data receiving port, the wake-up operation of the main control chip is performed, and the mode of the data receiving port is controlled to be switched to a serial port receiving IO mode, and a wake-up response message is sent to the controller through the data sending port, so that the wake-up of the main control chip is realized, and the reliability of the device is improved. And then, under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to an interrupt IO mode, and entering a deep sleep mode. Namely, under the condition that the communication message sent by the controller is not received within the specified time, the deep sleep mode is entered again so as to save the power consumption.
In addition, the invention awakens the main control chip in a deep sleep state by using common IO external interruption of the serial port pins, and awakens the sleep by using IO interruption, thereby reducing the occupation of independent IO pins.
In the above embodiment, when it is determined that the communication packet sent by the controller is not received through the data receiving port within the specified time, the mode of the data receiving port is controlled to be switched to the interrupt IO mode, and the deep sleep mode is entered. In addition, in another implementation manner of the present invention, when it is determined that the communication packet sent by the controller is received through the data receiving port within a specified time, with reference to fig. 3, the method further includes:
and S31, resetting the first timer.
In this embodiment, the first timer is cleared, and the timing is restarted.
And S32, processing the communication message, and sending a communication feedback message to the controller after the communication message is processed.
In this embodiment, after receiving the communication packet, the packet is parsed and responded, and then the communication feedback packet is sent to the controller.
And S33, controlling the mode of the data receiving port to be switched to an interrupt IO mode and entering a deep sleep mode when the new communication message sent by the controller is not received through the data receiving port again within the first preset time of the first timer.
After the communication feedback message is sent to the controller, the main control chip keeps the awakening state and continuously inquires whether the data receiving port receives the communication message, and after the message is received, the timing is reset for 10 seconds, and the communication message is analyzed and responded. After the timing of 10 seconds is reset, the wake-up message or the communication message sent by the controller is not received for 10 seconds continuously, the mode of the data receiving port is controlled to be switched to the interrupt IO mode, the data receiving port enters the dormancy again, and the communication process is ended.
In this embodiment, when the communication packet sent by the controller is processed and the communication packet is not received again, the deep sleep mode is entered again to save power consumption.
In addition, the embodiment can automatically enter a sleep mode or a working mode according to the communication state, the main control chip feeds back the awakening response message after awakening, communication abnormity caused by incomplete initialization is avoided, and the communication adopts question-answer, so that the communication reliability is high. When the main control chip does not communicate, each circuit is in a sleep mode, and the main control chip automatically wakes up during communication, so that intelligent control of sleep and wake-up is achieved, and power consumption is greatly reduced.
Optionally, on the basis of the device wake-up method, another embodiment of the present invention provides a device wake-up method, which is applied to a controller, where a main control chip in a low power consumption device communicatively connected to the controller is in a deep sleep state, and a data receiving port of the main control chip is in an interrupt IO mode;
referring to fig. 4, the device wake-up method includes:
s41, sending a wake-up instruction including a low-level signal to a data receiving port of a main control chip in the low-power consumption device, so that the main control chip performs wake-up operation on the main control chip and controls the mode of the data receiving port to be switched to a serial port receiving IO mode;
and S42, receiving the awakening response message sent by the data sending port of the main control chip.
Wherein, S42 may include:
starting a second timer;
within a second preset time of the second timer, under the condition of receiving a wake-up response message sent by a data sending port of the main control chip, outputting communication success information;
and outputting communication failure information when the wake-up response message sent by the data sending port of the main control chip is not received within a second preset time of the second timer.
Further, after receiving the wake-up response message sent by the data sending port of the main control chip, the method further includes:
sending a communication message to a data receiving port of a main control chip, so that the main control chip resets the first timer when receiving the communication message within a first preset time of the first timer, processes the communication message, sends a communication feedback message to a controller after the communication message is processed, controls the mode of the data receiving port to be switched to the interrupt IO mode when a new communication message sent by the controller is not received through the data receiving port again within the first preset time of the first timer, and enters a deep sleep mode. And the main control chip starts a first timer after the mode of the data receiving port is switched to a serial port receiving IO mode.
In practical application, the controller firstly sends a wake-up message through the sending port TX2, and starts the timing for 10 seconds, which causes the level of the data receiving port RX1 of the low power consumption device to change from high to low, so as to wake up the main control chip in the deep sleep state by using the falling edge interruption of the RX1 of the main control chip, and after the main control chip is woken up, the controller replies a wake-up response message through the data sending port TX 1. When the controller monitors that the wake-up reply is received in 10S, the controller sends a communication message through the sending port TX2 for communication, and the main control chip finishes the communication task after replying the communication message. The main control chip is not dormant within the timing of 10 seconds until the communication message is not received within 10 seconds and then enters the dormancy again, and the method avoids the problem that the response time is slow because the main control chip frequently enters the dormancy. And after the timing period of 10 seconds, the controller can retransmit the wake-up message to continue communication, repeat the communication process, or not continuously transmit the wake-up message, and the communication is ended. In this embodiment, a 10-second timing interval is used for explanation, and a suitable timing interval may be modified according to actual working requirements.
If the controller does not receive the awakening response message within 10 seconds, the communication is finished, and the controller prompts that the communication fails.
In this embodiment, when the main control chip of the low power consumption device is in a deep sleep state, the data receiving port of the main control chip is in an interrupt IO mode, and when the main control chip receives a wake-up instruction including a low level signal sent by the controller through the data receiving port, the wake-up operation of the main control chip is performed, and the mode of the data receiving port is controlled to be switched to a serial port receiving IO mode, and a wake-up response message is sent to the controller through the data sending port, so that the wake-up of the main control chip is realized, and the reliability of the device is improved. And then, under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to an interrupt IO mode, and entering a deep sleep mode. Namely, under the condition that the communication message sent by the controller is not received within the specified time, the deep sleep mode is entered again so as to save the power consumption.
Optionally, on the basis of the above embodiment of the device wake-up method applied to the main control chip in the low power consumption device, another embodiment of the present invention provides a device wake-up apparatus applied to the main control chip in the low power consumption device, where when the main control chip is in a deep sleep state, a data receiving port of the main control chip is in an interrupt IO mode; referring to fig. 5, the device wake-up apparatus includes:
the first mode switching module 11 is configured to perform a main control chip wake-up operation when a wake-up instruction including a low level signal sent by a controller is received through the data receiving port, and control a mode of the data receiving port to be switched to a serial port receiving IO mode;
a message sending module 12, configured to send a wake-up response message to the controller through a data sending port;
and a second mode switching module 13, configured to control, when it is determined that the communication packet sent by the controller is not received through the data receiving port within the specified time, the mode of the data receiving port to be switched to the interrupt IO mode, and enter a deep sleep mode.
Further, still include:
the first timer control module is used for starting a first timer and determining whether a communication message sent by the controller is received through the data receiving port within a first preset time period by using the first timer;
correspondingly, the second mode switching module 13 is specifically configured to, when determining that the communication packet sent by the controller is not received through the data receiving port within the specified time:
and if the first timer is used for determining that the communication message sent by the controller is not received through the data receiving port within the first preset time, determining that the communication message sent by the controller is not received through the data receiving port within the specified time.
Further, still include:
the second timer control module is used for resetting the first timer under the condition that the communication message sent by the controller is received through the data receiving port within the specified time;
and the third mode switching module is used for processing the communication message, sending a communication feedback message to the controller after the communication message is processed, controlling the mode of the data receiving port to be switched to the interrupt IO mode and entering a deep sleep mode under the condition that a new communication message sent by the controller is not received through the data receiving port again within the first preset time of the first timer.
Further, when the first mode switching module 11 is used for performing a main control chip wake-up operation, it is specifically configured to:
and carrying out equipment initialization operation.
In this embodiment, when the main control chip of the low power consumption device is in a deep sleep state, the data receiving port of the main control chip is in an interrupt IO mode, and when the main control chip receives a wake-up instruction including a low level signal sent by the controller through the data receiving port, the wake-up operation of the main control chip is performed, and the mode of the data receiving port is controlled to be switched to a serial port receiving IO mode, and a wake-up response packet is sent to the controller through the data sending port, so that the wake-up of the main control chip is realized, and the reliability of the device is improved. And then, under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to the interrupt IO mode, and entering a deep sleep mode. Namely, under the condition that the communication message sent by the controller is not received within the specified time, the deep sleep mode is entered again so as to save the power consumption.
It should be noted that, for the specific working process of each module in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the above embodiment of the device wake-up method applied to the controller, another embodiment of the present invention provides a device wake-up apparatus applied to the controller, where a main control chip in a low power consumption device communicatively connected to the controller is in a deep sleep state, and a data receiving port of the main control chip is in an interrupt IO mode;
referring to fig. 6, the device wake-up apparatus includes:
the data sending module 21 is configured to send a wake-up instruction including a low-level signal to a data receiving port of the main control chip, so that the main control chip performs a main control chip wake-up operation, and controls a mode of the data receiving port to be switched to a serial port receiving IO mode;
and the data receiving module 22 is configured to receive a wake-up response message sent by the data sending port of the main control chip.
Further, still include:
a message sending module, configured to send a communication message to a data receiving port of the main control chip after the data receiving module 22 receives a wakeup response message sent by the data sending port of the main control chip, so that the main control chip resets the first timer when receiving the communication message within a first preset time of the first timer, processes the communication message, sends a communication feedback message to the controller after the communication message is processed, and controls a mode of the data receiving port to switch to the interrupt IO mode and enter a deep sleep mode when a new communication message sent by the controller is not received again through the data receiving port within the first preset time of the first timer; and the master control chip starts a timer after the mode of the data receiving port is switched to a serial port receiving IO mode.
Further, still include:
the third timer control module is used for starting the second timer; within a second preset time of the second timer, under the condition of receiving a wake-up response message sent by a data sending port of the main control chip, outputting communication success information; and outputting communication failure information when the wake-up response message sent by the data sending port of the main control chip is not received within a second preset time of the second timer.
In this embodiment, when the main control chip of the low power consumption device is in a deep sleep state, the data receiving port of the main control chip is in an interrupt IO mode, and when the main control chip receives a wake-up instruction including a low level signal sent by the controller through the data receiving port, the wake-up operation of the main control chip is performed, and the mode of the data receiving port is controlled to be switched to a serial port receiving IO mode, and a wake-up response packet is sent to the controller through the data sending port, so that the wake-up of the main control chip is realized, and the reliability of the device is improved. And then, under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to the interrupt IO mode, and entering a deep sleep mode. Namely, under the condition that the communication message sent by the controller is not received within the specified time, the deep sleep mode is entered again so as to save the power consumption.
It should be noted that, for the specific working process of each module in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the embodiments of the device wake-up method and apparatus, another embodiment of the present invention provides a device wake-up system, where the device wake-up system includes a low power consumption device and a controller;
the low-power consumption equipment is used for executing the equipment awakening method applied to the main control chip in the low-power consumption equipment;
the controller is used for executing the device awakening method applied to the controller;
the sending port of the controller is connected with the data receiving port of the low-power consumption equipment; the receiving port of the controller is connected with the data transmitting port of the low-power consumption equipment; and the grounding end of the controller is connected with the grounding end of the low-power consumption equipment.
Please refer to the corresponding description in the above embodiments for the connection relationship between the specific controller and the low power consumption device, which is not described herein again.
In this embodiment, when the main control chip of the low power consumption device is in a deep sleep state, the data receiving port of the main control chip is in an interrupt IO mode, and when the main control chip receives a wake-up instruction including a low level signal sent by the controller through the data receiving port, the wake-up operation of the main control chip is performed, and the mode of the data receiving port is controlled to be switched to a serial port receiving IO mode, and a wake-up response packet is sent to the controller through the data sending port, so that the wake-up of the main control chip is realized, and the reliability of the device is improved. And then, under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to the interrupt IO mode, and entering a deep sleep mode. Namely, under the condition that the communication message sent by the controller is not received within the specified time, the deep sleep mode is entered again so as to save the power consumption.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A device wake-up method is characterized in that the method is applied to a main control chip in low-power-consumption devices, and when the main control chip is in a deep sleep state, a data receiving port of the main control chip is in an interrupt IO mode; the device wake-up method comprises the following steps:
when a wake-up instruction including a low level signal sent by a controller is received through the data receiving port, a main control chip wake-up operation is carried out, and the mode of the data receiving port is controlled to be switched to a serial port receiving IO mode;
sending a wake-up response message to the controller through a data sending port;
and under the condition that the communication message sent by the controller is not received through the data receiving port within the specified time, controlling the mode of the data receiving port to be switched to the interrupt IO mode, and entering a deep sleep mode.
2. The device wake-up method according to claim 1, further comprising, after controlling the mode of the data receiving port to be switched to a serial port receiving IO mode:
starting a first timer;
determining whether a communication message sent by the controller is received through the data receiving port within a first preset time period by using a first timer; correspondingly, determining that the communication message sent by the controller is not received through the data receiving port within the specified time includes:
and if the first timer is used for determining that the communication message sent by the controller is not received through the data receiving port within the first preset time, determining that the communication message sent by the controller is not received through the data receiving port within the specified time.
3. The device wake-up method according to claim 2, further comprising:
resetting the first timer when determining that the communication message sent by the controller is received through the data receiving port within the designated time;
and processing the communication message, sending a communication feedback message to the controller after the communication message is processed, controlling the mode of the data receiving port to be switched to the interrupt IO mode and entering a deep sleep mode under the condition that a new communication message sent by the controller is not received through the data receiving port again within a first preset time period of the first timer.
4. The device wake-up method according to claim 1, wherein performing a main control chip wake-up operation comprises:
and carrying out equipment initialization operation.
5. A device wake-up method is characterized in that the method is applied to a controller, a main control chip in low-power-consumption equipment which is in communication connection with the controller is in a deep sleep state, and a data receiving port of the main control chip is in an interrupt IO mode;
the device wake-up method comprises the following steps:
sending a wake-up instruction comprising a low-level signal to a data receiving port of the main control chip so as to enable the main control chip to perform wake-up operation of the main control chip and control the mode of the data receiving port to be switched into a serial port receiving IO mode;
and receiving a wake-up response message sent by a data sending port of the main control chip.
6. The device wake-up method according to claim 5, further comprising, after receiving a wake-up response packet sent by the data sending port of the main control chip:
sending a communication message to a data receiving port of the main control chip, so that the main control chip resets a first timer under the condition that the main control chip receives the communication message within a first preset time of the first timer, processes the communication message, sends a communication feedback message to the controller after the communication message is processed, and controls the mode of the data receiving port to be switched to the interrupt IO mode and enter a deep sleep mode under the condition that a new communication message sent by the controller is not received again through the data receiving port within the first preset time of the first timer; and the master control chip starts a timer after the mode of the data receiving port is switched to a serial port receiving IO mode.
7. The device wake-up method according to claim 5, wherein receiving a wake-up response packet sent by a data sending port of the main control chip comprises:
starting a second timer;
within a second preset time of the second timer, under the condition of receiving a wake-up response message sent by a data sending port of the main control chip, outputting communication success information;
and outputting communication failure information when the wake-up response message sent by the data sending port of the main control chip is not received within a second preset time of the second timer.
8. The device awakening device is characterized by being applied to a main control chip in low-power-consumption devices, wherein when the main control chip is in a deep sleep state, a data receiving port of the main control chip is in an interrupt IO mode; the device wake-up apparatus includes:
the first mode switching module is used for performing wake-up operation on a main control chip and controlling the mode of the data receiving port to be switched into a serial port receiving IO mode under the condition that a wake-up instruction including a low level signal sent by a controller is received through the data receiving port;
the message sending module is used for sending a wake-up response message to the controller through the data sending port;
and the second mode switching module is used for controlling the mode of the data receiving port to be switched to the interrupt IO mode and enter a deep sleep mode under the condition that the communication message sent by the controller is determined not to be received through the data receiving port within the specified time.
9. The device awakening device is applied to a controller, a main control chip in low-power-consumption equipment in communication connection with the controller is in a deep sleep state, and a data receiving port of the main control chip is in an interrupt IO mode;
the device wake-up apparatus includes:
the data sending module is used for sending a wake-up instruction comprising a low-level signal to a data receiving port of the main control chip so as to enable the main control chip to carry out wake-up operation on the main control chip and control the mode of the data receiving port to be switched into a serial port receiving IO mode;
and the data receiving module is used for receiving the awakening response message sent by the data sending port of the main control chip.
10. A device wake-up system, comprising a low power device and a controller;
the low-power consumption device is used for executing the device wake-up method of any one of claims 1 to 4;
the controller is used for executing the device wake-up method of any one of claims 5 to 7;
the sending port of the controller is connected with the data receiving port of the low-power consumption equipment; the receiving port of the controller is connected with the data transmitting port of the low-power consumption equipment; and the grounding end of the controller is connected with the grounding end of the low-power consumption equipment.
CN202111333360.XA 2021-11-11 2021-11-11 Equipment awakening method, device and system Pending CN114035477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111333360.XA CN114035477A (en) 2021-11-11 2021-11-11 Equipment awakening method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111333360.XA CN114035477A (en) 2021-11-11 2021-11-11 Equipment awakening method, device and system

Publications (1)

Publication Number Publication Date
CN114035477A true CN114035477A (en) 2022-02-11

Family

ID=80137285

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111333360.XA Pending CN114035477A (en) 2021-11-11 2021-11-11 Equipment awakening method, device and system

Country Status (1)

Country Link
CN (1) CN114035477A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114578074A (en) * 2022-05-07 2022-06-03 深圳市帝迈生物技术有限公司 Starting method and system of sample detection system and computer readable storage device
CN115019494A (en) * 2022-06-02 2022-09-06 武汉领普科技有限公司 Wireless switch, processing method of wireless switch and control system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225316A (en) * 2015-09-23 2016-01-06 曾松峰 A kind of dormancy of electron key low-power consumption power supply plan and awakening method
CN107589824A (en) * 2017-09-21 2018-01-16 上海顺舟智能科技股份有限公司 It is a kind of to reduce the method for only supporting IO to wake up MCU power consumptions
CN107708189A (en) * 2017-09-29 2018-02-16 深圳市盛路物联通讯技术有限公司 A kind of device sleeps awakening method and system
CN108024211A (en) * 2016-11-04 2018-05-11 中兴通讯股份有限公司 A kind of equipment awakening method and equipment
CN110990066A (en) * 2019-11-26 2020-04-10 江苏嘉则信息技术有限公司 Sleep awakening method of communication terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225316A (en) * 2015-09-23 2016-01-06 曾松峰 A kind of dormancy of electron key low-power consumption power supply plan and awakening method
CN108024211A (en) * 2016-11-04 2018-05-11 中兴通讯股份有限公司 A kind of equipment awakening method and equipment
CN107589824A (en) * 2017-09-21 2018-01-16 上海顺舟智能科技股份有限公司 It is a kind of to reduce the method for only supporting IO to wake up MCU power consumptions
CN107708189A (en) * 2017-09-29 2018-02-16 深圳市盛路物联通讯技术有限公司 A kind of device sleeps awakening method and system
CN110990066A (en) * 2019-11-26 2020-04-10 江苏嘉则信息技术有限公司 Sleep awakening method of communication terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114578074A (en) * 2022-05-07 2022-06-03 深圳市帝迈生物技术有限公司 Starting method and system of sample detection system and computer readable storage device
CN115019494A (en) * 2022-06-02 2022-09-06 武汉领普科技有限公司 Wireless switch, processing method of wireless switch and control system
CN115019494B (en) * 2022-06-02 2024-02-06 武汉领普科技有限公司 Wireless switch, processing method and control system of wireless switch

Similar Documents

Publication Publication Date Title
CN109857243B (en) System-on-chip, universal serial bus master device, system and awakening method
CN102799550B (en) Based on the waking up of chip chamber high-speed interface HSIC, hot-plug method and equipment
CN114035477A (en) Equipment awakening method, device and system
WO2018157689A1 (en) Method for implementing low power consumption on standby for bluetooth security device and bluetooth security device
CN107295615B (en) Method for waking up wireless equipment
US8307233B2 (en) Bus-handling
CN110568919B (en) Device for reducing chip power consumption
CN103857021A (en) Method for controlling Bluetooth device, Bluetooth device and electronic device
CN110572869A (en) equipment awakening method and device based on BLE and Hall switch
CN110320840B (en) Method and system capable of reducing power consumption of Internet of things product battery
US7373134B2 (en) Multiple-CPU portable terminal with communication function and control method
CN109887143B (en) Control method and device for intelligent door lock and intelligent door lock
CN108289323A (en) A kind of low power-consumption intelligent home wireless control mode based on zigbee
CN110475321B (en) Power-saving optimization method and device for wireless local area network (AP)
CN112559082B (en) Terminal device, NFC clock control method, NFC module and medium
CN110990066B (en) Sleep awakening method of communication terminal
CN111600785A (en) M-BUS intelligent water meter low-power-consumption communication method
TW201012189A (en) Reciprocal wake-up system for handheld devices with insert type wireless communication module and a method therefore
CN112104997B (en) Internet of things meter and control method thereof
CN114076963A (en) Control device and control system of Beidou equipment
CN219831808U (en) Wake-up device
CN104536840A (en) Watchdog timer and control method thereof
CN113141626B (en) Event sending method, system, terminal equipment and related device
CN112907854B (en) Wireless awakening method of wireless acousto-optic electric alarm and wireless acousto-optic electric alarm
CN220673775U (en) Wake-up system applied to RS485 network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination