[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN118069227A - Universal serial bus device, terminal device and wake-up method - Google Patents

Universal serial bus device, terminal device and wake-up method Download PDF

Info

Publication number
CN118069227A
CN118069227A CN202410212537.8A CN202410212537A CN118069227A CN 118069227 A CN118069227 A CN 118069227A CN 202410212537 A CN202410212537 A CN 202410212537A CN 118069227 A CN118069227 A CN 118069227A
Authority
CN
China
Prior art keywords
wake
interrupt
signal
controller
usb
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
CN202410212537.8A
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.)
Phytium Technology Co Ltd
Original Assignee
Phytium Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Phytium Technology Co Ltd filed Critical Phytium Technology Co Ltd
Priority to CN202410212537.8A priority Critical patent/CN118069227A/en
Publication of CN118069227A publication Critical patent/CN118069227A/en
Pending legal-status Critical Current

Links

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
    • 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Systems (AREA)

Abstract

The application relates to a universal serial bus device, a terminal device and a wake-up method, wherein the universal serial bus device comprises: the system comprises a wake-up signal detection module, a wake-up interrupt reporting module and a USB controller; the wake-up signal detection module is connected with the wake-up interrupt reporting module, and the wake-up interrupt reporting module is connected with the USB controller; the wake-up signal detection module is configured to generate a wake-up signal when wake-up operation is detected, and send the wake-up signal to the wake-up interrupt reporting module; the wake-up interrupt reporting module is configured to generate an interrupt signal according to the wake-up signal and send the interrupt signal to the interrupt controller under the condition that the USB controller is in a dormant state; the interrupt signal is used to wake up an operating system running on a processor coupled to the interrupt controller. According to the application, the operating system can be awakened in the dormant state of the USB controller without additionally arranging a power management chip, so that the hardware cost is saved.

Description

