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

Equipment awakening method, device and system Download PDF

Info

Publication number
CN115309080A
CN115309080A CN202210903761.2A CN202210903761A CN115309080A CN 115309080 A CN115309080 A CN 115309080A CN 202210903761 A CN202210903761 A CN 202210903761A CN 115309080 A CN115309080 A CN 115309080A
Authority
CN
China
Prior art keywords
port
control board
main control
board
slave
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
CN202210903761.2A
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.)
Shenzhen Wrigley Smart Home Co ltd
Original Assignee
Shenzhen Wrigley Smart Home 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 Shenzhen Wrigley Smart Home Co ltd filed Critical Shenzhen Wrigley Smart Home Co ltd
Priority to CN202210903761.2A priority Critical patent/CN115309080A/en
Publication of CN115309080A publication Critical patent/CN115309080A/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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Information Transfer Systems (AREA)

Abstract

The invention discloses a device awakening method, a device and a system, wherein the device awakening method comprises the following steps: when the working state of the main control board enters a standby mode, carrying out port multiplexing on a first port of a serial port on the main control board and a general input/output interface of the main control board or an external interrupt interface so as to enable the first port to be used as an external interrupt trigger port; receiving an equipment awakening signal sent by a slave board through a first port, wherein the equipment awakening signal is sent by a second port of a serial port on the slave board after the slave board determines that the working state is in a working mode, and the determination of the working state is carried out after the slave board obtains an external awakening signal; and performing external interrupt awakening according to the equipment awakening signal, and adjusting the working state of the main control board from a standby mode to a working mode. The method and the device solve the problem that the device cannot be awakened through serial port communication, can awaken the device through the serial port without additional hardware setting, reduce the design difficulty and have low equipment awakening cost.

Description

