Timing synchronization method, electronic device, and active stylus
Patent Information
- Application Number
- PCT/CN2026/076955
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-12
- Filing Date
- 2026-02-04
- Publication Date
- 2026-09-17
Smart Images

Figure CN2026076955_17092026_PF_FP_ABST
Abstract
Description
Timing synchronization methods, electronic devices, and active pens
[0001] This application claims priority to Chinese Patent Application No. 202510301192.8, filed with the State Intellectual Property Office of China on March 12, 2025, entitled "Method for Timing Synchronization, Electronic Device and Active Pen", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of electronic devices, and more specifically, to a method for timing synchronization, an electronic device, and an active pen. Background Technology
[0003] With the widespread adoption of capacitive screens, the application of capacitive active pens has also become increasingly common. The protocol between the active pen and the touchscreen is constantly evolving, shifting from early one-way communication to bidirectional communication. Regardless of the communication protocol used, timing synchronization between the touchscreen and the active pen is usually required; missynchronization will prevent the active pen from writing in a timely manner. Therefore, improving the accuracy of timing synchronization between the touchscreen and the active pen is crucial. Summary of the Invention
[0004] This application provides a timing synchronization method, an electronic device, and an active pen. The timing synchronization method can effectively improve the accuracy of timing synchronization between the electronic device and the active pen.
[0005] In a first aspect, a timing synchronization method is provided, the method being applied to an electronic device, the method comprising: a first processing chip of the electronic device sending a first signal to a first wireless communication chip of the electronic device, the first signal being used to indicate the acquisition of clock information, the clock information including the current time information of the first wireless communication chip; the first wireless communication chip receiving the first signal and sending time information, the time information being used to determine a second time, the second time being the time when a second synchronization chip of an active pen generates a coding signal, the time information being determined based on the clock information.
[0006] Based on the above technical solution, the first device determines the time when the second synchronization chip generates the coding signal through the first wireless communication chip. By using the wireless chip for communication, the accuracy of determining the second time can be improved.
[0007] Based on the above technical solution, the first wireless communication chip responds to the first signal and acquires clock information, and determines the time when the second synchronization chip generates the coding signal based on the clock information of the first wireless communication chip itself, thereby further improving the accuracy of the second moment.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes the first processing chip sending the first signal upon receiving a synchronization signal.
[0009] Based on the above technical solution, after receiving the synchronization signal, the first processing chip sends a first signal, and initiates the timing synchronization process through the first processing chip to improve the accuracy of determining the second moment.
[0010] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the first synchronization chip of the electronic device sending the synchronization signal at a first moment, the time difference between the first moment and the second moment being less than or equal to a first time threshold, and the first time threshold being less than or equal to 10 μs.
[0011] Based on the above technical solution, the first synchronization chip sends a synchronization signal at the first moment to start timing synchronization, and the time difference between the moment when timing synchronization starts and the moment when the second synchronization chip generates the coding signal is less than or equal to the first time threshold, thereby improving the accuracy of timing synchronization.
[0012] In conjunction with the first aspect, in some implementations of the first aspect, the precision of the time information is less than or equal to a second time threshold, which is less than or equal to 5 μs.
[0013] It should be noted that the precision of the time information refers to the time difference between the moment when the first wireless communication chip receives the first signal and the moment when the first wireless communication chip actually latches the current clock.
[0014] In conjunction with the first aspect, in some implementations of the first aspect, the first wireless communication chip includes a star-flash chip.
[0015] Secondly, a timing synchronization method is provided, which is applied to an active pen. The method includes: a second synchronization chip of the active pen receiving information at a second time, the second time being the time when the second synchronization chip generates a coding signal, and the second time being determined based on time information sent by a first wireless communication chip of the electronic device.
[0016] Based on the above technical solution, the second synchronization chip determines the time when the coding signal is generated by the information at the second moment, thereby achieving timing synchronization with the first synchronization chip of the electronic device.
[0017] Based on the above technical solution, the second wireless communication chip acquires time information to determine the second moment for sending the coding signal, thereby achieving timing synchronization between the first device and the second device.
[0018] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes: the second wireless communication chip of the active pen transmitting information at the second moment.
[0019] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes: the second wireless communication chip of the active pen acquiring time information, the time information being used to determine the second moment.
[0020] In conjunction with the second aspect, in some implementations of the second aspect, the precision of the time information is less than or equal to a second time threshold, which is less than or equal to 5 μs.
[0021] It should be noted that the precision of the time information refers to the time difference between the moment when the first wireless communication chip receives the first signal and the moment when the first wireless communication chip actually latches the current clock.
[0022] Based on the above technical solution, the accuracy of the time information is less than the second time threshold, which improves the accuracy of time synchronization.
[0023] In conjunction with the second aspect, in some implementations of the second aspect, the second wireless communication chip includes a star-flash chip.
[0024] Thirdly, an electronic device is provided, comprising: a first processing chip and a first wireless communication chip electrically connected, wherein the first processing chip is configured to send a first signal to the first wireless communication chip, the first signal being configured to indicate the acquisition of clock information, the clock information including the current time information of the first wireless communication chip; the first wireless communication chip is configured to receive the first signal and further configured to send time information, the time information being configured to determine a second time, the second time being the time when a second synchronization chip of an active pen generates a coding signal, the time information being determined based on the clock information.
[0025] Based on the above technical solution, the first device determines the time when the second synchronization chip generates the coding signal through the first wireless communication chip. By using the wireless chip for communication, the accuracy of determining the second time can be improved.
[0026] Based on the above technical solution, the first wireless communication chip responds to the first signal and acquires clock information, and determines the time when the second synchronization chip generates the coding signal based on the clock information of the first wireless communication chip itself, thereby further improving the accuracy of the second moment.
[0027] In conjunction with the third aspect, in some implementations of the third aspect, the first processing chip is further configured to send the first signal upon receiving a synchronization signal.
[0028] Based on the above technical solution, after receiving the synchronization signal, the first processing chip sends a first signal, and initiates the timing synchronization process through the first processing chip to improve the accuracy of determining the second moment.
[0029] In conjunction with the third aspect, in some implementations of the third aspect, the electronic device further includes: a first synchronization chip electrically connected to the first processing chip, the first synchronization chip being used to send the synchronization signal at a first moment, the time difference between the first moment and the second moment being less than or equal to a first time threshold.
[0030] In conjunction with the third aspect, in some implementations of the third aspect, the first time threshold is less than or equal to 10 μs.
[0031] Based on the above technical solution, the first synchronization chip sends a synchronization signal at the first moment to start timing synchronization, and the time difference between the moment when timing synchronization starts and the moment when the second synchronization chip generates the coding signal is less than or equal to the first time threshold, thereby improving the accuracy of timing synchronization.
[0032] In conjunction with the third aspect, in some implementations of the third aspect, the precision of the time information is less than or equal to the second time threshold.
[0033] In conjunction with the third aspect, in some implementations of the third aspect, the second time threshold is less than or equal to 5 μs.
[0034] It should be noted that the precision of the time information refers to the time difference between the moment when the first wireless communication chip receives the first signal and the moment when the first wireless communication chip actually latches the current clock.
[0035] In conjunction with the third aspect, in some implementations of the third aspect, the first wireless communication chip includes a star-flash chip.
[0036] Fourthly, an active pen is provided, the active pen comprising: a second synchronization chip, the second synchronization chip being used to receive information at a second moment, the second moment being the moment when the second synchronization chip generates a coding signal, the second moment being determined based on time information sent by a first wireless communication chip of an electronic device.
[0037] Based on the above technical solution, the second synchronization chip determines the time when the coding signal is generated by the information at the second moment, thereby achieving timing synchronization with the first synchronization chip of the electronic device.
[0038] Based on the above technical solution, the second wireless communication chip acquires time information to determine the second moment for sending the coding signal, thereby achieving timing synchronization between the first device and the second device.
[0039] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the active pen further includes: a second wireless communication chip electrically connected to the second synchronization chip, the second wireless communication chip being used to transmit information at the second moment.
[0040] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the second wireless communication chip is further configured to acquire the time information, which is used to determine the second moment.
[0041] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the second wireless communication chip is further used to determine the second moment when the second synchronization chip generates the coding signal.
[0042] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the precision of the time information is less than or equal to the second time threshold.
[0043] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the second time threshold is less than or equal to 5 μs.
[0044] It should be noted that the precision of the time information refers to the time difference between the moment when the first wireless communication chip receives the first signal and the moment when the first wireless communication chip actually latches the current clock.
[0045] Based on the above technical solution, the accuracy of the time information is less than the second time threshold, which improves the accuracy of time synchronization.
[0046] In conjunction with the fourth aspect, in some implementations of the fourth aspect, the second wireless communication chip includes a star-flash chip.
[0047] Fifthly, an electronic device is provided, comprising one or more processors; one or more memories; the one or more memories storing one or more computer programs, the one or more computer programs including instructions that, when executed by the one or more processors, cause the method as described in the first aspect and any implementation thereof, or the method as described in the second aspect and any implementation thereof, to be performed.
[0048] In a sixth aspect, a computer-readable storage medium is provided, wherein computer instructions are stored therein, which, when executed on a computer, cause the method described in the first aspect and any implementation thereof, or the method described in the second aspect and any implementation thereof, to be performed.
[0049] In a seventh aspect, a chip is provided, the chip including a processor and a communication interface, the communication interface being used to receive a signal and transmit the signal to the processor, the processor processing the signal such that the method as described in the first aspect and any implementation thereof, or the method as described in the second aspect and any implementation thereof, is executed.
[0050] Eighthly, a computer program product is provided that, when the computer program product is run on a computer, causes the method described in the first aspect and any implementation thereof, or the method described in the second aspect and any implementation thereof, to be executed. Attached Figure Description
[0051] Figure 1 is a schematic diagram of the use of an active pen on an electronic device.
[0052] Figure 2 is a schematic diagram of the timing synchronization process between the electronic device and the active pen provided in the embodiment of this application.
[0053] Figure 3 is a flowchart of timing synchronization provided in an embodiment of this application.
[0054] Figure 4 is a schematic diagram of the architecture of a first device and a second device provided in an embodiment of this application. Detailed Implementation
[0055] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0056] It should be noted that in the embodiments of this application, the terms "upper," "lower," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the embodiments of this application and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application. The terms "comprising," "including," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The sequence numbers of the processes below do not imply the order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0057] In the description of the embodiments of this application, it should be noted that, unless otherwise stated, "a plurality of" means two or more; the terms "upper," "lower," "left," "right," "inner," "outer," etc., indicating orientation or positional relationships are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the embodiments of this application. Furthermore, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. "Vertical" is not strictly vertical, but within the allowable error range. "Parallel" is not strictly parallel, but within the allowable error range.
[0058] In this embodiment, references to "one embodiment" or "some embodiments" mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. In this application, words such as "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized. In the embodiments of this application, descriptions such as "when," "in the case of," "if," and "if" all refer to the device taking corresponding actions under certain objective circumstances, not to limiting the time, nor to requiring the device to perform a judgment action during implementation, nor implying any other limitations.
[0059] The term "and / or" in the embodiments of this application is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A exists, A and B exist simultaneously, and B exists. Additionally, the character " / " in the embodiments of this application generally indicates that the preceding and following related objects have an "or" relationship.
[0060] Furthermore, it should be noted that, in the description of the embodiments of this application, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of this application according to the specific circumstances.
[0061] To facilitate understanding, the technical terms used in this application will be explained and described below.
[0062] Figure 1 is a schematic diagram of the use of an active pen on an electronic device.
[0063] As shown in Figure 1, the first device 100 can be an electronic device with a touchscreen, and the second device 200 can be an active stylus. In actual use, the touchscreen needs to acquire the coordinates of the stylus tip to display the stylus's strokes. As an example, as shown in Figure 1, a certain number of horizontal and vertical detection electrodes are distributed on the touchscreen. When the coding signal output by the stylus tip electrode acts on a certain position on the touchscreen, the corresponding horizontal and vertical detection electrodes will generate corresponding detection signals, such as capacitance signals. Based on these detection signals, the position coordinates of the stylus tip on the touchscreen can be calculated.
[0064] Typically, there are two methods to achieve synchronization between a touchscreen and an active pen. For active pens using the Microsoft Pen Protocol (MPP), the touchscreen gradually aligns its detection cycle with the active pen's coding cycle by frequently detecting the active pen's coding signal and adjusting its own detection cycle. For active pens using the Universal Stylus Initiative (MSI) protocol, the touchscreen periodically sends beacon signals, such as Direct Sequence Spread Spectrum (DSSS) encoded signals, which are detected by the active pen. When the active pen detects the correct beacon signal, it transmits a coding signal according to the agreed-upon time delay, thus achieving synchronization between the touchscreen and the active pen.
[0065] The current industry standard uses the touchscreen's sensor as an antenna to transmit DSSS-encoded signals. The active pen then receives these signals to align its timing. However, this synchronization method is time-consuming, typically requiring one or two cycles, each usually 16 milliseconds, thus introducing a time delay. The touchscreen's uplink signal, constrained by power consumption and screen display, has a strength of only about 3V, making the active pen highly susceptible to environmental interference when receiving DSSS-encoded signals, leading to timing misalignment. Furthermore, the touchscreen's height requirement for detecting the active pen's coding signal is generally only 10mm to 30mm. This means the pen tip must be very close to the touchscreen surface to begin synchronization, significantly compressing the pen's advance working time. Therefore, the synchronization process has a time delay, slowing down the initial writing response and impacting the user's writing experience.
[0066] To address the aforementioned issues, this application proposes a method for synchronizing an electronic device, an active pen, and timing, wherein the electronic device and the active pen achieve timing synchronization based on Star Flash Communication technology.
[0067] Figure 2 is a schematic diagram of the timing synchronization process between the electronic device and the active pen provided in the embodiment of this application.
[0068] As shown in Figure 2, the first device can represent an electronic device with a touchscreen, and the second device can represent an active stylus. Since users may operate the touchscreen with their fingers or the active stylus, timing synchronization is achieved when the period of the touchscreen's detection signal and the period of the active stylus's signal emission are aligned, and the touchscreen's signal detection window and the active stylus's coding window are synchronized. After timing synchronization, the touchscreen can correctly detect the active stylus's coding signal and calculate its touch information, such as position, pressure, and tilt angle. Furthermore, as shown in Figure 2, the active stylus can also detect finger touches during periods when it is not actively detecting the stylus. The touchscreen display frequency can be 60Hz or 120Hz. 60Hz means the touchscreen displays 60 frames per second. Taking 60Hz as an example, one frame represents 16667μs, meaning timing synchronization between the touchscreen and the active stylus can be achieved within this frame.
[0069] To better utilize the StarSpark device to achieve timing synchronization between the active pen and the touch screen, the embodiments provided in this application utilize the StarSpark chip to transmit timestamp information associated with the synchronization signal, and achieve synchronization between the touch screen and the active pen based on the timestamp information.
[0070] Figure 3 is a flowchart illustrating the timing synchronization process provided in an embodiment of this application. The method 300 in Figure 3 is used for timing synchronization between a first synchronization chip in a first device and a second synchronization chip in a second device. Optionally, the first device is one of an electronic device with a touchscreen and an active pen, and the second device is the other of an electronic device with a touchscreen and an active pen. For example, the first device is an electronic device with a touchscreen, and the second device is an active pen; or, the first device is an active pen, and the second device is an electronic device with a touchscreen.
[0071] Method 300 can be executed by a first processing chip of a first device, a first wireless communication chip and a first synchronization chip connected to the first processing chip, a second synchronization chip of a second device, and a second wireless communication chip connected to the second synchronization chip.
[0072] For example, as shown in Figure 3, when the first device is an electronic device with a touchscreen and the second device is an active pen, the first wireless communication chip is a wireless communication chip in the electronic device, such as a Bluetooth chip, a Wireless Fidelity (WIFI) chip, a Radio Frequency (RF) chip, a Near Field Communication (NFC) chip, or a strobe chip; the first synchronization chip is the touch chip of the touchscreen, i.e., a Touch and Display Driver Integration (TDDI), used to generate and send synchronization signals. Both the first synchronization chip and the first wireless communication chip can interact with the first processing chip of the electronic device, such as a CPU, and the first synchronization chip can send synchronization signals to the first wireless processing chip through an I / O interface. The second wireless communication chip is a wireless communication chip in the active pen, such as a Bluetooth chip, a WIFI chip, an RF chip, an NFC chip, or a strobe chip; the second synchronization chip is the coding chip of the active pen, used to output coding signals and detect the uplink signals output by the active pen. The second synchronization chip and the second wireless communication chip can transmit signals through an I / O interface, and the second synchronization chip can also be connected to a pressure sensor to detect the pressure information of the active pen.
[0073] Accordingly, when the first device is an active pen and the second device is an electronic device with a touch screen, the first wireless communication chip is the wireless communication chip in the active pen, such as a Bluetooth chip, a WIFI chip, an RF chip, an NFC chip, or a star flash chip; the first synchronization chip is the coding chip of the active pen; the second wireless communication chip is the wireless communication chip of the electronic device, such as a Bluetooth chip, a WIFI chip, an RF chip, an NFC chip, or a star flash chip; and the second synchronization chip is TDDI.
[0074] The first wireless communication chip and the second wireless communication chip can transmit wirelessly, for example, by transmitting data packets based on the connection period, also known as the connection interval, agreed upon in the StarSpark protocol. The aforementioned StarSpark chip is, for example, a super low energy (SLE) chip.
[0075] For example, the first synchronization chip and the second synchronization chip can transmit signals through an I / O interface. For instance, the active pen can send a coding signal to the touch screen.
[0076] The synchronization signal used for synchronization in method 300 can be generated by either the first synchronization chip or the second synchronization chip, and the other chip can adjust its period to achieve synchronization. Hereinafter, it is assumed that the first synchronization chip periodically generates the synchronization signal during the synchronization process and sends it to the first processing chip. After receiving the synchronization signal, the first processing chip sends a first signal to the first wireless communication chip. After receiving the first signal, the first wireless communication chip latches the clock information of the current moment and sends the clock information. As shown in Figure 3, method 300 includes some or all of the following steps.
[0077] It should be noted that the time information can be a timestamp, used to mark the start of the scanning of the coding signal by the first device from the current moment.
[0078] In step 310, the first synchronization chip sends a synchronization signal to the first processing chip at the first moment T0.
[0079] In step 310 above, the first time T0 when the first synchronization chip sends the synchronization signal can be understood as the initial time when the first device sends the synchronization signal in the frame in Figure 2. That is, the first time T0 is used as the time anchor point for sending the synchronization signal so that the first device and the second device can detect the coding signal based on the time anchor point.
[0080] In step 320, the first processing chip receives the synchronization signal sent by the first synchronization chip at the first time T0.
[0081] In step 330, the first processing chip sends a first signal to the first wireless communication chip.
[0082] It should be noted that in the first device provided in this application, the first processing chip can usually directly control the first wireless communication chip and the first synchronization chip. The main function of the first processing chip is to transmit the synchronization signal sent by the first synchronization chip to the first wireless communication chip.
[0083] In step 340, the first wireless communication chip receives the first signal and obtains the clock information at the current moment.
[0084] In step 350, the first wireless communication chip sends time information associated with the clock information to the second wireless communication chip.
[0085] It should be noted that the time information is related to the clock information, which means that the time information is determined based on the clock information, and the time information carries the clock information.
[0086] The time information can be understood as a control command. The first wireless communication chip uses this control command to notify the second wireless communication chip that it needs to generate a periodic coding signal at a certain precise time. The precise time is the second time T1 when the second synchronization chip generates the coding signal.
[0087] In step 360, the time information is obtained, wherein the time information is used to determine the second time T1 when the second synchronization chip generates the coding signal.
[0088] In step 370, based on the time information, the second time T1 at which the second synchronization chip generates the coding signal is determined.
[0089] In step 380, the second synchronization chip synchronizes with the first synchronization chip at the second time T1.
[0090] In some possible implementations, the time difference between the first time T0 and the second time T1 is less than or equal to a first time threshold, which is less than or equal to 10 μs. For example, it can be 9 μs, 8 μs, 7 μs, 6 μs, 5 μs, 4 μs, 3 μs, 2 μs or 1 μs.
[0091] Based on the above technical solution, when the second synchronization chip generates the coding signal at the second time T1, it can fall within the signal detection window of the first synchronization chip, so that the first device can respond in time every time the second device needs to put down the pen to write, reducing the delay when the user puts down the pen.
[0092] In the above steps, step 310 is executed by the first synchronization chip, steps 320 and 330 are executed by the first processing chip, steps 340 and 350 can be executed by the first wireless communication chip, and steps 360 and 370 can be executed by the second wireless communication chip. The second wireless communication chip can inform the second synchronization chip of the information of the second time T1 it has determined, so that the second synchronization chip can adjust its period for sending the coding signal. For example, as shown in Figure 3, before step 380, the second synchronization chip also executes step 390. Step 390 is that the second wireless communication chip sends the information of the second time T1, the second synchronization chip receives the information of the second time T1, and generates the coding signal at the second time T1 according to the information.
[0093] The first signal can be an interrupt signal. After receiving the interrupt signal, the first wireless communication chip latches the precise clock of the first wireless communication chip at the current moment. That is, the first wireless communication chip responds to the received first signal and obtains the clock information at the current moment.
[0094] In this embodiment, the precision of the clock information at the current moment obtained by the first wireless communication chip is less than or equal to the second time threshold. In some possible implementations, the second time threshold is less than or equal to 5μs, for example, it can be 4μs, 3μs, 2μs or 1μs, etc.
[0095] It should be noted that the precision of the clock information refers to the time difference between the moment the first wireless communication chip receives the first signal and the moment the first wireless communication chip actually latches the current clock. Since the time information is determined based on the clock information, the precision of the time information can also be considered as the precision of the clock information.
[0096] The synchronization signal can be a square wave signal or a pulse wave signal.
[0097] As can be seen, after receiving the first signal sent by the first processing chip at the first time T0, the first wireless communication chip connected to the first processing chip first obtains the clock information of the current time, and then sends the time information associated with the clock information to the second wireless communication chip connected to the second synchronization chip. The second device obtains the time information associated with the clock information through the second wireless communication chip, and uses the first time T0 as the time anchor point for sending the synchronization signal, i.e., the time reference point, to determine the second time T1 at which the second synchronization chip generates the coding signal based on the first time T0. Thus, the second synchronization chip generates the coding signal at the second time T1, and the first synchronization chip detects the coding signal at the second time T1, thereby achieving time synchronization between the first synchronization chip and the second synchronization chip. Because the low latency of the StarSpark wireless communication chip is used to achieve time synchronization between the touch screen and the active pen, the accuracy of the touch screen in detecting the coding signal of the active pen is very high. Moreover, the pen tip position can be detected immediately when the active pen is close to the touch screen, which speeds up the response speed of the first writing stroke of the active pen and enables the touch screen and the active pen to maintain synchronization for a long time, improving the user experience.
[0098] After the first synchronization chip and the second synchronization chip synchronize at the second time T1, they can transmit signals based on the second time T1. For example, at an agreed time, either at the second time T1 or after a specific time period starting from the second time T1, the active stylus can transmit a coding signal to the touch screen, and the touch screen can detect the coding signal within the same time period; or at the second time T1 or after a specific time period starting from the second time T1, the touch screen can send an uplink signal to the active stylus, and the active stylus can detect the uplink signal within the same time period.
[0099] In some possible implementations, after the second wireless communication chip receives the time information, it can determine the timing of generating the coding signal based on the time information, for example, determining the time interval for sending the coding signal so as to match the time window for detecting the coding signal of the first device.
[0100] After the first synchronization chip and the second synchronization chip synchronize at the second time T1, during the signal transmission based on the second time T1, the synchronization signal, the first signal, the time information and other signals may have time delay errors during the transmission and reception. As the time delay error accumulates, the timing between the touch screen and the active pen will lose synchronization. Therefore, it is necessary to re-synchronize the timing between the touch screen and the active pen.
[0101] During signal transmission between the first and second synchronization chips, timing synchronization can be performed intermittently. For example, taking a touchscreen refresh rate of 60Hz as an example, the first and second synchronization chips complete timing synchronization in the first frame of 60Hz. That is, within the first frame, the first synchronization chip sends a synchronization signal at the first time T0, and the second synchronization chip determines the second time T1 for sending the coding signal based on this synchronization signal. Then, in the following second to twenty-ninth frames, the first synchronization chip may no longer send a synchronization signal. The first synchronization chip maintains the detection timing of the coding signal determined in the first frame to detect the coding signal, and the second synchronization chip maintains the transmission timing of the coding signal determined in the first frame to transmit the coding signal. During this process, a time delay error may occur between the detection timing and the transmission timing of the two chips. Timing synchronization is performed again within 30 frames, that is, steps 310-380 are repeated within the 30th frame to complete the synchronization between the first synchronization chip and the second synchronization chip. Then, in the following 31st to 59th frames, the first synchronization chip may no longer send a synchronization signal. The first synchronization chip maintains the detection timing of the coding signal determined in the first frame to detect the coding signal, and the second synchronization chip maintains the transmission timing of the coding signal determined in the first frame to send the coding signal. Timing synchronization is performed again within 60 frames, that is, steps 310-380 are repeated within the 30th frame to complete the synchronization between the first synchronization chip and the second synchronization chip. The first synchronization chip and the second synchronization chip perform timing synchronization in 3 frames in 60Hz to ensure the accuracy of the timing synchronization between the first synchronization chip and the second synchronization chip.
[0102] Figure 4 is a schematic diagram of the architecture of a first device and a second device provided in an embodiment of this application.
[0103] The first device may be an electronic device with a touch screen. The first device may include a first processing chip, a first synchronization chip, and a first wireless communication chip, which are electrically connected to the first processing chip respectively.
[0104] The first synchronization chip is used to send a synchronization signal at the first moment.
[0105] In some possible implementations, the first synchronization chip periodically sends synchronization signals.
[0106] The first processing chip is used to receive a synchronization signal, and after receiving the synchronization signal, it sends a first signal to indicate the acquisition of clock information.
[0107] The first wireless communication chip is used to receive the first signal and obtain clock information, which includes the current time information of the first wireless communication chip.
[0108] The first wireless communication chip is also used to transmit time information, which is time information associated with clock information, or in other words, time information determined based on clock information. This time information is used to determine a second moment, which is the moment when the second synchronization chip generates the coding signal.
[0109] In some possible implementations, the time difference between the first time point and the second time point is less than or equal to a first time threshold, which is less than or equal to 10 μs.
[0110] In some possible implementations, the precision of the time information is less than or equal to a second time threshold, which is less than or equal to 5 μs.
[0111] The second device can be an active pen. The second device includes a second wireless communication chip and a second synchronization chip that are electrically connected. The second wireless communication chip can be a wireless communication chip integrated into the microcontroller unit (MCU) of the second device.
[0112] The second synchronization chip is used to receive information at the second moment, which is the moment when the second synchronization chip generates the coding signal.
[0113] The second wireless communication chip is used to transmit information at the second moment.
[0114] The second wireless communication chip is also used to acquire time information, which is used to determine the second moment.
[0115] The second wireless communication chip is also used to determine the second moment when the second synchronization chip generates the coding signal.
[0116] For example, the second wireless communication chip receives the time information sent by the first wireless communication chip and determines the second time T1 when the second synchronization chip generates the coding signal based on the time information.
[0117] In some possible implementations, the precision of the time information is less than or equal to a second time threshold, which is less than or equal to 5 μs.
[0118] This application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the technical solutions described in the above embodiments. Its implementation principle and technical effects are similar to those of the related embodiments described above, and will not be repeated here.
[0119] This application provides a readable storage medium containing instructions that, when executed by an electronic device, cause the electronic device to perform the technical solution described in the above embodiments. The implementation principle and technical effects are similar and will not be repeated here.
[0120] This application provides a chip for executing instructions. When the chip is running, it executes the technical solutions described in the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.
[0121] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.
[0122] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0123] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0124] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0125] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0126] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0127] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for time synchronization, characterized in that, The method is applied to an electronic device, and the method includes: The first processing chip of the electronic device sends a first signal to the first wireless communication chip of the electronic device. The first signal is used to indicate the acquisition of clock information, and the clock information includes the current time information of the first wireless communication chip. The first wireless communication chip receives the first signal and sends time information. The time information is used to determine a second moment, which is the moment when the second synchronization chip of the active pen generates the coding signal. The time information is determined based on the clock information.
2. The method according to claim 1, characterized in that, The method further includes: Upon receiving a synchronization signal, the first processing chip sends the first signal.
3. The method according to claim 2, characterized in that, The method further includes: The first synchronization chip of the electronic device sends the synchronization signal at a first moment, and the time difference between the first moment and the second moment is less than or equal to a first time threshold, which is less than or equal to 10μs.
4. The method according to any one of claims 1-3, characterized in that, The precision of the time information is less than or equal to a second time threshold, and the second time threshold is less than or equal to 5 μs.
5. The method according to any one of claims 1-4, characterized in that, The first wireless communication chip includes a star-flash chip.
6. A method for timing synchronization, characterized in that, The method is applied to an active pen, and the method includes: The second synchronization chip of the active pen receives information at a second moment, which is the moment when the second synchronization chip generates the coding signal. The second moment is determined based on the time information sent by the first wireless communication chip of the electronic device.
7. The method according to claim 6, characterized in that, The method further includes: The second wireless communication chip of the active pen transmits the information at the second moment.
8. The method according to claim 6 or 7, characterized in that, The method further includes: The second wireless communication chip of the active pen acquires time information, which is used to determine the second moment.
9. The method according to claim 8, characterized in that, The precision of the time information is less than or equal to a second time threshold, and the second time threshold is less than or equal to 5 μs.
10. The method according to any one of claims 7-9, characterized in that, The second wireless communication chip includes a star-flash chip.
11. An electronic device, characterized in that, The electronic device includes: A first processing chip and a first wireless communication chip are electrically connected. The first processing chip is used to send a first signal to the first wireless communication chip. The first signal is used to indicate the acquisition of clock information, and the clock information includes the current time information of the first wireless communication chip. The first wireless communication chip is used to receive the first signal and also to send time information. The time information is used to determine a second moment, which is the moment when the second synchronization chip of the active pen generates the coding signal. The time information is determined based on the clock information.
12. The electronic device according to claim 11, characterized in that, The first processing chip is also used to send the first signal upon receiving a synchronization signal.
13. The electronic device according to claim 12, characterized in that, The electronic device also includes: A first synchronization chip electrically connected to the first processing chip, the first synchronization chip is used to send the synchronization signal at a first moment, and the time difference between the first moment and the second moment is less than or equal to a first time threshold.
14. The electronic device according to claim 13, characterized in that, The first time threshold is less than or equal to 10 μs.
15. The electronic device according to any one of claims 11-14, characterized in that, The precision of the time information is less than or equal to the second time threshold.
16. The electronic device according to claim 15, characterized in that, The second time threshold is less than or equal to 5 μs.
17. The electronic device according to any one of claims 11-16, characterized in that, The first wireless communication chip includes a star-flash chip.
18. An active pen, characterized in that, The active pen includes: The second synchronization chip is used to receive information at a second time. The second time is the moment when the second synchronization chip generates the coding signal. The second time is determined based on the time information sent by the first wireless communication chip of the electronic device.
19. The active pen according to claim 18, characterized in that, The active pen also includes: A second wireless communication chip electrically connected to the second synchronization chip, the second wireless communication chip being used to transmit information at the second moment.
20. The active pen according to claim 18 or 19, characterized in that, The second wireless communication chip is also used to acquire the time information, which is used to determine the second moment.
21. The active pen according to claim 19 or 20, characterized in that, The second wireless communication chip is also used to determine the second moment when the second synchronization chip generates the coding signal.
22. The active pen according to any one of claims 18-21, characterized in that, The precision of the time information is less than or equal to the second time threshold.
23. The active pen according to claim 22, characterized in that, The second time threshold is less than or equal to 5 μs.
24. The active pen according to any one of claims 18-23, characterized in that, The second wireless communication chip includes a star-flash chip.
25. An electronic device, characterized in that, It includes one or more processors; one or more memories; said one or more memories storing one or more computer programs, said one or more computer programs including instructions that, when executed by said one or more processors, cause the method of any one of claims 1 to 5 or the method of any one of claims 6 to 10 to be performed.
26. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the method as described in any one of claims 1 to 5 or the method as described in any one of claims 6 to 10 to be performed.
27. A chip, characterized in that, The chip includes a processor and a communication interface, the communication interface being used to receive signals and transmit the signals to the processor, the processor processing the signals such that the method as claimed in any one of claims 1 to 5 or the method as claimed in any one of claims 6 to 10 is executed.
28. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the method as described in any one of claims 1 to 5 or the method as described in any one of claims 6 to 10 to be performed.