Universal serial bus device, terminal device and wake-up method
Technical Field
The present application relates to the field of electronic circuits, and in particular, to a universal serial bus device, a terminal device, and a wake-up method.
Background
In the daily work of the operating system, from the standpoint of saving power and hardware resources, when the user does not operate for a long time and the external device does not transmit data, the operating system enters a sleep state from a normal working state. When the operating system needs to be awakened, a wake-up signal is usually sent out by a USB peripheral connected through a universal serial bus (Universal Serial Bus, USB) interface, so that the operating system returns to a normal working state from a dormant state.
During the process that the operating system is in the sleep state, the USB controller is also in the sleep state, and the USB controller cannot report a wake-up signal sent by a USB peripheral (such as a keyboard, a mouse and other devices) connected with the USB interface to the operating system. In order to solve the above problem, a power management chip is usually additionally provided, and the power management chip manages the USB peripheral device to report the wake-up signal. However, the above method requires an additional power management chip, which increases hardware cost.
Disclosure of Invention
In view of the above, an object of the present application is to provide a universal serial bus device, a terminal device and a wake-up method, so as to improve the problem that the hardware cost is increased due to the additional power management chip required in the current wake-up process of the operating system.
Embodiments of the present application are implemented as follows:
In a first aspect, an embodiment of the present application provides a universal serial bus device, including: the system comprises a wake-up signal detection module, a wake-up interrupt reporting module and a USB controller; the wake-up signal detection module is connected with the wake-up interrupt reporting module, and the wake-up interrupt reporting module is connected with the USB controller; the wake-up signal detection module is configured to generate a wake-up signal and send the wake-up signal to the wake-up interrupt reporting module when wake-up operation is detected; the wake-up operation is generated by a USB peripheral connected to the universal serial bus device; the wake-up interrupt reporting module is configured to generate an interrupt signal according to the wake-up signal and send the interrupt signal to an interrupt controller when the USB controller is in a dormant state; the interrupt signal is used for waking up an operating system running by a processor connected with the interrupt controller.
In the embodiment of the application, a wake-up signal detection module and a wake-up interrupt reporting module are arranged in universal serial bus equipment, and when wake-up operation is detected by the wake-up signal detection module, a wake-up signal is generated and sent to the wake-up interrupt reporting module. The wake-up interrupt reporting module generates an interrupt signal with the wake-up operating system according to the wake-up signal, and sends the interrupt signal to the interrupt controller, so that the wake-up of the operating system is realized. By the mode, the USB peripheral is managed without additionally arranging the power management chip, so that the operating system can be awakened when the USB controller is in the dormant state, and the hardware cost is saved.
With reference to a possible implementation manner of the embodiment of the first aspect, the universal serial bus device further includes a USB physical layer module, where the USB physical layer module is connected to the wake-up signal detection module; the USB physical layer module is configured to generate data signals on a USB data positive signal line and/or a USB data negative signal line and update a line state value when a wake-up operation is generated on the USB peripheral; the wake-up signal detection module is configured to generate the wake-up signal upon detecting a change in the line status value.
In the embodiment of the application, the USB physical layer module responds to the wake-up operation generated on the USB peripheral equipment, generates data signals on the USB data positive signal line and/or the USB data negative signal line, and updates the line state value. When the wake-up signal detection module detects that the line state value changes, a wake-up signal is generated, so that the wake-up operation of the USB peripheral is detected.
With reference to a possible implementation manner of the first aspect embodiment, the USB controller is connected to the interrupt controller through an interrupt line; the wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line of the USB controller.
In the embodiment of the application, the wake-up interrupt reporting module sends the interrupt signal to the interrupt controller through the interrupt line of the USB controller, so that an interrupt line connected with the interrupt controller is not required to be independently arranged, and the complexity of hardware design is reduced.
With reference to a possible implementation manner of the embodiment of the first aspect, the wake-up interrupt reporting module is connected to the interrupt controller through an interrupt line; the wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line between the wake-up interrupt reporting module and the interrupt controller.
In the embodiment of the application, the wake-up interrupt reporting module is directly connected with the interrupt controller through the interrupt line, and can directly send the interrupt signal to the interrupt controller through the interrupt line without sending the interrupt signal through the interrupt lines of the USB controller and the interrupt controller, so that the external interference to the interrupt signal can be reduced.
In a second aspect, an embodiment of the present application further provides a terminal device, including: an interrupt controller, a processor, and a universal serial bus device; the universal serial bus device includes: the system comprises a wake-up signal detection module, a wake-up interrupt reporting module and a USB controller; the wake-up signal detection module is connected with the wake-up interrupt reporting module, and the wake-up interrupt reporting module is connected with the USB controller; the wake-up interrupt reporting module is connected with the interrupt controller, and the interrupt controller is connected with the processor; the wake-up signal detection module is configured to generate a wake-up signal and send the wake-up signal to the wake-up interrupt reporting module when wake-up operation is detected; the wake-up operation is generated by a USB peripheral connected to the universal serial bus device; the wake-up interrupt reporting module is configured to generate an interrupt signal according to the wake-up signal and send the interrupt signal to an interrupt controller when the USB controller is in a dormant state; the interrupt controller is configured to wake up an operating system running on a processor connected to the interrupt controller according to the interrupt signal.
With reference to a possible implementation manner of the second aspect embodiment, the universal serial bus device further includes a USB physical layer module, where the USB physical layer module is connected to the wake-up signal detection module; the USB physical layer module is configured to generate data signals on a USB data positive signal line and/or a USB data negative signal line and update a line state value when a wake-up operation is generated on the USB peripheral; the wake-up signal detection module is configured to generate the wake-up signal upon detecting a change in the line status value.
With reference to a possible implementation manner of the second aspect embodiment, the processor is configured to check, when a system standby instruction is received, whether the USB controller starts a wake-up function; under the condition that the USB controller starts a wake-up function, a notification message is sent to the interrupt controller, wherein the notification message characterizes that the interrupt controller takes an interrupt signal sent by the USB controller as a wake-up source signal of the operating system when the interrupt signal is received; the USB controller is connected with the interrupt controller through an interrupt wire; the wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line of the USB controller.
With reference to a possible implementation manner of the second aspect embodiment, the wake-up interrupt reporting module is connected to the interrupt controller through an interrupt line; the wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line between the wake-up interrupt reporting module and the interrupt controller.
In a third aspect, an embodiment of the present application further provides a wake-up method, including: when a wake-up operation is detected, a wake-up signal detection module of the universal serial bus device generates a wake-up signal and sends the wake-up signal to a wake-up interrupt reporting module of the universal serial bus device; the wake-up operation is generated by a USB peripheral connected to the universal serial bus device; when the USB controller of the universal serial bus device is in a dormant state, the wake-up interrupt reporting module generates an interrupt signal according to the wake-up signal and sends the interrupt signal to an interrupt controller; and the interrupt controller wakes up an operating system running by a processor connected with the interrupt controller according to the interrupt signal.
With reference to a possible implementation manner of the third aspect embodiment, the universal serial bus device further includes a USB physical layer module, where the USB physical layer module is connected to the wake-up signal detection module; the wake-up signal detection module of the universal serial bus device generates a wake-up signal when detecting a wake-up operation, including: when the wake-up operation is generated on the USB peripheral, the USB physical layer module generates a data signal on a USB data positive signal line and/or a USB data negative signal line according to the wake-up operation, and updates a line state value; and the wake-up signal detection module generates the wake-up signal when detecting that the line state value changes.
With reference to a possible implementation manner of the third aspect embodiment, the USB controller is connected to the interrupt controller through an interrupt line; before the wake-up signal detection module of the universal serial bus device generates the wake-up signal when detecting the wake-up operation, the method further comprises: when a system standby instruction is received, checking whether the USB controller starts a wake-up function or not; under the condition that the USB controller starts a wake-up function, the interrupt controller is configured to take an interrupt signal sent by the USB controller as a wake-up source signal of the operating system when the interrupt signal is received; correspondingly, the sending the interrupt signal to the interrupt controller includes: the wake-up interrupt reporting module sends an interrupt signal to the interrupt controller through an interrupt line of the USB controller.
With reference to a possible implementation manner of the third aspect embodiment, the wake-up interrupt reporting module is connected to the interrupt controller through an interrupt line, and the sending the interrupt signal to the interrupt controller includes: the wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line between the wake-up interrupt reporting module and the interrupt controller.
Additional features and advantages of the application will be set forth in the description which follows. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. The above and other objects, features and advantages of the present application will become more apparent from the accompanying drawings.
FIG. 1 is a block diagram of a universal serial bus device according to an embodiment of the present application;
FIG. 2 is a block diagram of another USB device according to an embodiment of the present application;
Fig. 3 shows a block diagram of a terminal device according to an embodiment of the present application;
Fig. 4 shows a flow chart of a wake-up method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. The following examples are given by way of illustration for more clearly illustrating the technical solution of the present application, and are not to be construed as limiting the scope of the application. Those skilled in the art will appreciate that the embodiments described below and features of the embodiments can be combined with one another without conflict.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, relational terms such as "first," "second," and the like may be used solely to distinguish one entity or action from another entity or action in the description of the application without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the description of the embodiments of the present application, unless explicitly specified and limited otherwise, the term "electrically coupled" may be either directly or indirectly via an intermediate medium.
In view of the problem that the current process of waking up an operating system requires additional power management chips to report wake-up signals, which results in increasing hardware cost, the embodiment of the application provides universal serial bus equipment, terminal equipment and a wake-up method, which can report the wake-up signals sent by USB peripheral equipment (such as a keyboard, a mouse and the like) connected with a USB interface to the operating system under the sleeping state of a USB controller without adding additional chips, so as to realize waking up of the operating system, thereby saving hardware cost.
The universal serial bus device according to the embodiment of the present application will be described with reference to fig. 1. The universal serial bus device includes: the device comprises a wake-up signal detection module, a wake-up interrupt reporting module and a USB controller. The wake-up signal detection module is connected with the wake-up interrupt reporting module, and the wake-up interrupt reporting module is connected with the USB controller.
The wake-up signal detection module is configured to generate a wake-up signal when wake-up operation is detected, and send the wake-up signal to the wake-up interrupt reporting module. Wherein the wake-up operation is generated by a USB peripheral connected to the universal serial bus device.
The USB peripheral may be a device such as a keyboard, a mouse, or a touch pad, which is connected to the USB device through a USB bus protocol. The wake-up operation also has various manifestations according to the USB peripheral devices. For example, when the USB peripheral is a keyboard, the wake-up operation may be that the user clicks a specific key on the keyboard or that the user clicks any key on the keyboard; when the USB peripheral is a mouse, the awakening operation can be that a user clicks a certain button on the mouse or the user clicks any button on the mouse, and the like; when the USB peripheral is a touch pad, the wake-up operation may be a user touching the touch pad, a user touching the touch pad in a specific manner (e.g., two-finger swipe, three-finger swipe, etc.), or the like. The above examples are merely examples provided by embodiments of the present application, and the present application is not limited to the specific form of the wake-up operation. The user may configure the type of operation supported by the USB peripheral as a wake operation.
The wake-up interrupt reporting module is configured to generate an interrupt signal according to the wake-up signal and send the interrupt signal to the interrupt controller when the USB controller is in a sleep state. The interrupt signal is used for waking up an operating system running by a processor connected with the interrupt controller.
The wake-up interrupt reporting module is connected with an interrupt controller, the interrupt controller is connected with a processor, and an operating system is operated on the processor. Under the condition that the USB controller is in a dormant state and the wake-up interrupt reporting module receives the wake-up signal sent by the wake-up signal detection module, the wake-up interrupt reporting module generates an interrupt signal according to the wake-up signal, the interrupt signal is sent to the interrupt controller, and the interrupt controller wakes up an operating system running by a processor connected with the interrupt controller according to the interrupt signal.
In the embodiment of the application, as the USB controller cannot respond to the wake-up operation of the USB peripheral in the dormant state, a wake-up signal detection module and a wake-up interrupt reporting module are arranged in the universal serial bus device, and the wake-up signal detection module generates a wake-up signal and sends the wake-up signal to the wake-up interrupt reporting module when detecting the wake-up operation. The wake-up interrupt reporting module generates an interrupt signal with the wake-up operating system according to the wake-up signal, and sends the interrupt signal to the interrupt controller, so that the wake-up of the operating system is realized. By the mode, the USB peripheral is managed without additionally arranging the power management chip, so that the operating system can be awakened when the USB controller is in the dormant state, and the hardware cost is saved.
The following describes the interaction mode between the wake-up signal detection module and the wake-up interrupt reporting module.
The wake-up signal may be a specific format signal agreed between the wake-up signal detection module and the wake-up interrupt reporting module. When the wake-up interrupt reporting module receives the signal in the specific format, it is determined that the wake-up signal detection module detects that the USB peripheral generates wake-up operation, and then an interrupt signal for waking up the operating system is generated.
In an alternative embodiment, the wake-up signal may be a first signal transmitted between the wake-up signal detection module and the wake-up interrupt reporting module through a set of pins. For example: the wake-up signal detection module is provided with a pin A, and the wake-up interrupt reporting module is provided with a pin B. The wake-up signal detection module is configured to: when the wake-up signal detection module detects that wake-up operation is generated on the USB peripheral, a first signal is sent to a pin B on the wake-up interrupt reporting module through a pin A. The wake-up interrupt reporting module is configured to: the first signal received by pin B is taken as a wake-up signal. In the actual application process, the wake-up signal detection module detects wake-up operation, and sends a first signal to the pin B on the wake-up interrupt reporting module through the pin A. The wake-up interrupt reporting module receives the first signal through the pin B and generates an interrupt signal for waking up the operating system. The first signal may be a high level signal, a low level signal, or other electrical signals, which is not limited in the present application.
In an alternative embodiment, the wake-up signal may be a predetermined second signal between the wake-up signal detection module and the wake-up interrupt reporting module. In this embodiment, the wake-up signal detection module and the wake-up interrupt reporting module are configured, and the wake-up signal detection module is configured as follows: when the wake-up signal detection module detects that wake-up operation is generated on the USB peripheral, a second signal is sent to the wake-up interrupt reporting module; the wake-up interrupt reporting module is configured to: when the second signal is received, the second signal is used as a wake-up signal.
In this embodiment, the second signal may be a fixed-length, fixed-format signal. For example: the second signal may be 4 consecutive high level signals, or 4 consecutive low level signals, etc. By setting the second signal, the second signal is distinguished from other interaction signals between the wake-up signal detection module and the wake-up interrupt reporting module, so that the pin for sending the wake-up signal by the wake-up signal detection module and the pin for receiving the wake-up interrupt reporting module are not limited, the wake-up signal detection module can send the second signal to the wake-up interrupt reporting module through any pin, and the wake-up interrupt reporting module can determine that the second signal is the wake-up signal no matter which pin receives the second signal, and further generate the interrupt signal for waking up the operating system.
It should be understood that the foregoing two embodiments are merely examples of wake-up signals provided by embodiments of the present application, and the present application is not limited to specific forms of wake-up signals.
The wake-up signal detection module and the wake-up interrupt reporting module can be realized by hardware circuits capable of realizing the interaction mode, and the specific hardware circuit structures of the wake-up signal detection module and the wake-up interrupt reporting module are not limited.
Further, in an alternative embodiment, the wake-up signal detection module may be directly connected to the USB peripheral through a USB interface of the USB device. After the wake-up operation is generated on the USB peripheral, the wake-up signal detection module can detect the wake-up operation according to the USB bus protocol, so as to generate a wake-up signal.
In another alternative embodiment, the universal serial bus device further includes a USB physical layer module, and the USB physical layer module is connected to the wake-up signal detection module; the USB physical layer module is configured to generate data signals on the USB data positive signal line and/or the USB data negative signal line and update the line state value when wake-up operation is generated on the USB peripheral; the wake-up signal detection module is configured to generate a wake-up signal upon detecting a change in the line status value.
As shown in fig. 2, the USB peripheral is connected to a USB physical layer module, and the USB physical layer module performs data transmission with the USB peripheral through a USB interface. When the peripheral USB generates a wake-up operation, the USB physical layer module can generate Data signals on a USB Data positive signal line (USB Data Positive, DP) and/or a USB Data negative signal line (USB Data Minus, DM) in the USB interface, and update the line state value according to the generated Data on the USB Data positive signal line and/or the USB Data negative signal line. The wake-up signal detection module detects the line state value, and generates a wake-up signal when the line state value changes.
Wherein the line status values are used to represent specific values of the data signals on DP and DM. The line status value may be stored in a register LINESTATE [1:0], LINESTATE [0] representing the level on DP, and LINESTATE [0] is 0 when DP is low; when DP is high, LINESTATE [0] has a value of 1.LINESTATE [1] represents a level on DM, and when DM is low, LINESTATE [1] has a value of 0; when DM is high, LINESTATE [1] has a value of 1. The line status value includes a plurality of states: SE0 state is DP and DM are both low; the J state is DP low and DM high; the K state is DP high and DM low.
In the case where the USB peripheral does not generate a wake-up operation, DP and DM are low, and the line state value is SE 0. In the case where the USB peripheral generates a wake-up operation, DP and/or DM is changed from low to high. The wake-up signal detection module generates a wake-up signal after detecting that the line state value is changed from the SE0 state to the K state or the J state.
It should be noted that, in the practical application process, the level signals on the DP and the DM may have short-term high-low fluctuation, so as to avoid misjudgment, the wake-up signal detection module may be configured to determine that the change of the detected line state value is caused by the wake-up operation generated by the USB peripheral after detecting that the detected line state value changes from the SE0 state to the K state or the J state and maintaining for a preset period of time, so as to generate the wake-up signal.
Further, in an alternative embodiment, the USB controller is connected to the interrupt controller through an interrupt line; the wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line of the USB controller.
In the embodiment of the application, an interrupt line exists between the USB controller and the interrupt controller, and the interrupt line is used for generating other types of interrupt signals according to various operations of the USB peripheral and sending the interrupt signals to the interrupt controller when the USB controller is in a normal working state so as to realize that an operating system responds to various operations of the USB peripheral. Therefore, the wake-up interrupt reporting module can be configured to send an interrupt signal to the interrupt controller through the interrupt line of the USB controller when the USB controller is in a dormant state, so that an interrupt line connected with the interrupt controller is not required to be independently arranged, and the complexity of hardware design is reduced.
In another alternative embodiment, the wake-up interrupt reporting module is connected with the interrupt controller through an interrupt line; the wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line between the wake-up interrupt reporting module and the interrupt controller.
In the embodiment of the application, the wake-up interrupt reporting module is directly connected with the interrupt controller through the interrupt line, and can directly send the interrupt signal to the interrupt controller through the interrupt line without sending the interrupt signal through the interrupt lines of the USB controller and the interrupt controller, so that the external interference to the interrupt signal can be reduced.
The embodiment of the application also provides a terminal device, and the terminal device provided by the embodiment of the application will be described with reference to fig. 3. The terminal device comprises the universal serial bus device, an interrupt controller and a processor.
The universal serial bus device is arranged on the terminal device, and the terminal device can be electronic devices such as a computer, a server and an exchanger, or can also be some electric vehicles such as an electric train, an electric automobile, a ship, an electric two-wheel vehicle (such as a battery car, an electric bicycle and the like), an electric motorcycle, an electric tricycle and the like, and in addition, the electronic device can also be a cleaning tool including a sweeping robot, a dust collector and the like. The electric equipment can also be an electric tool, including an electric drill, an electric wrench and an electric hammer, and further comprises a garden electric tool, such as a mower.
The wake-up interrupt reporting module in the universal serial bus device is connected with the interrupt controller, and the interrupt controller is connected with the processor. It will be appreciated that a plurality of processors may be provided in one terminal device, each processor being connected to the interrupt controller. A plurality of universal serial bus devices can also be arranged in one terminal device, and a wake-up interrupt reporting module in each universal serial bus device is connected with the interrupt controller. The number of universal serial bus devices and processors is not limited to the number shown in fig. 3.
The processor is provided with an operating system, and the operating system can be: windows system, linux system, etc.
In one embodiment, the processor is configured to set a USB peripheral connected to the universal serial bus device as a system wakeup source such that a wakeup operation from the system wakeup source can be recognized by the universal serial bus device as a signal for waking up the operating system.
In this embodiment, the configuration process of the processor may be:
Step 1: the USB peripheral is set as the wake source.
Since a plurality of USB peripherals can be connected to the terminal device through a plurality of USB devices, for example: the terminal device is connected with the USB earphone, the USB keyboard and the USB mouse through a plurality of universal serial bus devices. The USB keyboard and the USB mouse are marked as wake-up sources.
Step 2: and starting a wake-up function of the USB bus corresponding to the wake-up source.
After the USB peripheral is set as a wake-up source, a wake-up function of a USB bus corresponding to the USB peripheral is started, so that a universal serial bus device connected with the USB peripheral can acquire wake-up operation generated on the USB peripheral through the USB bus.
Step 3: and starting a wake-up function of the USB controller corresponding to the wake-up source.
After the USB peripheral is set as a wake-up source, a wake-up function of the USB controller corresponding to the USB peripheral is started according to the USB protocol, so that the USB controller can recognize wake-up operation generated on the USB peripheral as a signal for waking up an operating system.
In one embodiment, in an application scenario in which the wake-up interrupt reporting module sends an interrupt signal to the interrupt controller through an interrupt line of the USB controller, the processor is configured to check whether the USB controller starts a wake-up function when receiving a system standby instruction; and under the condition that the USB controller starts the wake-up function, sending a notification message to the interrupt controller, wherein the notification message characterizes that the interrupt controller takes the interrupt signal as a wake-up source signal of an operating system when receiving the interrupt signal sent by the USB controller.
In the embodiment of the application, the operating system does not respond to the data signals sent by the peripheral equipment connected with the terminal equipment under the condition that the operating system is in the dormant state. In order to wake up the operating system when the operating system is in a sleep state, the processor needs to configure the interrupt controller, so that when the interrupt controller receives an interrupt signal on an interrupt line from the USB controller, the interrupt controller takes the interrupt signal as a wake-up source signal of the operating system, and the interrupt controller notifies the processor to execute an operating system wake-up flow, thereby realizing operation wake-up.
In the actual application process, a user inputs a system standby instruction at an operation interface provided by a terminal device, when the processor receives the system standby instruction, the instruction jumps from a user state to a kernel state through an operation system call, then the instruction is sent to a virtual file system layer, and a xhci _suspend function (the function of the function is to configure an interrupt controller and control a USB controller to enter a sleep state) is executed at a USB bus driving layer through the transfer and processing of a multi-layer software framework of the kernel. In this function, one check item needs to be added. The check item is used to check whether the wake-up capability of the USB controller is on. If the USB controller starts the wake-up function, the enable_irq_wake function is executed. The enable irq wake function is used to inform the interrupt controller that an interrupt from the USB controller is the source of the operating system's wakeup so that interrupts from the controller are not discarded by the interrupt controller. The state of the USB controller is then configured to a sleep state.
In the terminal device provided by the embodiment of the present application, the implementation principle and the technical effects of the usb device are the same as those of the embodiment of the usb device, and for brevity, reference may be made to the corresponding contents of the embodiment of the usb device where the description of the embodiment is not mentioned.
The embodiment of the application also provides a wake-up method, and the wake-up method provided by the embodiment of the application is explained below with reference to fig. 4.
S1: when a wake-up operation is detected, a wake-up signal detection module of the universal serial bus device generates a wake-up signal and sends the wake-up signal to a wake-up interrupt reporting module of the universal serial bus device; the wake-up operation is generated by a USB peripheral connected to the universal serial bus device.
S2: under the condition that the USB controller of the universal serial bus device is in a dormant state, the wake-up interrupt reporting module generates an interrupt signal according to the wake-up signal and sends the interrupt signal to the interrupt controller.
S3: the interrupt controller wakes up an operating system running on a processor connected with the interrupt controller according to the interrupt signal.
The wake-up method provided by the embodiment of the present application has the same implementation principle and technical effects as those of the embodiment of the terminal device, and for the sake of brief description, reference may be made to corresponding contents in the embodiment of the terminal device where the embodiment of the method is not mentioned.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
In addition, functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. A universal serial bus device, comprising: the system comprises a wake-up signal detection module, a wake-up interrupt reporting module and a USB controller; the wake-up signal detection module is connected with the wake-up interrupt reporting module, and the wake-up interrupt reporting module is connected with the USB controller;
the wake-up signal detection module is configured to generate a wake-up signal and send the wake-up signal to the wake-up interrupt reporting module when wake-up operation is detected; the wake-up operation is generated by a USB peripheral connected to the universal serial bus device;
The wake-up interrupt reporting module is configured to generate an interrupt signal according to the wake-up signal and send the interrupt signal to an interrupt controller when the USB controller is in a dormant state; the interrupt signal is used for waking up an operating system running by a processor connected with the interrupt controller.
2. The USB device of claim 1, further comprising a USB physical layer module, the USB physical layer module being coupled to the wake-up signal detection module;
the USB physical layer module is configured to generate data signals on a USB data positive signal line and/or a USB data negative signal line and update a line state value when a wake-up operation is generated on the USB peripheral;
The wake-up signal detection module is configured to generate the wake-up signal upon detecting a change in the line status value.
3. The universal serial bus device according to claim 1, wherein the USB controller is connected to the interrupt controller by an interrupt line;
The wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line of the USB controller.
4. The universal serial bus device according to claim 1, wherein the wake-up interrupt reporting module is connected to the interrupt controller via an interrupt line;
The wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line between the wake-up interrupt reporting module and the interrupt controller.
5. A terminal device, comprising: an interrupt controller, a processor, and a universal serial bus device;
The universal serial bus device includes: the system comprises a wake-up signal detection module, a wake-up interrupt reporting module and a USB controller; the wake-up signal detection module is connected with the wake-up interrupt reporting module, and the wake-up interrupt reporting module is connected with the USB controller;
the wake-up interrupt reporting module is connected with the interrupt controller, and the interrupt controller is connected with the processor;
the wake-up signal detection module is configured to generate a wake-up signal and send the wake-up signal to the wake-up interrupt reporting module when wake-up operation is detected; the wake-up operation is generated by a USB peripheral connected to the universal serial bus device;
The wake-up interrupt reporting module is configured to generate an interrupt signal according to the wake-up signal and send the interrupt signal to an interrupt controller when the USB controller is in a dormant state;
The interrupt controller is configured to wake up an operating system running on a processor connected to the interrupt controller according to the interrupt signal.
6. The terminal device of claim 5, wherein the universal serial bus device further comprises a USB physical layer module, the USB physical layer module being connected to the wake-up signal detection module;
the USB physical layer module is configured to generate data signals on a USB data positive signal line and/or a USB data negative signal line and update a line state value when a wake-up operation is generated on the USB peripheral;
The wake-up signal detection module is configured to generate the wake-up signal upon detecting a change in the line status value.
7. The terminal device according to claim 5, wherein the processor is configured to check whether the USB controller turns on a wake-up function when a system standby instruction is received; under the condition that the USB controller starts a wake-up function, a notification message is sent to the interrupt controller, wherein the notification message characterizes that the interrupt controller takes an interrupt signal sent by the USB controller as a wake-up source signal of the operating system when the interrupt signal is received;
The USB controller is connected with the interrupt controller through an interrupt wire;
The wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line of the USB controller.
8. The terminal device according to claim 5, wherein the wake-up interrupt reporting module is connected to the interrupt controller through an interrupt line;
The wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line between the wake-up interrupt reporting module and the interrupt controller.
9. A method of waking up comprising:
When a wake-up operation is detected, a wake-up signal detection module of the universal serial bus device generates a wake-up signal and sends the wake-up signal to a wake-up interrupt reporting module of the universal serial bus device; the wake-up operation is generated by a USB peripheral connected to the universal serial bus device;
When the USB controller of the universal serial bus device is in a dormant state, the wake-up interrupt reporting module generates an interrupt signal according to the wake-up signal and sends the interrupt signal to an interrupt controller;
and the interrupt controller wakes up an operating system running by a processor connected with the interrupt controller according to the interrupt signal.
10. The wake-up method of claim 9, wherein the universal serial bus device further comprises a USB physical layer module, the USB physical layer module being connected to the wake-up signal detection module; the wake-up signal detection module of the universal serial bus device generates a wake-up signal when detecting a wake-up operation, including:
when the wake-up operation is generated on the USB peripheral, the USB physical layer module generates a data signal on a USB data positive signal line and/or a USB data negative signal line according to the wake-up operation, and updates a line state value;
and the wake-up signal detection module generates the wake-up signal when detecting that the line state value changes.
11. The wake-up method of claim 9, wherein the USB controller is connected to the interrupt controller by an interrupt line; before the wake-up signal detection module of the universal serial bus device generates the wake-up signal when detecting the wake-up operation, the method further comprises:
when a system standby instruction is received, checking whether the USB controller starts a wake-up function or not;
under the condition that the USB controller starts a wake-up function, the interrupt controller is configured to take an interrupt signal sent by the USB controller as a wake-up source signal of the operating system when the interrupt signal is received;
Correspondingly, the sending the interrupt signal to the interrupt controller includes:
The wake-up interrupt reporting module sends an interrupt signal to the interrupt controller through an interrupt line of the USB controller.
12. The wake-up method of claim 9, wherein the wake-up interrupt reporting module is connected to the interrupt controller through an interrupt line, and the sending the interrupt signal to the interrupt controller comprises:
The wake-up interrupt reporting module is configured to send an interrupt signal to the interrupt controller through an interrupt line between the wake-up interrupt reporting module and the interrupt controller.
CN202410212537.8A 2024-02-26 2024-02-26 Universal serial bus device, terminal device and wake-up method Pending CN118069227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410212537.8A CN118069227A (en) 2024-02-26 2024-02-26 Universal serial bus device, terminal device and wake-up method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410212537.8A CN118069227A (en) 2024-02-26 2024-02-26 Universal serial bus device, terminal device and wake-up method