Equipment awakening method, device and system
Technical Field
The invention relates to the technical field of serial port communication, in particular to a device awakening method, device and system.
Background
At present, the electric control schemes of household appliances and the like have national standard requirements of energy efficiency grade, and the common method is to enable an electric control system to enter a standby mode, close most of peripheral equipment of a Micro Control Unit (MCU), and enter the standby mode to carry out energy-saving dormancy.
In the related art, after an electric control system requiring a board to be connected with the board through a serial port enters a standby mode, a serial port peripheral of a main control board is closed, and the main control board cannot communicate with an external board through the serial port, namely cannot be waken up through the serial port. An independent connecting wire is needed to be connected with an external interrupt port of the MCU between the boards, the MCU is used for external interrupt awakening, or the MCU which is expensive and has the function of awakening by the serial port in the standby mode is replaced, so that the cost of awakening the equipment is increased, and the difficulty of hardware design is increased.
Disclosure of Invention
The embodiment of the invention provides a device awakening method, a device and a system, which can awaken a device through a serial port without additional hardware setting, reduce the design difficulty and have low device awakening cost.
In a first aspect, an embodiment of the present invention provides an apparatus wake-up method, which is applied to a main control board, and includes: when the working state of the main control board enters a standby mode, carrying out port multiplexing on a first port of a serial port on the main control board and a general input/output interface of the main control board or an external interrupt interface so as to enable the first port to be used as an external interrupt trigger port; receiving an equipment awakening signal sent by a slave board through the first port, wherein the equipment awakening signal is sent through a second port of a serial port on the slave board after the slave board determines that the working state is in a working mode, and the determination of the working state is carried out after the slave board obtains an external awakening signal; and performing external interrupt awakening according to the equipment awakening signal, and adjusting the working state of the main control board from the standby mode to the working mode.
In an embodiment, after the operating state of the main control board enters the standby mode, the method further includes: closing serial port peripherals which are correspondingly connected with external equipment on the main control board; and starting the external interrupt peripheral of the general input/output interface of the main control board, or starting the external interrupt peripheral of the main control board.
In an embodiment, the performing port multiplexing on the first port of the serial port on the main control board and the general input/output interface of the main control board, or the external interrupt interface includes: taking one of a receiving port or a sending port of a serial port on the main control board as a first port, and carrying out port multiplexing with a general input/output interface so as to enable the first port to correspond to a general input/output interface register; or, one of a receiving port or a sending port of a serial port on the main control board is used as a first port, and the first port and an external interrupt interface are subjected to port multiplexing, so that the first port corresponds to an external interrupt register.
In an embodiment, after the adjusting the operating state of the main control board from the standby mode to the operating mode, the method further includes: when the first port corresponds to the general input/output interface register, sending a wake-up feedback signal to the slave board through the first port so that the slave board confirms that the master control board is successfully woken up; or when the first port corresponds to the external interrupt register, starting a universal input/output interface peripheral of the master control board, taking the other of a receiving port or a sending port of a serial port on the master control board as a third port, performing port multiplexing with a universal input/output interface so as to enable the third port to correspond to the universal input/output interface register, and sending a wake-up feedback signal to the slave board through the third port so as to enable the slave board to confirm that the master control board is successfully awakened; and closing the external interrupt peripheral of the general input output interface, or closing the external interrupt peripheral of the general input output interface and the external interrupt peripheral, stopping the port multiplexing of at least one of the receiving port or the sending port, and opening the serial peripheral.
In an embodiment, the slave board is further configured to use a sending port of a serial port on the slave board as the second port according to a serial port function, and send a device wake-up signal to the first port directly through the second port; or the slave board is further configured to perform port multiplexing on one of a receiving port or a sending port of a serial port on the slave board and a general input/output interface of the slave board, and send a device wake-up signal to the first port through the second port.
In a second aspect, an embodiment of the present invention further provides an apparatus wake-up method, applied to a slave board, including: acquiring an external wake-up signal; determining the working state of the slave board as a working mode according to the external wake-up signal; after the working mode is adjusted, sending a device awakening signal to a first port of a serial port on a main control board through a second port of the serial port on the slave board, so that after the main control board receives the device awakening signal, the main control board performs external interrupt awakening according to the device awakening signal, and adjusts the working state of the main control board from a standby mode to the working mode; after the main control board enters a standby mode in a working state, the first port and a general input/output interface of the main control board or an external interrupt interface are subjected to port multiplexing, so that the first port serves as an external interrupt trigger port to receive the equipment awakening signal.
In an embodiment, the sending the device wake-up signal to the first port of the serial port on the main control board through the second port of the serial port on the slave board includes: according to the serial port function, a sending port of the serial port on the slave board is used as a second port, and a device awakening signal is directly sent to the first port through the second port; or, one of a receiving port or a sending port of the serial port on the slave board is used as a second port, and the second port and the general input/output interface of the slave board are subjected to port multiplexing, so that the second port corresponds to the general input/output interface register, and a device wake-up signal is sent to the first port through the second port.
In an embodiment, the method further comprises: when the sending port of the serial port on the slave board is used as the second port, the receiving port of the serial port on the slave board is used as a fourth port, and a wake-up feedback signal sent by the main control board is received through the fourth port, so that the main control board is determined to be successfully woken up; or, when the second port corresponds to the general input/output interface register, receiving a wake-up feedback signal sent by the main control board through the second port, and determining that the main control board is successfully woken up; and the awakening feedback signal is obtained after the main control board changes from the standby mode to the working mode according to the working state.
In a third aspect, an embodiment of the present invention further provides a device wake-up apparatus, which is provided with a processor, and the processor is configured to execute the device wake-up method according to any one of the embodiments of the first aspect of the present invention, or the device wake-up method according to any one of the embodiments of the second aspect of the present invention.
In a fourth aspect, an embodiment of the present invention further provides an apparatus wake-up system, including a master control board and a slave board, where a first port of a serial port on the master control board is in communication connection with a second port of a serial port on the slave board; the main control board is configured to execute the device wake-up method according to any one of embodiments of the first aspect of the present invention; the slave board is configured to perform the device wake-up method according to any one of the embodiments of the second aspect of the present invention.
The embodiment of the invention at least comprises the following beneficial effects: the embodiment of the invention provides a device awakening method, a device and a system, wherein the device awakening method can be applied to a main control board or a slave board, and can be implemented to receive a device awakening signal sent by the slave board through a serial port by multiplexing a first port of a serial port on the main control board and a general input/output interface of the main control board or an external interrupt interface after the main control board is in a standby mode, and the first port of the serial port on the main control board can be used as a trigger port of external interrupt after the port is multiplexed, so that the main control board can be awakened after the device awakening signal is received, and the main control board enters a working mode.
Drawings
FIG. 1 is a diagram of an electrical control architecture provided in accordance with one embodiment of the present invention;
FIG. 2 is a diagram of an electrical control architecture provided by another embodiment of the present invention;
fig. 3 is a flowchart illustrating a device wake-up method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a device wake-up method according to another embodiment of the present invention;
fig. 5 is a flowchart illustrating a device wake-up method according to another embodiment of the present invention;
fig. 6 is a flowchart illustrating a device wake-up method according to another embodiment of the present invention;
fig. 7 is a flowchart illustrating a device wake-up method according to another embodiment of the present invention;
fig. 8 is a flowchart illustrating a device wake-up method according to another embodiment of the present invention;
fig. 9 is a flowchart illustrating a device wake-up method according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be understood that in the description of the embodiments of the present invention, a plurality (or a plurality) means two or more, more than, less than, more than, etc. are understood as excluding the number, and more than, less than, etc. are understood as including the number. If the description of "first", "second", etc. is used for the purpose of distinguishing technical features, it is not intended to indicate or imply relative importance or to implicitly indicate the number of indicated technical features or to implicitly indicate the precedence of the indicated technical features.
A Single Chip Microcomputer (MCU), also called as a Single Chip Microcomputer or a Single Chip Microcomputer, is a Chip-level computer that appropriately reduces the frequency and specification of a Central Processing Unit (CPU), and integrates peripheral interfaces such as a memory, a counter, a USB, an a/D converter, a UART, a PLC, a DMA, and even an LCD driving circuit into a Single Chip, thereby performing different combination control for different applications.
For the MCU, the peripheral device refers to a peripheral function module outside the single chip, such as a keyboard control chip, a liquid crystal, an a/D conversion chip, etc., and the peripheral device can be controlled by buses of the single chip, such as I/O, SPI, I2C, etc.
General-Purpose input/output interfaces (GPIO interfaces), in embedded systems, often need to control many external devices or circuits with simple structures, some of these devices need to be controlled by a CPU, and some need to provide input signals by the CPU. The control of the device is complicated by using a traditional serial port or a traditional parallel port, so a general programmable I/O port, namely a GPIO, is usually provided on the embedded microprocessor, and when the IO port is used as the GPIO, the GPIO can input or output high or low level. One GPIO port needs at least two registers, one is a general IO port control register for control, and the other is a general I/O port data register for storing data.
The embodiment of the invention provides a device awakening method, a device and a system, wherein the device awakening method can be applied to a main control board or a slave board, and can be used for multiplexing a first port of a serial port on the main control board and a general input/output interface of the main control board or an external interrupt interface after the main control board is in a standby mode, receiving a device awakening signal sent by the slave board through the serial port, wherein the device awakening signal is an external interrupt signal which can be a high-level signal and can also be a low-level signal when low-level triggering is met.
It is understood that if a GPIO can be multiplexed into a functional pin of an internal peripheral, when the GPIO is used as an internal peripheral, it is called port multiplexing.
As shown in fig. 1, fig. 1 is an electric control architecture diagram of an implementation scheme in an embodiment of the present invention, where MCUs are both disposed in a master control board and a slave board, the MCU in the master control board is provided with a CPU, a GPIO register, and a serial register, and the GPIO register and the serial register are registers related to a GPIO and a serial port to implement a GPIO function and a serial port function, where no specific limitation is imposed on the registers, a serial port on the master control board includes a transmit port (TX) and a receive port (RX), an MCU in the slave board is provided with a CPU, a GPIO register, and a serial port of the slave board also includes a transmit port (TX) and a receive port (RX).
In fig. 1, the first port may be one of a transmitting port or a receiving port of a serial port of a main control board, that is, the transmitting port or the receiving port on the main control board may both perform port multiplexing with GPIO, after the port multiplexing is performed, the original transmitting port or receiving port may both perform receiving and sending of information, the second port is a transmitting port of a serial port on a slave board, and the fourth port is a receiving port of a serial port on the slave board. It is understood that the GPIO register on the master control board may correspond to the original receiving port and the original transmitting port, as long as the external interrupt signal transmitted from the slave board can be received, and is not limited herein.
As shown in fig. 1, in the embodiment of the present invention, before entering a standby state, the master control board communicates with the slave board through a serial port, and after feedback from the slave board is obtained, the master control board turns off the serial peripheral, turns on the GPIO external interrupt peripheral, and enters the standby state, the slave board also enters the standby state, and after receiving an external button or waking up in another manner, the slave board sends a high level through its transmitting port to wake up the master control board, and may send the high level to a receiving port or a transmitting port on the master control board, where sending the high level to the receiving port is taken as an example. And after receiving the wake-up signal, the main control board returns to the working state from the standby state, the GPIO peripheral is closed, the serial port peripheral is opened, the main control board and the slave board confirm the serial port of the working state, and finally the system is returned and started.
As shown in fig. 2, fig. 2 is an electric control architecture diagram of another implementation scheme in an embodiment of the present invention, where MCUs are both disposed in a master control board and a slave board, the MCU in the master control board is provided with a CPU, a GPIO register, an external interrupt register, and a serial port register, and the GPIO register and the serial port register are registers related to a GPIO and a serial port to implement a GPIO function and a serial port function, where no specific limitation is imposed on the registers, a serial port of the master control board includes a transmit port (TX) and a receive port (RX), an MCU in the slave board is provided with a CPU, a GPIO register, and a serial port of the slave board also includes a transmit port (TX) and a receive port (RX).
In fig. 2, the first port is one of a receiving port or a transmitting port of the serial port on the main control board, and the third port is the other of the receiving port or the transmitting port of the serial port on the main control board, that is, one of the receiving port or the transmitting port on the main control board performs port multiplexing with the GPIO, and the other performs port multiplexing with the external interrupt interface. After the port multiplexing, one of the original transmitting port or receiving port can transmit information, the other can receive information, the second port can be one of the transmitting port or receiving port of the serial port on the slave board, namely, the transmitting port or receiving port on the slave board can be subjected to the port multiplexing with the GPIO, and after the port multiplexing is carried out, the original transmitting port or receiving port can be subjected to the receiving and transmitting of information. It can be understood that the GPIO register on the master control board may correspond to the original receiving port and the original transmitting port, and for the master control board, the external interrupt register may also correspond to both the original receiving port and the original transmitting port, as long as the external interrupt signal transmitted by the slave board can be received, while the GPIO register on the slave board may correspond to both the original receiving port and the original transmitting port, as long as the external interrupt signal can be transmitted to the master control board, which is not limited herein.
As shown in fig. 2, in the embodiment of the present invention, before the master board enters the standby mode, the master board communicates with the slave board through the serial port, and after feedback from the slave board is obtained, the master board turns off the serial peripheral, turns on the GPIO peripheral and the external interrupt peripheral, enters the standby mode, and the slave board turns off the serial peripheral, turns on the GPIO peripheral, and then also enters the standby mode, and after the slave board receives an external button or is awakened in another mode, the slave board sends out a high level to awaken the master board through the GPIO. The master control board receives the high-level external interrupt wake-up signal and then returns to the working state from the standby state, the GPIO signal and the slave board confirm that the confirmation is successful, the master control board and the slave board close the GPIO and interrupt the peripheral, the serial peripheral is started, and finally the system reset starting is completed.
Referring to fig. 3, an embodiment of the present invention provides a device wake-up method, which is applied to a master control board, where the master control board and a slave board may be in communication connection, and structures of the master control board and the slave board have been described in the foregoing embodiment, and are not described herein again, where the device wake-up method includes, but is not limited to, the following steps S101 to S103.
Step S101, when the working state of the main control board enters a standby mode, the first port of the serial port on the main control board and the general input/output interface of the main control board or the external interrupt interface are subjected to port multiplexing, so that the first port is used as an external interrupt trigger port.
Step S102, receiving an equipment awakening signal sent from the machine board through the first port, wherein the equipment awakening signal is sent from the slave board through the second port of the serial port on the machine board after the slave board determines that the working state is the working mode, and the determination of the working state is performed after the slave board obtains the external awakening signal.
And step S103, performing external interrupt awakening according to the equipment awakening signal, and adjusting the working state of the main control board from a standby mode to a working mode.
In an embodiment, after the working state of the main control board enters the standby mode, in order to enable the serial port to receive the device wake-up signal, port multiplexing is required, and a first port of the serial port on the main control board and a GPIO or an external interrupt interface on the main control board are subjected to port multiplexing, where the external interrupt interface may be one of the GPIOs, the GPIO may also implement the external interrupt function, or may be another interface in the MCU that may implement the external interrupt function, where no specific limitation is imposed here, the first port is one of the ports on the serial port, and after the port multiplexing, the device wake-up signal may be received and used as an external interrupt trigger port, and then when the device wakes up, the slave board may send the device wake-up signal to the main control board after determining that the working state is the working mode, and the sent device wake-up signal may be used as the external interrupt trigger signal or a wake-up signal, which may be a high-level signal, and the first port may receive the device wake-up signal sent from the slave board, and perform external wake-up, and finally wake-up the main control board may be adjusted from the standby mode to the working state of the main control board to the working mode. According to the embodiment of the invention, the device where the main control board is located can be awakened through the serial port without additional hardware setting, so that the design difficulty is reduced, and the equipment awakening cost is low.
It can be understood that, after the master control board enters the standby mode, the slave board may also enter the standby mode, after receiving the wake-up signal, the slave board enters the working mode from the standby mode, and then sends the device wake-up signal to the master control board, or the slave board may be in the working mode from the beginning, when receiving the external wake-up signal, it prompts that the slave board needs to wake up the master control board, and then after confirming that the current working state is the working mode, the slave board sends the device wake-up signal to the master control board to wake up the master control board and the device where the master control board is located.
The embodiment of the invention effectively solves the problem that the prior board can not be awakened through serial port communication in the standby mode, has simple and reliable scheme and low cost, does not need redundant Pin wires in hardware design, and can complete standby awakening only under the condition of reserving the serial port, thereby reducing the design difficulty.
Referring to fig. 4, in an embodiment, after the operating state of the main control board enters the standby mode, the step S101 may further include, but is not limited to, the following steps S201 to S203.
Step S201, the serial peripheral connected to the external device on the main control board is closed.
Step S202, the external interrupt peripheral of the general input/output interface of the main control board is started, or the external interrupt peripheral of the main control board is started.
In an embodiment, the main control board in the embodiment of the present invention needs to perform energy saving sleep when entering the standby mode, so that the main control board needs to turn off a serial peripheral correspondingly connected to an external device on the main control board, and determine a peripheral that needs to be turned on according to a port multiplexing condition, for example, when a first port of a serial port on the main control board needs to be port-multiplexed with a GPIO, a GPIO external interrupt peripheral of the main control board is turned on. It is understood that, when the external interrupt interface is a part of GPIO, the external interrupt register is a corresponding GPIO register for implementing the external interrupt function.
Referring to fig. 5, in an embodiment, the step S101 may further include, but is not limited to, the following steps S301 to S302.
Step S301, one of the receiving port or the sending port of the serial port on the main control board is used as a first port, and the first port and the general input/output interface are subjected to port multiplexing, so that the first port corresponds to the general input/output interface register.
Step S302, or one of the receiving port or the sending port of the serial port on the main control board is used as the first port, and performs port multiplexing with the external interrupt interface, so that the first port corresponds to the external interrupt register.
In an embodiment, the serial port on the main control board includes a receiving port (RX) and a transmitting port (TX), and the first port may be one of the receiving port or the transmitting port, specifically, after the main control board enters the standby mode, the main control board may use one of the receiving port or the transmitting port of the serial port on the main control board as the first port, and perform port multiplexing with the GPIO so that the first port corresponds to the GPIO register, or may use one of the receiving port or the transmitting port of the serial port on the main control board as the first port, and perform port multiplexing with the external interrupt interface so that the first port corresponds to the external interrupt register, and finally, the device wake-up signal may be received through the receiving port or the transmitting port on the serial port.
Referring to fig. 6, in an embodiment, after the step S103, the following steps S401 to S403 may be further included, but are not limited thereto.
Step S401, when the first port corresponds to the general input/output interface register, sending a wake-up feedback signal to the slave board through the first port, so that the slave board confirms that the master board is successfully woken up.
Step S402, or when the first port corresponds to the external interrupt register, starting the universal input/output interface peripheral of the main control board, taking the other one of the receiving port or the sending port of the serial port on the main control board as a third port, performing port multiplexing with the universal input/output interface to enable the third port to correspond to the universal input/output interface register, and sending a wake-up feedback signal to the slave board through the third port to enable the slave board to confirm that the main control board is successfully woken up.
Step S403, the external interrupt peripheral of the general input/output interface is closed, or the external interrupt peripheral and the general input/output interface are closed, the multiplexing of at least one port of the receiving port or the sending port is stopped, and the serial peripheral is opened.
In an embodiment, when the master control board uses one of the receiving port or the transmitting port of the serial port as the first port to perform port multiplexing with the general GPIO, so that the first port corresponds to the GPIO register, the first port can be used to implement receiving and transmitting of information.
Or when the master control board uses one of the receiving port or the transmitting port of the serial port as the first port to perform port multiplexing with the external interrupt interface so that the first port corresponds to the external interrupt register, the first port cannot transmit information and can only receive information, so that the master control board uses the other of the receiving port or the transmitting port of the serial port on the master control board as the third port to perform port multiplexing with the GPIO so that the third port corresponds to the GPIO register, and transmits a wake-up feedback signal to the slave board through the third port so as to enable the slave board to confirm that the master control board is successfully awakened. For example, when the receiving port of the serial port on the main control board corresponds to the external interrupt register, the sending port is used as the third port, or when the sending port of the serial port on the main control board corresponds to the external interrupt register, the receiving port is used as the third port.
After the main control board adjusts the working state from the standby mode to the working mode, the main control board can also close the GPIO external interrupt peripheral, or close the GPIO peripheral and the external interrupt peripheral, stop the multiplexing of at least one port of the receiving port or the sending port, open the serial port peripheral, complete the awakening of the main control board finally, and the main control board can realize the function of the main control board through the serial port.
In an embodiment, the slave board is further configured to use a sending port of a serial port on the slave board as a second port according to a serial port function, and send a device wake-up signal to the first port directly through the second port; or, the slave board is further configured to perform port multiplexing with a general input/output interface of the slave board by using one of a receiving port and a transmitting port of a serial port on the slave board as a second port, and transmit a device wake-up signal to the first port through the second port.
In an embodiment, the serial port on the slave board also includes a sending port and a receiving port, and the second port on the slave board may be one of the sending port and the receiving port, specifically, when the slave board directly sends the device wake-up signal according to the serial port function, the slave board uses the sending port of the serial port as the second port and directly sends the device wake-up signal to the first port through the second port, or the slave board may also send and receive the signal through a GPIO.
In an embodiment, the slave board sends the device wake-up signal through the second port, the serial port on the slave board also includes a receiving port and a sending port, the second port may be one of the receiving port or the sending port, and the slave board may also receive the wake-up feedback signal sent by the master control board through the serial port. As described in the foregoing embodiment, when the slave board directly sends the device wake-up signal according to the serial port function, the master board uses the receiving port of the serial port as the fourth port and receives the device wake-up signal sent by the master board through the fourth port, or when the slave board uses one of the receiving port and the sending port of the serial port as the second port and performs port multiplexing with a GPIO on the slave board, the slave board may use the other of the receiving port and the sending port as the fourth port and receives the device wake-up signal sent by the master board through the fourth port, thereby finally achieving receiving and sending of the slave board signal.
Referring to fig. 7, an embodiment of the present invention provides a device wake-up method, which is applied to a slave board, where a communication connection may be performed between a master control board and the slave board, and structures of the master control board and the slave board have been described in the foregoing embodiment, and are not described herein again, where the device wake-up method includes, but is not limited to, the following steps S501 to S503.
Step S501, an external wake-up signal is acquired.
Step S502, determining the working state of the slave board as a working mode according to the external wake-up signal.
Step S503, after the working mode is adjusted, sending a device wake-up signal from the second port of the serial port on the board to the first port of the serial port on the main control board, so that the main control board performs external interrupt wake-up according to the device wake-up signal after receiving the device wake-up signal, and adjusts the working state of the main control board from the standby mode to the working mode.
In an embodiment, after the main control board enters the standby mode in the working state, the first port and the general input/output interface of the main control board or the external interrupt interface are subjected to port multiplexing, so that the first port serves as an external interrupt trigger port to receive the device wake-up signal.
In an embodiment, after the working state of the main control board enters the standby mode, in order to enable the serial port to receive the device wake-up signal, port multiplexing is required, and a first port of the serial port on the main control board and a GPIO or an external interrupt interface on the main control board are subjected to port multiplexing, where the external interrupt interface may be one of the GPIOs, the GPIO may also implement the external interrupt function, or may be another interface in the MCU that may implement the external interrupt function, where no specific limitation is imposed here, the first port is one of the ports on the serial port, and after the port multiplexing, the device wake-up signal may be received and used as an external interrupt trigger port, and then when the device wakes up, the slave board may send the device wake-up signal to the main control board after determining that the working state is the working mode, and the sent device wake-up signal may be used as the external interrupt trigger signal or a wake-up signal, which may be a high-level signal, and the first port may receive the device wake-up signal sent from the slave board, and perform external wake-up, and finally wake-up the main control board may be adjusted from the standby mode to the working state of the main control board to the working mode. According to the embodiment of the invention, the device where the main control board is located can be awakened through the serial port without additional hardware setting, so that the design difficulty is reduced, and the equipment awakening cost is low.
It can be understood that, after the master control board enters the standby mode, the slave board may also enter the standby mode, and after receiving the wake-up signal, the slave board enters the working mode from the standby mode, and then sends the device wake-up signal to the master control board, or the slave board may be in the working mode from the beginning, and when receiving the external wake-up signal, it prompts the slave board to wake up the master control board, and then after confirming that the current working state is the working mode, the slave board sends the device wake-up signal to the master control board, so as to wake up the master control board and the device where the master control board is located.
The embodiment of the invention effectively solves the problem that the prior board can not be awakened through serial port communication in the standby mode, has simple and reliable scheme and low cost, does not need redundant Pin wires in hardware design, and can complete standby awakening only under the condition of reserving the serial port, thereby reducing the design difficulty.
Referring to fig. 8, in an embodiment, the step S503 may further include, but is not limited to, the following steps S601 to S602.
Step S601, according to the serial port function, taking the sending port of the serial port on the slave board as a second port, and directly sending the equipment awakening signal to the first port through the second port.
Step S602, or, taking one of the receiving port or the sending port of the serial port on the slave board as a second port, and performing port multiplexing with the general input/output interface of the slave board, so that the second port corresponds to the general input/output interface register, and sending the device wake-up signal to the first port through the second port.
In an embodiment, the serial port on the slave board also includes a sending port and a receiving port, and the second port on the slave board may be one of the sending port and the receiving port, specifically, when the slave board directly sends the device wake-up signal according to the serial function, the slave board uses the sending port of the serial port as the second port and directly sends the device wake-up signal to the first port through the second port, or the slave board may also send and receive the signal through the GPIO.
Referring to fig. 9, in an embodiment, the method in the embodiment of the present invention may further include, but is not limited to, the following steps S701 to S702.
And step S701, when the sending port of the serial port on the slave board is used as a second port, the receiving port of the serial port on the slave board is used as a fourth port, and the awakening feedback signal sent by the main control board is received through the fourth port, so that the main control board is confirmed to be awakened successfully.
Step S702, or when the second port corresponds to the general input/output interface register, receiving a wake-up feedback signal sent by the main control board through the second port, and determining that the main control board is successfully woken up.
In an embodiment, the wake-up feedback signal is obtained by the main control board from a standby mode to an operating mode according to the operating state.
In an embodiment, when the master control board uses one of the receiving port or the transmitting port of the serial port as the first port, and performs port multiplexing with the GPIO so that the first port corresponds to the GPIO register, the receiving and transmitting of information can be achieved through the first port, and therefore, in the embodiment of the present invention, a wake-up feedback signal can be sent to the slave board through the first port to prompt that the master control board of the slave board has achieved device wake-up, and after receiving the wake-up feedback signal sent by the master control board, the slave board can confirm that the master control board has successfully woken up, and prompt feedback such as display, sound and the like can be performed based on the wake-up feedback, which is not particularly limited herein.
Or when the main control board takes one of the receiving port or the sending port of the serial port as the first port and performs port multiplexing with the external interrupt interface so that the first port corresponds to the external interrupt register, the first port cannot transmit information and can only receive information, so that the main control board takes the other of the receiving port or the sending port of the serial port on the main control board as the third port and performs port multiplexing with the GPIO so that the third port corresponds to the GPIO register, and sends a wake-up feedback signal to the slave board through the third port so as to ensure that the slave board confirms that the main control board wakes up successfully. For example, when the receiving port of the serial port on the main control board corresponds to the external interrupt register, the sending port is used as the third port, or when the sending port of the serial port on the main control board corresponds to the external interrupt register, the receiving port is used as the third port.
After the main control board adjusts the working state from the standby mode to the working mode, the main control board can also close the GPIO external interrupt peripheral, or close the GPIO peripheral and the external interrupt peripheral, stop the multiplexing of at least one port of the receiving port or the sending port, open the serial port peripheral, complete the awakening of the main control board finally, and the main control board can realize the function of the main control board through the serial port.
In an embodiment, the slave board sends the device wake-up signal through the second port, the serial port on the slave board also includes a receiving port and a sending port, the second port may be one of the receiving port or the sending port, and the slave board may also receive the wake-up feedback signal sent by the master control board through the serial port. As described in the foregoing embodiment, when the slave board directly transmits the device wake-up signal according to the serial port function, the master board uses the receiving port of the serial port as the fourth port, and receives the device wake-up signal transmitted by the master board through the fourth port, or when the slave board uses one of the receiving port or the transmitting port of the serial port as the second port and performs port multiplexing with the GPIO on the slave board, the slave board may use the other of the receiving port or the transmitting port as the fourth port and receive the device wake-up signal transmitted by the master board through the fourth port, thereby finally achieving the receiving and transmitting of the slave board signal.
The embodiment of the invention also provides an equipment awakening device, which can be provided with the master control board or the slave board, or the equipment awakening device is the master control board or the slave board, so as to realize the steps described in any one of the embodiments, realize the corresponding functions, awaken equipment through a serial port, do not need to additionally set hardware, reduce the design difficulty and have low equipment awakening cost. For example, when the device wake-up apparatus is provided with a main control board to implement the functions of the main control board, the device wake-up apparatus may perform steps S101 to S103 in fig. 3, steps S201 to S202 in fig. 4, steps S301 to S302 in fig. 5, and steps S401 to S403 in fig. 6 among the above method steps; when the device wake-up apparatus is provided with a slave board to implement the functions of the slave board, the device wake-up apparatus may perform steps S501 to S503 in fig. 7, steps S601 to S602 in fig. 8, and steps S701 to S702 in fig. 9 among the above method steps.
It can be understood that the device wake-up apparatus may be any one of a circuit board, a control device, or an intelligent home device itself, and the embodiment of the present invention is not limited in particular herein.
The embodiment of the present invention further provides an apparatus wake-up system, where the apparatus wake-up system may be provided with a master control board and a slave board, or include an apparatus having a master control board and a slave board, so as to implement the steps described in any of the above embodiments. It can be understood that the device wake-up system may be any circuit board, control device, or smart home device itself, and may wake up the device through the serial port without additional hardware setting, thereby reducing design difficulty and reducing device wake-up cost.
The above described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
It should also be understood that the various implementations provided by the embodiments of the present invention may be combined arbitrarily to achieve different technical effects. While the preferred embodiments of the present invention have been described in detail, it will be understood by those skilled in the art that the invention is not limited thereto, and various equivalent modifications and substitutions can be made without departing from the spirit of the invention.

