CN109426526B - Interface wake-up synchronization method, interface device and computer readable medium - Google Patents

Interface wake-up synchronization method, interface device and computer readable medium Download PDF

Info

Publication number
CN109426526B
CN109426526B CN201710747314.1A CN201710747314A CN109426526B CN 109426526 B CN109426526 B CN 109426526B CN 201710747314 A CN201710747314 A CN 201710747314A CN 109426526 B CN109426526 B CN 109426526B
Authority
CN
China
Prior art keywords
awakening
wake
interface
information
indication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710747314.1A
Other languages
Chinese (zh)
Other versions
CN109426526A (en
Inventor
余庆华
王泷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202110957297.0A priority Critical patent/CN113656084B/en
Priority to CN201710747314.1A priority patent/CN109426526B/en
Publication of CN109426526A publication Critical patent/CN109426526A/en
Application granted granted Critical
Publication of CN109426526B publication Critical patent/CN109426526B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Abstract

An interface wake-up synchronization method, an interface device, and a computer readable medium. The interface wake-up synchronization method comprises the following steps: sending awakening indication information to a target interface; receiving awakening indication response information sent by the target interface, and generating awakening confirmation information based on the awakening indication response information; sending the awakening confirmation information to the target interface; and after delaying the preset first time, entering a wake-up state. By applying the scheme, the source interface and the target interface can synchronously enter the awakening state, so that the state desynchronization caused by the fact that one party enters the awakening state and the other party is in the dormant state is avoided.

Description

Interface wake-up synchronization method, interface device and computer readable medium
Technical Field
Embodiments of the present invention relate to the field of communications, and in particular, to an interface wake-up synchronization method, an interface device, and a computer-readable medium.
Background
In an existing communication interface, such as a Universal Asynchronous Receiver/Transmitter (UART) interface, to save energy, the interface may operate in a Sleep/power saving Mode (Sleep/Doze Mode) when the interface is in a low activity state. After that, how to wake up the interface in Sleep/Doze Mode effectively and quickly becomes an important issue.
In the existing product implementation, there are two schemes of soft wake-up and hard wake-up. For the soft wake-up scheme, the source interface wakes up the target interface by sending a specific synchronization codeword (Magic Word) to the target interface, and the biggest problem of the scheme is that the synchronization between the source interface and the target interface cannot be ensured. For example, after the source interface sends the synchronization codeword to the target interface, the source interface enters an awake state, and the target interface may be in a sleep mode all the time due to channel degradation and failure to receive the synchronization codeword, thereby causing the source interface and the target interface to be out of synchronization. For the hard-wake scheme, in addition to the problem of synchronization of the source and target interfaces, additional pin (pins) overhead is required, resulting in further increased cost.
Disclosure of Invention
The technical problem solved by the embodiment of the invention is how to realize the awakening synchronization between the source interface and the target interface.
To solve the foregoing technical problem, an embodiment of the present invention provides an interface wake-up synchronization method, where the method includes: sending awakening indication information to a target interface; receiving awakening indication response information sent by the target interface, and generating awakening confirmation information based on the awakening indication response information; sending the awakening confirmation information to the target interface; and after delaying the preset first time, entering a wake-up state.
Optionally, the sending the wake-up indication information to the target interface includes: and periodically sending the awakening indication information according to a preset first period, and repeatedly sending the awakening indication information to the target interface according to a preset first sending frequency in each sending period.
Optionally, the receiving wake-up indication response information sent by the target interface, and based on the wake-up indication response information, generating wake-up confirmation information includes: and judging whether the frequency of the received awakening indication response information is greater than or equal to a preset second receiving frequency threshold, if so, stopping sending the awakening indication information, and generating awakening confirmation information based on the awakening indication response information.
Optionally, the generating wake-up confirmation information based on the wake-up indication response information includes: and encoding the awakening indication response information to generate awakening confirmation information.
Optionally, the sending the wake-up confirmation message to the target interface includes: and periodically sending the awakening confirmation information according to a preset third period, and repeatedly sending the awakening confirmation information to the target interface according to a preset third sending frequency in each sending period.
Optionally, the wake-up indication information includes: the wake-up system comprises wake-up event indication information and wake-up condition information, wherein the wake-up event indication information is suitable for representing wake-up events, and the wake-up condition information is suitable for representing occurrence conditions of the wake-up events.
Optionally, the sending is sending through a channel, and the receiving is receiving through a channel.
Optionally, the wake-up indication information or the wake-up confirmation information is sent through a channel, and the wake-up indication response information is received through the channel.
And sending the awakening indication information or awakening confirmation information through register writing operation, and receiving the awakening indication response information through register reading operation.
Optionally, the sending is sending by a write register operation, and the receiving is receiving by a read register operation.
Optionally, the interface includes any one of the following: UART interface, I2C interface, SPI interface, GPIO interface.
The embodiment of the invention provides another interface wake-up synchronization method, which comprises the following steps: receiving awakening indication information sent by a source interface, and generating awakening indication response information based on the awakening indication information; sending the awakening indication response information to the source interface; and receiving the awakening confirmation information sent by the source interface and entering an awakening state.
Optionally, the receiving the wake-up indication information sent by the source interface, and based on the wake-up indication information, generating wake-up indication response information includes: after receiving the awakening indication information sent by the source interface, entering a state to be awakened, and starting a first timer; if the number of times of the received awakening indication information before the first timer is overtime is greater than or equal to a preset first receiving number threshold, generating awakening indication response information based on the awakening indication information, and starting a second timer; and entering a sleep/power saving mode if the number of times of the received awakening indication information before the first timer is overtime is less than a preset first receiving number threshold.
Optionally, the generating wake-up indication response information based on the wake-up indication information includes: and coding the awakening indication information to generate awakening indication response information.
Optionally, the sending the wake-up indication response message to the source interface includes: and periodically sending the awakening indication response information according to a preset second period, and repeatedly sending the awakening indication response information to the source interface according to a preset second sending frequency in each sending period.
Optionally, the receiving the wake-up confirmation information sent by the source interface, and entering the wake-up state includes: if the number of times of receiving the awakening confirmation information before the second timer is overtime is larger than or equal to a preset third receiving number threshold, entering an awakening state; and entering a sleep/power saving mode if the number of times of the awakening confirmation information which is repeatedly received before the second timer is overtime is less than a preset third receiving time threshold.
Optionally, the wake-up indication information includes: the wake-up system comprises wake-up event indication information and wake-up condition information, wherein the wake-up event indication information is suitable for representing wake-up events, and the wake-up condition information is suitable for representing occurrence conditions of the wake-up events.
Optionally, the wake-up indication response message is sent through a channel, and the wake-up indication message or the wake-up confirmation message is received through the channel.
Optionally, the wake-up indication response message is sent through a write register operation, and the wake-up indication message or the wake-up confirmation message is received through a read register operation.
Optionally, the interface includes any one of the following: UART interface, I2C interface, SPI interface, GPIO interface.
An embodiment of the present invention provides an interface device, including: the first sending unit is suitable for sending the awakening indication information to the target interface; the first processing unit is suitable for receiving awakening indication response information sent by the target interface and generating awakening confirmation information based on the awakening indication response information; the second sending unit is suitable for sending the awakening confirmation information to the target interface; and the second processing unit is suitable for entering a wake-up state after delaying the preset first time length.
Optionally, the first sending unit includes: and the first sending subunit is suitable for periodically sending the awakening indication information according to a preset first period, and repeatedly sending the awakening indication information to the target interface according to a preset first sending frequency in each sending period.
Optionally, the first processing unit includes: the first judgment subunit is suitable for judging whether the frequency of the received awakening indication response information is greater than or equal to a preset second receiving frequency threshold or not; and the first processing subunit is suitable for stopping sending the awakening indication information when the number of times of the awakening indication response information is greater than or equal to a preset second receiving number threshold, and generating awakening confirmation information based on the awakening indication response information.
Optionally, the first processing unit is adapted to receive wake-up indication response information sent by the target interface, encode the wake-up indication response information, and generate wake-up confirmation information.
Optionally, the second sending unit includes: and the second sending subunit is suitable for periodically sending the awakening confirmation information according to a preset third period, and repeatedly sending the awakening confirmation information to the target interface according to the preset third sending times in each sending period.
Optionally, the wake-up indication information includes: the wake-up system comprises wake-up event indication information and wake-up condition information, wherein the wake-up event indication information is suitable for representing wake-up events, and the wake-up condition information is suitable for representing occurrence conditions of the wake-up events.
Optionally, the interface includes any one of the following: UART interface, I2C interface, SPI interface, GPIO interface.
An embodiment of the present invention provides an interface device, including: the third processing unit is suitable for receiving the awakening indication information sent by the source interface and generating awakening indication response information based on the awakening indication information; a third sending unit, adapted to send the wake-up indication response message to the source interface; and the fourth processing unit is suitable for receiving the awakening confirmation information sent by the source interface and entering an awakening state.
Optionally, the third processing unit includes: the first receiving subunit is suitable for entering a state to be awakened after receiving the awakening indication information sent by the source interface and starting a first timer; the second judgment subunit is adapted to judge whether the number of times of the received wake-up indication information before the timeout of the first timer is greater than or equal to a preset first receiving number threshold; the second processing subunit is suitable for generating awakening indication response information based on the awakening indication information and starting a second timer when the number of times of awakening indication information received before the first timer is overtime is greater than or equal to a preset first receiving time threshold; and the third processing subunit is adapted to enter a sleep/power saving mode when the number of times of receiving the wakeup indication information before the timeout of the first timer is less than a preset first receiving number threshold.
Optionally, the third processing unit is adapted to receive wakeup indication information sent by the source interface, encode the wakeup indication information, and generate wakeup indication response information.
Optionally, the third sending unit includes: and the third sending subunit is suitable for periodically sending the awakening indication response information according to a preset second period, and repeatedly sending the awakening indication response information to the source interface according to the preset second sending times in each sending period.
Optionally, the fourth processing unit includes: the third judging subunit is adapted to judge whether the number of times of the received wakeup confirm message before the timeout of the second timer is greater than or equal to a preset third receiving number threshold; the fourth processing subunit is adapted to enter the wakeup state when the number of times of the wakeup confirm message received before the second timer times out is greater than or equal to a preset third receiving number threshold; and the fifth processing subunit is adapted to enter the sleep/power saving mode when the number of times of the wakeup confirm message repeatedly received before the timeout of the second timer is less than a preset third receiving number threshold.
Optionally, the wake-up indication information includes: the wake-up system comprises wake-up event indication information and wake-up condition information, wherein the wake-up event indication information is suitable for representing wake-up events, and the wake-up condition information is suitable for representing occurrence conditions of the wake-up events.
Optionally, the interface includes any one of the following: UART interface, I2C interface, SPI interface, GPIO interface.
The embodiment of the invention provides a computer readable medium, which stores computer instructions, and when the computer instructions are executed, the computer instructions execute the steps corresponding to any one of the methods.
The embodiment of the invention provides interface equipment, which comprises a memory and a processor, wherein a computer instruction capable of running on the processor is stored in the memory, and the processor executes the corresponding steps of any one of the methods when running the computer instruction.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
the embodiment of the invention sends the awakening indication information and the awakening confirmation information to the target interface through the source interface, and the target interface sends the awakening indication response information to the source interface, so that the three-time information interaction between the source interface and the target interface is realized, and the source interface and the target interface synchronously enter the awakening state after the three-time information interaction is successful, thereby avoiding the state desynchronization caused by the fact that one party enters the awakening state and the other party is in the dormant state.
Further, the wake-up indication information, the wake-up indication response information and the wake-up confirmation information are repeatedly sent for a plurality of times according to a preset period, that is, the source interface and the target interface can complete information interaction through the periodic multiple sending, so that the problem that the source interface and the target interface are out of synchronization due to the fact that information cannot be correctly received due to channel fluctuation can be avoided.
Further, the setting of the wake-up indication information includes: the awakening event indication information and the awakening condition information can be carried when the awakening event indication information is sent, so that the target interface can better respond to the awakening indication information, and the awakening efficiency is improved.
Furthermore, the wake-up indication information is processed by adopting the codes to generate wake-up indication response information, so that the realization can be simplified, and the processing overhead can be saved.
Furthermore, the wake-up indication response information is processed by adopting codes to generate wake-up confirmation information, so that the realization can be simplified, and the processing overhead can be saved.
Drawings
Fig. 1 is a flowchart of a synchronous wake-up method according to an embodiment of the present invention;
fig. 2 is a flowchart of another synchronous wake-up method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating information interaction between a source interface and a target interface according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an interface device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another interface device according to an embodiment of the present invention.
Detailed Description
The existing soft wake-up scheme can not realize synchronous wake-up of a source interface and a target interface, so that the states of the source interface and the target interface are out of synchronization. The hard-wake scheme requires additional corner (pings) overhead in addition to the synchronization problem of the source and target interfaces, resulting in further increased cost.
The embodiment of the invention sends the awakening indication information and the awakening confirmation information to the target interface through the source interface, and the target interface sends the awakening indication response information to the source interface, so that the three-time information interaction between the source interface and the target interface is realized, and the source interface and the target interface synchronously enter the awakening state after the three-time information interaction is successful, thereby avoiding the state desynchronization caused by the fact that one party enters the awakening state and the other party is in the dormant state.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Referring to fig. 1, a synchronous wake-up method provided in an embodiment of the present invention may include the following steps:
s101, sending awakening indication information to a target interface.
In a specific implementation, the wake-up indication information may only include wake-up event indication information, and is suitable for characterizing a wake-up event, and may also include: the device comprises wake-up event indication information and wake-up condition information, wherein the wake-up event indication information is suitable for representing wake-up events, and the wake-up condition information is suitable for representing occurrence conditions of the wake-up events. By carrying the awakening condition information when the awakening event indication information is sent, the target interface can better respond to the awakening indication information, and the awakening efficiency is improved.
In an embodiment of the present invention, the wake-up indication information corresponds to a plurality of coded information, and represents wake-up events under different wake-up conditions through different coded information. For example, the wake-up indication information is set to correspond to coded information 1 and coded information 2, where coded information 1 represents a wake-up event in normal use, and coded information 2 represents a wake-up event in an emergency state.
In a specific implementation, the wake-up indication information may be 2 bytes.
In a specific implementation, in order to avoid information loss due to channel fluctuation, the wakeup indication information may be periodically sent according to a preset first period. In order to improve the accuracy of receiving the wake-up indication information by the target interface, the wake-up indication information may be repeatedly transmitted for multiple times in each transmission period according to a preset first transmission frequency.
S102, receiving the awakening indication response information sent by the target interface, and generating awakening confirmation information based on the awakening indication response information.
In a specific implementation, if the wake-up indication response information sent by the target interface is received, it indicates that the target interface has successfully received the wake-up indication information, the sending of the wake-up indication information may be stopped, and a wake-up confirmation information is generated based on the wake-up indication response information, and is used for performing three times of information interaction with the target interface to implement synchronous wake-up.
In specific implementation, in order to improve the success rate of synchronous wakeup, whether the number of times of receiving the wakeup indication response information is greater than or equal to a preset second receiving number threshold may be further restricted, and only when the number of times of receiving the wakeup indication response information is greater than or equal to the preset second receiving number threshold, the sending of the wakeup indication information is stopped, and the wakeup confirmation information is generated based on the wakeup indication response information.
In a specific implementation, in order to simplify the implementation and save the processing overhead, the wake-up indication response message may be processed by using a code to generate the wake-up acknowledgement message. For example, the wake-up indication response message may be processed by using a complement code to generate the wake-up confirmation message, and the specific coding manner is not limited in the embodiment of the present invention.
In a specific implementation, the wake-up confirmation message may be 2 bytes.
S103, sending the awakening confirmation information to the target interface.
In a specific implementation, in order to avoid information loss due to channel fluctuation, the wakeup confirmation information may be periodically sent according to a preset third period. In order to improve the accuracy of receiving the wakeup confirm information by the target interface, the wakeup confirm information may be repeatedly sent multiple times in each sending period according to a preset third sending time.
And S104, after delaying the preset first time, entering a wakeup state.
In a specific implementation, after the wakeup confirmation message is sent to the target interface, the target interface may be considered to enter the wakeup state after successfully receiving the wakeup confirmation message, and since a certain time is required for the target interface to receive and process, the target interface may enter the wakeup state after delaying a preset first time period in order to synchronize with the target interface.
According to the implementation manner, in an embodiment of the present invention, the wake-up indication information or the wake-up confirmation information is sent through a channel, and the wake-up indication response information is received through the channel.
In another embodiment of the present invention, the wake-up indication information or wake-up confirmation information is sent by a write register operation, and the wake-up indication response information is received by a read register operation.
In a specific implementation, the Interface may be any one of a UART Interface, an Integrated Circuit bus (I2C) Interface, a Serial Peripheral Interface (SPI) Interface, a General Purpose Input/Output (GPIO) Interface, and the like.
By applying the scheme, the source interface is favorable for realizing three times of information interaction between the target interface and the source interface by sending the awakening indication information and the awakening confirmation information to the target interface, and the source interface and the target interface can synchronously enter the awakening state after the three times of information interaction, so that the state desynchronizing caused by the fact that one party enters the awakening state and the other party is in the dormant state is avoided.
The embodiment of the present invention further provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed, the steps corresponding to the method according to any one of the above embodiments are executed.
The embodiment of the present invention further provides an interface device, which includes a memory and a processor, where the memory stores a computer instruction capable of running on the processor, and the processor executes the steps corresponding to the method in any one of the above embodiments when running the computer instruction.
In order to make those skilled in the art better understand and implement the present invention, another interface synchronous wake-up method is provided in the embodiment of the present invention, as shown in fig. 2.
Referring to fig. 2, another synchronous wake-up method provided in the embodiment of the present invention may include the following steps:
s201, receiving awakening indication information sent by a source interface, and generating awakening indication response information based on the awakening indication information.
In a specific implementation, in order to improve a success rate of synchronous wakeup, after receiving wakeup indication information sent by the source port, the source port may enter a state to be wakened, and start a first timer. And then further restricting whether the number of times of the received awakening indication information before the first timer is overtime is greater than or equal to a preset first receiving number threshold, and generating awakening indication response information based on the awakening indication information and starting a second timer only when the number of times of the received awakening indication information before the first timer is overtime is greater than or equal to the preset first receiving number threshold. Otherwise, when the number of times of the received awakening indication information before the first timer is overtime is smaller than a preset first receiving number threshold, entering a sleep/power saving mode.
In a specific implementation, the wake-up indication information may only include wake-up event indication information, and is suitable for characterizing a wake-up event, and may also include: the device comprises wake-up event indication information and wake-up condition information, wherein the wake-up event indication information is suitable for representing wake-up events, and the wake-up condition information is suitable for representing occurrence conditions of the wake-up events. By carrying the awakening condition information when the awakening event indication information is sent, the awakening indication information can be better responded, and the awakening efficiency is improved.
In an embodiment of the present invention, the wake-up indication information corresponds to a plurality of coded information, and represents wake-up events under different wake-up conditions through different coded information. For example, the wake-up indication information is set to correspond to coded information 1 and coded information 2, where coded information 1 represents a wake-up event in normal use, and coded information 2 represents a wake-up event in an emergency state.
In a specific implementation, in order to simplify the implementation and save the processing overhead, the wake-up indication information may be processed by using a code to generate the wake-up indication response information.
S202, sending the awakening indication response information to the source interface.
In a specific implementation, in order to avoid information loss due to channel fluctuation, the wake-up indication response information may be periodically transmitted according to a preset second period. In order to improve the accuracy of receiving the wake-up indication response message by the target interface, the wake-up indication response message may be repeatedly sent multiple times within each sending period according to a preset second sending time.
S203, receiving the awakening confirmation information sent by the source interface, and entering an awakening state.
In a specific implementation, in order to improve the success rate of the synchronous wakeup, it may be further restricted whether the number of times of receiving the wakeup confirm information is greater than or equal to a preset third receiving number threshold before the second timer is overtime, and the wakeup state is only entered when the number of times of receiving the wakeup confirm information is greater than or equal to the preset third receiving number threshold before the second timer is overtime. Otherwise, when the number of times of the received awakening confirmation information before the second timer is overtime is smaller than a preset third receiving number threshold, entering a sleep/power saving mode.
According to the implementation manner, in an embodiment of the present invention, the wake-up indication response message is sent through a channel, and the wake-up indication message or the wake-up confirmation message is received through the channel.
In another embodiment of the present invention, the wake-up indication response message is sent by a write register operation, and the wake-up indication message or wake-up confirmation message is received by a read register operation.
In a specific implementation, the interface includes any one of the following: UART interface, I2C interface, SPI interface, GPIO interface.
By applying the scheme, the target interface receives the awakening indication information and the awakening confirmation information and sends the awakening indication response information to the source interface, so that three times of information interaction with the source interface can be realized, and after the three times of information interaction, the target interface and the source interface synchronously enter an awakening state, thereby avoiding state desynchronization caused by the fact that one party enters an awakening state and the other party is in a dormant state.
The embodiment of the present invention further provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed, the steps corresponding to the method according to any one of the above embodiments are executed.
The embodiment of the present invention further provides an interface device, which includes a memory and a processor, where the memory stores a computer instruction capable of running on the processor, and the processor executes the steps corresponding to the method in any one of the above embodiments when running the computer instruction.
In order to make those skilled in the art better understand and implement the present invention, the embodiment of the present invention provides a flow chart of information interaction between a source interface and a target interface, as shown in fig. 3. It is understood that other information interaction processes may be used, and the embodiment is not limited to the present invention.
Referring to fig. 3, the detailed flow of information interaction between the source interface and the target interface is as follows:
s301, the source interface sends awakening indication information to the target interface.
In a specific implementation, the source interface may periodically send the wakeup indication information according to a preset first period, and repeatedly send the wakeup indication information multiple times in each sending period according to a preset first sending number.
In an embodiment of the present invention, the preset first sending times is 4.
In a specific implementation, the size of the wake-up indication information may be 2 bytes. In an embodiment of the present invention, the wake-up indication information is 0xA5a 5.
S302, the target interface enters a state to be awakened, and awakening indication response information is generated.
In a specific implementation, the target interface may enter a state to be woken up after receiving the wake-up indication information sent by the source port, and start the first timer. And generating wake-up indication response information based on the wake-up indication information and starting a second timer only when the number of times of the received wake-up indication information is greater than or equal to a preset first receiving time threshold before the first timer is overtime. Otherwise, when the number of times of the received awakening indication information before the first timer is overtime is smaller than a preset first receiving number threshold, entering a sleep/power saving mode.
In an embodiment of the present invention, the preset first receiving time threshold is 4.
In a specific implementation, the size of the wake-up indication response message may be 2 bytes. In an embodiment of the present invention, when the wake up indication information is 0xA5a5, the wake up indication response information generated based on the wake up indication information is 0xA5a 5.
S303, the target interface sends a wake-up indication response message to the source interface.
In a specific implementation, the target interface periodically sends the wake-up indication response message according to a preset second period, and repeatedly sends the wake-up indication response message for multiple times in each sending period according to a preset second sending number.
In an embodiment of the present invention, the preset second sending time is 4.
And S304, the source interface generates awakening confirmation information based on the awakening indication response information.
In a specific implementation, only when the number of times of receiving the wake-up indication response information is greater than or equal to a preset second receiving number threshold, all source interfaces stop sending the wake-up indication information, and generate wake-up confirmation information based on the wake-up indication response information.
In an embodiment of the present invention, the preset second receiving time threshold is 4.
In a specific implementation, the size of the wakeup confirmation message may be 2 bytes.
In an embodiment of the present invention, when the wakeup indication response message is 0xA5a5, complement coding is performed on the wakeup indication response message to generate the wakeup confirmation message as 0x4B 4C. It is understood that other encoding methods may be used to encode the wake-up indication response message, and all of them fall within the scope of the present invention.
S305, the source interface sends the awakening confirmation information to the target interface.
In a specific implementation, the source interface may periodically send the wakeup confirm message according to a preset third period, and repeatedly send the wakeup confirm message multiple times according to a preset third sending number in each sending period.
In an embodiment of the present invention, the preset third sending time is 4.
S306, the target interface enters a wake-up state.
In a specific implementation, the target interface enters the awake state only when the number of times of receiving the awake acknowledgement information before the second timer expires is greater than or equal to a preset third receiving number threshold. Otherwise, when the number of times of the received awakening confirmation information before the second timer is overtime is smaller than a preset third receiving number threshold, entering a sleep/power saving mode.
In an embodiment of the present invention, the preset third receiving time threshold is 4.
S307, the source interface enters a wake-up state.
In a specific implementation, the source interface enters a wake-up state after delaying a preset first time period.
By applying the scheme, the source interface and the target interface can synchronously enter the awakening state through three times of information interaction.
In order to enable those skilled in the art to better understand and implement the present invention, an embodiment of the present invention provides an interface device capable of implementing the above interface wakeup synchronization method, as shown in fig. 4.
Referring to fig. 4, the interface device 40 includes: a first sending unit 41, a first processing unit 42, a second sending unit 43 and a second processing unit 44, wherein:
the first sending unit 41 is adapted to send wakeup indication information to a target interface.
The first processing unit 42 is adapted to receive the wake-up indication response message sent by the target interface, and generate a wake-up confirmation message based on the wake-up indication response message.
The second sending unit 43 is adapted to send a wake-up confirmation message to the target interface.
The second processing unit 44 is adapted to enter a wake-up state after delaying a preset first time period.
In an embodiment of the present invention, the first sending unit 41 includes: the first sending subunit 411 is adapted to send the wake-up indication information periodically according to a preset first period, and repeatedly send the wake-up indication information to the target interface according to a preset first sending number in each sending period.
In an embodiment of the present invention, the first processing unit 42 includes: a first judging subunit 421 and a first processing subunit 422, wherein:
the first determining subunit 421 is adapted to determine whether the number of times of receiving the wake-up indication response message is greater than or equal to a preset second receiving number threshold.
The first processing subunit 422 is adapted to stop sending the wake-up indication information when the number of times of receiving the wake-up indication response information is greater than or equal to a preset second receiving number threshold, and generate wake-up confirmation information based on the wake-up indication response information.
In an embodiment of the present invention, the first processing unit 42 is adapted to receive a wake-up indication response message sent by the target interface, and encode the wake-up indication response message to generate a wake-up confirmation message.
In an embodiment of the present invention, the second sending unit 43 includes: the second sending subunit 431 is adapted to send the wakeup confirm message periodically according to a preset third period, and in each sending period, repeatedly send the wakeup confirm message to the target interface according to a preset third sending number.
In a specific implementation, the wake-up indication information may include: the wake-up system comprises wake-up event indication information and wake-up condition information, wherein the wake-up event indication information is suitable for representing wake-up events, and the wake-up condition information is suitable for representing occurrence conditions of the wake-up events.
In a specific implementation, the interface includes any one of the following: UART interface, I2C interface, SPI interface, GPIO interface.
In order to enable those skilled in the art to better understand and implement the present invention, an embodiment of the present invention provides an interface device capable of implementing the above interface wakeup synchronization method, as shown in fig. 5.
Referring to fig. 5, the interface device 50 includes: a third processing unit 51, a third sending unit 52 and a fourth processing unit 53, wherein:
the third processing unit 51 is adapted to receive the wake-up indication information sent by the source interface, and generate wake-up indication response information based on the wake-up indication information.
The third sending unit 52 is adapted to send the wake-up indication response message to the source interface.
The fourth processing unit 53 is adapted to receive the wake-up confirmation message sent by the source interface, and enter a wake-up state.
In an embodiment of the present invention, the third processing unit 51 includes: a first receiving sub-unit 511, a second determining sub-unit 512, a second processing sub-unit 513 and a third processing sub-unit 514, wherein:
the first receiving subunit 511 is adapted to enter a state to be wakened after receiving the wake-up indication information sent by the source interface, and start a first timer.
The second determining subunit 512 is adapted to determine whether the number of times of the received wake-up indication information before the timeout of the first timer is greater than or equal to a preset first receiving number threshold.
The second processing subunit 513 is adapted to, when the number of times of the received wakeup indication information before the timeout of the first timer is greater than or equal to a preset first receiving number threshold, generate wakeup indication response information based on the wakeup indication information, and start the second timer.
The third processing subunit 514 is adapted to enter the sleep/power saving mode when the number of times of receiving the wakeup indication information before the first timer expires is less than a preset first receiving number threshold.
In an embodiment of the present invention, the third processing unit 51 is adapted to receive wakeup indication information sent by a source interface, encode the wakeup indication information, and generate wakeup indication response information
In an embodiment of the present invention, the third sending unit 52 includes: the third sending subunit 521 is adapted to send the wake-up indication response message periodically according to a preset second period, and repeatedly send the wake-up indication response message to the source interface according to a preset second sending number in each sending period.
In an embodiment of the present invention, the fourth processing unit 53 includes: a third judging sub-unit 531, a fourth processing sub-unit 532 and a fifth processing sub-unit 533, wherein:
the third determining subunit 531 is adapted to determine whether the number of times of receiving the wakeup confirm message before the timeout of the second timer is greater than or equal to a preset third receiving number threshold.
The fourth processing subunit 532 is adapted to enter the awake state when the number of times of receiving the awake confirmation information before the second timer expires is greater than or equal to a preset third receiving number threshold.
The fifth processing subunit 533 is adapted to enter the sleep/power saving mode when the number of times of the wakeup confirm message that is repeatedly received before the timeout of the second timer is smaller than a preset third receiving number threshold.
In a specific implementation, the wake-up indication information may include: the wake-up method comprises wake-up indication information and wake-up condition information, wherein the wake-up indication information is suitable for representing wake-up events, and the wake-up condition information is suitable for representing occurrence conditions of the wake-up events.
In a specific implementation, the interface includes any one of the following: UART interface, I2C interface, SPI interface, GPIO interface.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (24)

1. An interface wake-up synchronization method, comprising:
sending awakening indication information to a target interface;
receiving awakening indication response information sent by the target interface, and generating awakening confirmation information based on the awakening indication response information;
sending the awakening confirmation information to the target interface;
after delaying the preset first time, entering a wake-up state from the low activity state;
the awakening indication information corresponds to a plurality of coded information; representing the awakening event under different awakening conditions through different coded information;
the sending of the wake-up indication information to the target interface includes: periodically sending awakening indication information according to a preset first period, and repeatedly sending the awakening indication information to a target interface according to a preset first sending frequency in each sending period;
the receiving of the wake-up indication response information sent by the target interface, and the generating of the wake-up confirmation information based on the wake-up indication response information includes: and judging whether the frequency of the received awakening indication response information is greater than or equal to a preset second receiving frequency threshold, if so, stopping sending the awakening indication information, and generating awakening confirmation information based on the awakening indication response information.
2. The interface wake up synchronization method according to claim 1, wherein the generating wake up confirmation information based on the wake up indication response information comprises: and encoding the awakening indication response information to generate awakening confirmation information.
3. The interface wake synchronizing method according to claim 1, wherein the sending the wake acknowledge message to the target interface comprises:
and periodically sending the awakening confirmation information according to a preset third period, and repeatedly sending the awakening confirmation information to the target interface according to a preset third sending frequency in each sending period.
4. The interface wake-up synchronization method according to any one of claims 1 to 3, wherein the wake-up indication message or the wake-up confirmation message is transmitted through a channel, and the wake-up indication response message is received through the channel.
5. An interface wake-up synchronization method according to any one of claims 1 to 3, wherein the wake-up indication information or wake-up confirmation information is sent by a write register operation, and the wake-up indication response information is received by a read register operation.
6. The interface wake-up synchronization method according to claim 1, wherein the interface comprises any one of the following interfaces: UART interface, I2C interface, SPI interface, GPIO interface.
7. An interface wake-up synchronization method, comprising:
receiving awakening indication information sent by a source interface, and generating awakening indication response information based on the awakening indication information;
sending the awakening indication response information to the source interface;
receiving awakening confirmation information sent by the source interface, and entering an awakening state from a low activity state;
the awakening indication information corresponds to a plurality of coded information, and awakening events under different awakening conditions are represented through different coded information;
the receiving of the wake-up indication information sent by the source interface and the generating of the wake-up indication response information based on the wake-up indication information include: after receiving the awakening indication information sent by the source interface, entering a state to be awakened, and starting a first timer; if the number of times of the received awakening indication information before the first timer is overtime is greater than or equal to a preset first receiving number threshold, generating awakening indication response information based on the awakening indication information, and starting a second timer; if the number of times of the received awakening indication information before the first timer is overtime is less than a preset first receiving number threshold, entering a sleep/power-saving mode;
the sending the wake-up indication response message to the source interface includes: and periodically sending the awakening indication response information according to a preset second period, and repeatedly sending the awakening indication response information to the source interface according to a preset second sending frequency in each sending period.
8. The interface wake up synchronization method according to claim 7, wherein the generating wake up indication response information based on the wake up indication information comprises: and coding the awakening indication information to generate awakening indication response information.
9. The interface wake synchronizing method according to claim 7, wherein the receiving the wake confirmation message sent by the source interface and entering the wake state includes:
if the number of times of receiving the awakening confirmation information before the second timer is overtime is larger than or equal to a preset third receiving number threshold, entering an awakening state;
and entering a sleep/power saving mode if the number of times of the awakening confirmation information which is repeatedly received before the second timer is overtime is less than a preset third receiving time threshold.
10. The interface wake-up synchronization method according to any one of claims 7 to 9, wherein the wake-up indication response message is transmitted through a channel, and the wake-up indication message or the wake-up confirmation message is received through the channel.
11. The interface wake-up synchronization method according to any one of claims 7 to 9, wherein the wake-up indication response message is sent by a write register operation, and the wake-up indication message or the wake-up confirmation message is received by a read register operation.
12. The interface wake-up synchronization method according to claim 7, wherein the interface comprises any one of the following interfaces: UART interface, I2C interface, SPI interface, GPIO interface.
13. An interface device, comprising:
the first sending unit is suitable for sending the awakening indication information to the target interface;
the first processing unit is suitable for receiving awakening indication response information sent by the target interface and generating awakening confirmation information based on the awakening indication response information;
the second sending unit is suitable for sending the awakening confirmation information to the target interface;
the second processing unit is suitable for delaying the preset first time length and then entering the awakening state from the low activity state;
the awakening indication information corresponds to a plurality of coded information; representing the awakening event under different awakening conditions through different coded information;
the first transmission unit includes: the first sending subunit is adapted to periodically send the wakeup indication information according to a preset first period, and repeatedly send the wakeup indication information to the target interface according to a preset first sending frequency in each sending period;
the first processing unit includes: the first judgment subunit is suitable for judging whether the frequency of the received awakening indication response information is greater than or equal to a preset second receiving frequency threshold or not; and the first processing subunit is suitable for stopping sending the awakening indication information when the number of times of the awakening indication response information is greater than or equal to a preset second receiving number threshold, and generating awakening confirmation information based on the awakening indication response information.
14. The interface device according to claim 13, wherein the first processing unit is adapted to receive a wake-up indication response message sent by the target interface, and encode the wake-up indication response message to generate a wake-up confirmation message.
15. The interface device according to claim 13, wherein the second transmission unit includes: and the second sending subunit is suitable for periodically sending the awakening confirmation information according to a preset third period, and repeatedly sending the awakening confirmation information to the target interface according to the preset third sending times in each sending period.
16. The interface device of claim 13, wherein the interface comprises any one of: UART interface, I2C interface, SPI interface, GPIO interface.
17. An interface device, comprising:
the third processing unit is suitable for receiving the awakening indication information sent by the source interface and generating awakening indication response information based on the awakening indication information;
a third sending unit, adapted to send the wake-up indication response message to the source interface;
the fourth processing unit is suitable for receiving the awakening confirmation information sent by the source interface and enters an awakening state from a low activity state;
the awakening indication information corresponds to a plurality of coded information; representing the awakening event under different awakening conditions through different coded information;
the third processing unit includes: the first receiving subunit is suitable for entering a state to be awakened after receiving the awakening indication information sent by the source interface and starting a first timer; the second judgment subunit is adapted to judge whether the number of times of the received wake-up indication information before the timeout of the first timer is greater than or equal to a preset first receiving number threshold; the second processing subunit is suitable for generating awakening indication response information based on the awakening indication information and starting a second timer when the number of times of awakening indication information received before the first timer is overtime is greater than or equal to a preset first receiving time threshold; the third processing subunit is adapted to enter a sleep/power saving mode when the number of times of receiving the wakeup indication information before the timeout of the first timer is less than a preset first receiving number threshold;
the third transmitting unit includes: and the third sending subunit is suitable for periodically sending the awakening indication response information according to a preset second period, and repeatedly sending the awakening indication response information to the source interface according to the preset second sending times in each sending period.
18. The interface device according to claim 17, wherein the third processing unit is adapted to receive wake-up indication information sent by a source interface, and encode the wake-up indication information to generate a wake-up indication response message.
19. The interface device according to claim 17, wherein the fourth processing unit includes:
the third judging subunit is adapted to judge whether the number of times of the received wakeup confirm message before the timeout of the second timer is greater than or equal to a preset third receiving number threshold;
the fourth processing subunit is adapted to enter the wakeup state when the number of times of the wakeup confirm message received before the second timer times out is greater than or equal to a preset third receiving number threshold;
and the fifth processing subunit is adapted to enter the sleep/power saving mode when the number of times of the wakeup confirm message repeatedly received before the timeout of the second timer is less than a preset third receiving number threshold.
20. The interface device of claim 17, wherein the interface comprises any one of: UART interface, I2C interface, SPI interface, GPIO interface.
21. A computer readable medium having stored thereon computer instructions, wherein said computer instructions when executed perform the steps corresponding to the method of any one of claims 1 to 6.
22. A computer readable medium having stored thereon computer instructions, wherein said computer instructions when executed perform the steps corresponding to the method of any one of claims 7 to 12.
23. An interface device comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, the processor executing the computer instructions to perform steps corresponding to the method of any one of claims 1 to 6.
24. An interface device comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, the processor executing the computer instructions to perform steps corresponding to the method of any one of claims 7 to 12.
CN201710747314.1A 2017-08-25 2017-08-25 Interface wake-up synchronization method, interface device and computer readable medium Active CN109426526B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110957297.0A CN113656084B (en) 2017-08-25 2017-08-25 Interface wake-up synchronization method, interface device and computer readable medium
CN201710747314.1A CN109426526B (en) 2017-08-25 2017-08-25 Interface wake-up synchronization method, interface device and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710747314.1A CN109426526B (en) 2017-08-25 2017-08-25 Interface wake-up synchronization method, interface device and computer readable medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202110957297.0A Division CN113656084B (en) 2017-08-25 2017-08-25 Interface wake-up synchronization method, interface device and computer readable medium

Publications (2)

Publication Number Publication Date
CN109426526A CN109426526A (en) 2019-03-05
CN109426526B true CN109426526B (en) 2021-08-17

Family

ID=65501824

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110957297.0A Active CN113656084B (en) 2017-08-25 2017-08-25 Interface wake-up synchronization method, interface device and computer readable medium
CN201710747314.1A Active CN109426526B (en) 2017-08-25 2017-08-25 Interface wake-up synchronization method, interface device and computer readable medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202110957297.0A Active CN113656084B (en) 2017-08-25 2017-08-25 Interface wake-up synchronization method, interface device and computer readable medium

Country Status (1)

Country Link
CN (2) CN113656084B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159722A (en) * 2015-09-10 2015-12-16 深圳微步信息股份有限公司 Method for RTC (Real Time Clock) wake-up system and computer
CN106155960A (en) * 2016-06-29 2016-11-23 广州慧睿思通信息科技有限公司 Shake hands and the UART serial port communication method of EDMA based on GPIO
CN106372012A (en) * 2016-08-25 2017-02-01 长沙丰灼通讯科技有限公司 Serial port awakening system not using handshake control line and serial port communication method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8490118B2 (en) * 2010-12-02 2013-07-16 Microsoft Corporation Wait on address synchronization interface
KR102396822B1 (en) * 2015-06-04 2022-05-13 삼성전자주식회사 Device and method for controlling the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159722A (en) * 2015-09-10 2015-12-16 深圳微步信息股份有限公司 Method for RTC (Real Time Clock) wake-up system and computer
CN106155960A (en) * 2016-06-29 2016-11-23 广州慧睿思通信息科技有限公司 Shake hands and the UART serial port communication method of EDMA based on GPIO
CN106372012A (en) * 2016-08-25 2017-02-01 长沙丰灼通讯科技有限公司 Serial port awakening system not using handshake control line and serial port communication method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于物联网的嵌入式室内安防监控系统的研究与设计;龚伦峰;《中国优秀硕士学位论文全文数据库 信息科技辑》;20140915;正文第5.5节 *

Also Published As

Publication number Publication date
CN113656084A (en) 2021-11-16
CN109426526A (en) 2019-03-05
CN113656084B (en) 2022-10-11

Similar Documents

Publication Publication Date Title
WO2018210135A1 (en) Data transmission method, base station, and terminal
US10057856B2 (en) Wake-up control method and apparatus, and terminal device
EP2862311B1 (en) Three-phase-polarity safe reverse link shutdown
CN102799550B (en) Based on the waking up of chip chamber high-speed interface HSIC, hot-plug method and equipment
CN103118188A (en) Application heartbeat cycle adjusting method and device, and terminal
TWI417731B (en) Bus-handling device and method
US9578612B2 (en) Node device and method for communication
US9477293B2 (en) Embedded controller for power-saving and method thereof
KR20130113203A (en) Electronic device and power managing method of the same
CN111683399A (en) Device wake-up circuit, electronic device, wake-up system and device wake-up method
CN106063304B (en) System and method for message-based fine-grained system-on-chip power control
CN114035477A (en) Equipment awakening method, device and system
CN112559082B (en) Terminal device, NFC clock control method, NFC module and medium
CN109426526B (en) Interface wake-up synchronization method, interface device and computer readable medium
US8825917B2 (en) Method, system and device for enabling USB data card with USB flash drive function to hibernate
US11157290B2 (en) Method and circuit for waking up I2C device
CN103986588A (en) Computer system and far-end remote control method of computer device
CN112948297B (en) Screen control method and device, double-screen terminal equipment and storage medium
CN109729575A (en) Method, apparatus, equipment and the medium that operating mode determines
CN115002881A (en) Upper computer awakening method, device and system, electronic equipment and storage medium
TW201012189A (en) Reciprocal wake-up system for handheld devices with insert type wireless communication module and a method therefore
WO2018116450A1 (en) Wireless communication device and control program
JP4561436B2 (en) Wireless terminal device, wireless module, and wireless module control method
WO2021017623A1 (en) Power-saving signal configuration and transmission method and device
CN111198776A (en) Method for preventing UART (universal asynchronous receiver/transmitter) from receiving lost data during deep sleep of MCU (microprogrammed control unit)

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
GR01 Patent grant
GR01 Patent grant