Publications (1)

Publication Number Publication Date
CN118069227A true CN118069227A (en) 2024-05-24

Family

ID=91098500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410212537.8A Pending CN118069227A (en) 2024-02-26 2024-02-26 Universal serial bus device, terminal device and wake-up method

Country Status (1)

Country Link
CN (1) CN118069227A (en)

Similar Documents

Publication Publication Date Title
US6460143B1 (en) Apparatus and method for awakening bus circuitry from a low power state
US6708278B2 (en) Apparatus and method for awakening bus circuitry from a low power state
CN101622612B (en) Detecting connection to a usb host or hub without using an extra status input
TWI225982B (en) Power shutdown method of wireless peripheral device
EP3844628B1 (en) Slave-to-slave direct communication
CN105225316A (en) A kind of dormancy of electron key low-power consumption power supply plan and awakening method
CN102778943A (en) State control method and device and portable terminal
CN100378617C (en) Network wakening device and method
US20050114723A1 (en) Interruption control system and method
CN101145078A (en) Information processing apparatus and resume control method
CN115309462A (en) Equipment awakening method, device, system, electronic equipment and storage medium
CN214670566U (en) Computer wake-up circuit and computer
EP1934675A2 (en) Power conservation
WO2022100374A1 (en) Hierarchical management method and system for terminal device
WO2024193257A1 (en) Wake-up device
CN118069227A (en) Universal serial bus device, terminal device and wake-up method
US7363408B2 (en) Interruption control system and method
CN103488270B (en) Electricity saving method and electronic installation thereof
WO2024061177A1 (en) Network wake-up method and apparatus, and electronic device and vehicle
US20050086407A1 (en) Interruption control system and method
JP2000353032A (en) Peripheral equipment with power saving function
CN113296442B (en) Power supply control device, power supply control method and system
JP2007299367A (en) Data processing system and method for touch pad
JP2007299367A5 (en)
CN108089959B (en) Mainboard detection circuit and electronic device applying same

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