Claims (10)

1. A device awakening method is applied to a main control board and is characterized by comprising the following steps:
when the working state of the main control board enters a standby mode, carrying out port multiplexing on a first port of a serial port on the main control board and a general input/output interface of the main control board or an external interrupt interface so as to enable the first port to be used as an external interrupt trigger port;
receiving an equipment awakening signal sent by a slave board through the first port, wherein the equipment awakening signal is sent through a second port of a serial port on the slave board after the slave board determines that the working state is in a working mode, and the determination of the working state is carried out after the slave board obtains an external awakening signal;
and performing external interrupt awakening according to the equipment awakening signal, and adjusting the working state of the main control board from the standby mode to the working mode.
2. The device wake-up method according to claim 1, wherein after the operating state of the main control board enters the standby mode, the method further comprises:
closing serial port peripherals which are correspondingly connected with external equipment on the main control board;
and starting the external interrupt peripheral of the general input/output interface of the main control board, or starting the external interrupt peripheral of the main control board.
3. The device wake-up method according to claim 2, wherein the port multiplexing of the first port of the serial port on the main control board and a general input/output interface of the main control board, or an external interrupt interface includes:
taking one of a receiving port or a sending port of a serial port on the main control board as a first port, and performing port multiplexing with a general input/output interface so as to enable the first port to correspond to a general input/output interface register;
or, one of a receiving port or a sending port of a serial port on the main control board is used as a first port, and the first port and an external interrupt interface are subjected to port multiplexing, so that the first port corresponds to an external interrupt register.
4. The device wake-up method according to claim 3, wherein after the adjusting the operating state of the main control board from the standby mode to the operating mode, the method further comprises:
when the first port corresponds to the general input/output interface register, sending a wake-up feedback signal to the slave board through the first port so that the slave board confirms that the master control board is successfully woken up;
or when the first port corresponds to the external interrupt register, starting a universal input/output interface peripheral of the master control board, taking the other of a receiving port or a sending port of a serial port on the master control board as a third port, performing port multiplexing with a universal input/output interface so as to enable the third port to correspond to the universal input/output interface register, and sending a wake-up feedback signal to the slave board through the third port so as to enable the slave board to confirm that the master control board is successfully awakened;
and closing the external interrupt peripheral of the general input/output interface, or closing the external interrupt peripheral of the general input/output interface and the external interrupt peripheral, stopping the port multiplexing of at least one of the receiving port or the sending port, and opening the serial peripheral.
5. The device wake-up method according to claim 1 or 4, wherein the slave board is further configured to use a sending port of a serial port on the slave board as the second port according to a serial port function, and send a device wake-up signal to the first port directly through the second port;
or, the slave board is further configured to use one of a receiving port or a sending port of a serial port on the slave board as a second port, perform port multiplexing with a general input/output interface of the slave board, and send a device wake-up signal to the first port through the second port.
6. A device wake-up method is applied to a slave board and is characterized by comprising the following steps:
acquiring an external wake-up signal;
determining the working state of the slave board as a working mode according to the external wake-up signal;
after the working mode is adjusted, sending a device awakening signal to a first port of a serial port on a main control board through a second port of the serial port on the slave board, so that after the main control board receives the device awakening signal, the main control board performs external interrupt awakening according to the device awakening signal, and adjusts the working state of the main control board from a standby mode to the working mode;
after the main control board enters a standby mode in a working state, the first port and a general input/output interface of the main control board or an external interrupt interface are subjected to port multiplexing, so that the first port serves as an external interrupt trigger port to receive the equipment awakening signal.
7. The device wake-up method according to claim 6, wherein the sending the device wake-up signal to the first port of the serial port on the main control board through the second port of the serial port on the slave board comprises:
according to the serial port function, taking a sending port of the serial port on the slave board as a second port, and directly sending a device wake-up signal to the first port through the second port;
or, one of a receiving port or a sending port of the serial port on the slave board is used as a second port, and the second port and the general input/output interface of the slave board are subjected to port multiplexing, so that the second port corresponds to the general input/output interface register, and a device wake-up signal is sent to the first port through the second port.
8. The device wake-up method according to claim 7, characterized in that the method further comprises:
when the sending port of the serial port on the slave board is used as the second port, the receiving port of the serial port on the slave board is used as a fourth port, and the awakening feedback signal sent by the main control board is received through the fourth port, so that the main control board is determined to be awakened successfully;
or, when the second port corresponds to the general input/output interface register, receiving a wake-up feedback signal sent by the main control board through the second port, and determining that the main control board is successfully woken up;
and the awakening feedback signal is obtained after the main control board changes from the standby mode to the working mode according to the working state.
9. Device wake-up unit, characterized in that a processor is provided for performing the device wake-up method of any of the claims 1 to 5 or the device wake-up method of any of the claims 6 to 8.
10. The equipment awakening system is characterized by comprising a master control board and a slave board, wherein a first port of a serial port on the master control board is in communication connection with a second port of a serial port on the slave board;
the main control board is used for executing the device wake-up method according to any one of claims 1 to 5;
the slave board is used for executing the device wake-up method according to any one of claims 6 to 8.
CN202210903761.2A 2022-07-28 2022-07-28 Equipment awakening method, device and system Pending CN115309080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210903761.2A CN115309080A (en) 2022-07-28 2022-07-28 Equipment awakening method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210903761.2A CN115309080A (en) 2022-07-28 2022-07-28 Equipment awakening method, device and system

Publications (1)

Publication Number Publication Date
CN115309080A true CN115309080A (en) 2022-11-08

Family

ID=83857964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210903761.2A Pending CN115309080A (en) 2022-07-28 2022-07-28 Equipment awakening method, device and system

Country Status (1)

Country Link
CN (1) CN115309080A (en)

Similar Documents

Publication Publication Date Title
EP2757839B1 (en) Power management method and apparatus for network access module
EP3844628B1 (en) Slave-to-slave direct communication
WO2018157689A1 (en) Method for implementing low power consumption on standby for bluetooth security device and bluetooth security device
CN214670566U (en) Computer wake-up circuit and computer
JPH08202469A (en) Microcontroller unit equipped with universal asychronous transmitting and receiving circuit
CN101369948B (en) Communication system implementing low-power consumption
US7373134B2 (en) Multiple-CPU portable terminal with communication function and control method
CN102445981B (en) Data transmission system and data transmission method
CN113741634B (en) State control method based on wearable device and wearable device
US6055642A (en) Single chip clock control circuit operating independently of CPU control
CN114035477A (en) Equipment awakening method, device and system
CN103488270B (en) Electricity saving method and electronic installation thereof
CN115309080A (en) Equipment awakening method, device and system
CN114020138B (en) Micro control unit chip and method for reducing electric quantity consumption
US6874047B1 (en) System and method for implementing an SMBus/I2C interface on a network interface card
US8526276B2 (en) Optical disk drive capable of reducing power consumption
US20050086407A1 (en) Interruption control system and method
TWI245179B (en) Method for PCI express power management using a PCI PM mechanism in a computer system
CN114661646A (en) Serial port switching control circuit
CN210691255U (en) Synchronous awakening device
CN113867787A (en) Switching system and method between server network cards
US20200065274A1 (en) Always-on ibi handling
CN219831808U (en) Wake-up device
JPH11191931A (en) Portable type electronic equipment and battery control method therefor
US20040215867A1 (en) Control chip, circuit and method thereof for inhibiting bus cycle

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