WO2024007974A1 - Procédé de synchronisation d'horloge et dispositif électronique - Google Patents

Procédé de synchronisation d'horloge et dispositif électronique Download PDF

Info

Publication number
WO2024007974A1
WO2024007974A1 PCT/CN2023/104379 CN2023104379W WO2024007974A1 WO 2024007974 A1 WO2024007974 A1 WO 2024007974A1 CN 2023104379 W CN2023104379 W CN 2023104379W WO 2024007974 A1 WO2024007974 A1 WO 2024007974A1
Authority
WO
WIPO (PCT)
Prior art keywords
chip
time
interrupt
triggered
duration
Prior art date
Application number
PCT/CN2023/104379
Other languages
English (en)
Chinese (zh)
Inventor
孙渊
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024007974A1 publication Critical patent/WO2024007974A1/fr

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements

Definitions

  • the present application relates to the field of terminals, and more specifically, to a clock synchronization method and electronic equipment.
  • the present application provides a clock synchronization method and electronic device, which can achieve clock synchronization between the first chip and the second chip of a slave device, thereby achieving synchronization of output signals of multiple slave devices.
  • a system in a first aspect, includes a master device and a plurality of slave devices. Each slave device in the plurality of slave devices includes a first chip and a second chip. The first chip interacts with the device in a first manner.
  • the master device communicates, and the first method includes a short-range wired connection or a short-range wireless connection, wherein the first chip in the first slave device is used to perform a first clock synchronization process with the master device based on the first method,
  • the first slave device is any one of the plurality of slave devices; the first chip is used to trigger a first interrupt to send a first signal to the second chip in the first slave device; the second The chip is used to trigger the second interrupt according to the first signal; the second chip is also used to obtain the first time when the first interrupt is triggered; the second chip is also used to trigger the first time according to the first time and the second interrupt.
  • the second clock synchronization process is performed.
  • the first chip in the first slave device is synchronized with the clock of the master device through the first clock synchronization process.
  • the first slave device is any slave device among the plurality of slave devices; the first slave device
  • the second chip in the device performs a second clock synchronization process based on the time when it receives the interrupt signal of the first chip and the time when the first chip triggers the interrupt, to achieve clock synchronization with the first chip.
  • the second chip is also used to obtain the first time when the first interrupt is triggered, including: receiving the third time from the first chip at a third time.
  • a piece of information, the first information is used to indicate the first time, and the third time is earlier than the second time.
  • the first interrupt is the Nth interrupt triggered by the first chip
  • the first information is the fourth interrupt triggered by the first chip.
  • the moment and the first duration are determined.
  • the first duration is the duration between two adjacent interrupts triggered by the first chip, N ⁇ 2, N is an integer, or the first information is based on the first slave device.
  • the first interrupt is the Nth interrupt triggered by the first chip, and the first chip is also used to: trigger the N1th interrupt to provide the signal to the
  • the two moments determine the first duration, which is the duration between two adjacent interrupts triggered by the first chip; the second chip is also used to obtain the first moment that triggers the first interrupt, including: the third The second chip determines the first time based on the sixth time and the first duration.
  • the second chip is further configured to perform a second clock synchronization process based on the first moment and the second moment when the second interrupt is triggered, including: according to The first time and the second time determine a first time offset value; the local clock is adjusted according to the first time offset value.
  • the first interrupt is one of M interrupts triggered by the first chip
  • the second chip is also used to: obtain the trigger triggered by the first chip.
  • M time deviation values are determined based on the M moments and the M moments corresponding to the second chip triggering M interrupts, and the i-th time deviation value among the M time deviation values is It is determined based on the time when the first chip triggers the i-th interrupt and the time when the second chip triggers the i-th interrupt; wherein, the i-th interrupt triggered by the second chip is based on the i-th interrupt triggered by the first chip.
  • the second chip is further configured to perform a second clock synchronization process based on the first moment and the second moment when the second interrupt is triggered, including: according to The average of the M time deviation values adjusts the local clock with a first duration as a period; or, adjusts the local clock with a second duration as a period based on the average value of the M time deviation values, and the second duration is longer than the first duration;
  • the first duration is the duration between two adjacent interrupts triggered by the first chip.
  • a clock synchronization method is provided.
  • the method is applied to a first system.
  • the first system includes a master device and a plurality of slave devices.
  • Each slave device in the plurality of slave devices includes a first chip and a third slave device.
  • Two chips the first chip communicates with the master device through a first method, the first method includes a short-range wired connection or a short-range wireless connection, the method includes: the first chip in the first slave device, based on the first The method performs a first clock synchronization process with the master device, and the first slave device is any slave device among the plurality of slave devices; the first chip triggers a first interrupt to send a message to the second slave device among the first slave devices.
  • the chip sends a first signal; the second chip triggers a second interrupt based on the first signal; the second chip obtains the first time that triggers the first interrupt; the second chip triggers the second interrupt based on the first time and At the second moment of the interruption, the second clock synchronization process is performed.
  • the first chip in the first slave device is synchronized with the clock of the master device through the first clock synchronization process.
  • the first slave device is any slave device among the plurality of slave devices; the first slave device
  • the second chip in the device performs a second clock synchronization process based on the time when it receives the interrupt signal of the first chip and the time when the first chip triggers the interrupt, to achieve clock synchronization with the first chip.
  • the second chip receives first information from the first chip, and the first information is used to indicate the first moment.
  • the second chip receives the first information from the first chip at a third time, and the third time is earlier than the second time.
  • the first interrupt is the Nth interrupt triggered by the first chip
  • the first information is the fourth interrupt triggered by the first chip.
  • the first duration is the duration between two adjacent interrupts triggered by the first chip, N ⁇ 2, N is an integer, or the first information is based on the first chip triggering the first interrupt.
  • the first interrupt is the Nth interrupt triggered by the first chip, and the first chip triggers the N1th interrupt to send a message to the second chip.
  • the second signal, N 1 N-1, N ⁇ 2, N is an integer; the second chip triggers a third interrupt according to the second signal; the second chip receives the second information from the first chip, and the second chip
  • the second information is used to indicate the sixth time when the N1th interrupt is triggered; the second chip determines the first duration based on the seventh time when the third interrupt is triggered and the second time, and the first duration is the first time.
  • the first chip of the slave device triggers the duration between two adjacent interrupts; the second chip determines the first moment based on the sixth moment and the first duration.
  • the second chip determines a first time offset value based on the first time and the second time; the second chip adjusts the local time offset value based on the first time offset value. clock.
  • the first interrupt is one of M 1 interrupts triggered by the first chip
  • the second chip obtains the M interrupts triggered by the first chip.
  • the second chip determines M time deviation values based on the M times and the M times corresponding to the second chip triggering M interrupts, and the i-th time deviation value among the M time deviation values It is determined based on the time when the first chip triggers the i-th interrupt and the time when the second chip triggers the i-th interrupt; wherein, the i-th interrupt triggered by the second chip is based on the i-th interrupt triggered by the first chip.
  • the second chip uses an average value of the M time deviation values according to the A period of time is used to adjust the local clock; or, the second chip adjusts the local clock to a period of a second period of time based on the average of the M time deviation values, and the second period of time is greater than the first period of time; wherein, the first period of time is The first chip triggers the duration between two adjacent interrupts.
  • a clock synchronization method is provided, characterized in that the method is applied to an electronic device.
  • the electronic device includes a first chip and a second chip.
  • the first chip triggers a first interrupt to send a signal to the second chip. Send a first signal; the second chip triggers a second interrupt based on the first signal; the second chip obtains the first time that triggers the first interrupt; the second chip triggers the second interrupt based on the first time and At the second moment, clock synchronization is performed.
  • the second chip receives the first information from the first chip at a third time, the first information is used to indicate the first time, the third time The third moment is earlier than the second moment.
  • the first interrupt is the Nth interrupt triggered by the first chip
  • the first information is the fourth interrupt triggered by the first chip.
  • the first duration is the duration between two adjacent interrupts triggered by the first chip, N ⁇ 2, N is an integer, or the first information is based on the first chip triggering the first interrupt.
  • the first interrupt is the Nth interrupt triggered by the first chip, and the first chip triggers the N1th interrupt to send a message to the second chip.
  • the second signal, N 1 N-1, N ⁇ 2, N is an integer; the second chip triggers a third interrupt according to the second signal; the second chip receives the second information from the first chip, and the second chip
  • the second information is used to indicate the sixth time when the N1th interrupt is triggered; the second chip determines the first duration based on the seventh time when the third interrupt is triggered and the second time, and the first duration is the first time.
  • the chip triggers the duration between two adjacent interrupts; the second chip obtains the first moment when the first interrupt is triggered, and the second chip determines the first moment based on the sixth moment and the first duration.
  • the second chip determines a first time offset value based on the first time and the second time; the second chip adjusts the local time offset value based on the first time offset value. clock.
  • the first interrupt is one of the M 1 interrupts triggered by the first chip
  • the second chip obtains the M interrupts triggered by the first chip.
  • the second chip determines M time deviation values based on the M times and the M times corresponding to the second chip triggering M interrupts, and the i-th time deviation value among the M time deviation values It is determined based on the time when the first chip triggers the i-th interrupt and the time when the second chip triggers the i-th interrupt; wherein, the i-th interrupt triggered by the second chip is based on the i-th interrupt triggered by the first chip.
  • the second chip adjusts the local clock according to the average of the M time deviation values with a first duration as a period; or, the second chip adjusts the local clock according to the M time deviation values.
  • the average value of the time deviation value adjusts the local clock with a second duration as a period, and the second duration is greater than the first duration; wherein the first duration is the duration between two adjacent interrupts triggered by the first chip.
  • a fourth aspect provides an electronic device, which includes a first chip and a second chip, wherein the first chip is used to trigger a first interrupt to send a first signal to the second chip; the second chip The chip is used to trigger the second interrupt according to the first signal; the second chip is also used to obtain the first time when the first interrupt is triggered; the second chip is also used to trigger the first time according to the first time and the second interrupt. At the second moment of the second interrupt, clock synchronization processing is performed.
  • the second chip is also used to obtain the first time when the first interrupt is triggered, including: receiving a signal from the first chip at a third time.
  • the first information is used to indicate the first time, and the third time is earlier than the second time.
  • the first interrupt is the Nth interrupt triggered by the first chip
  • the first information is the fourth interrupt triggered by the first chip.
  • the first duration is the duration between two adjacent interrupts triggered by the first chip, N ⁇ 2, N is an integer, or the first information is based on the first chip triggering the first interrupt.
  • the second chip is further configured to perform clock synchronization processing according to the first moment and the second moment when the second interrupt is triggered, including: according to the first moment A first time offset value is determined from a time point and the second time point; the local clock is adjusted according to the first time offset value.
  • the first interrupt is one of M 1 interrupts triggered by the first chip
  • the second chip is also used to: obtain the trigger of the first chip M moments corresponding to the M interrupts; determine M time deviation values based on the M moments and the M moments corresponding to the second chip triggering M interrupts, and the i-th time deviation value among the M time deviation values It is determined based on the time when the first chip triggers the i-th interrupt and the time when the second chip triggers the i-th interrupt; wherein, the i-th interrupt triggered by the second chip is based on the i-th interrupt triggered by the first chip.
  • the second chip is also configured to perform clock synchronization processing according to the first moment and the second moment when the second interrupt is triggered, including: according to the M The average value of the M time deviation values is used to adjust the local clock with a first duration as a period; or, the local clock is adjusted with a second duration as a period based on the average value of the M time deviation values, and the second duration is greater than the first duration; wherein, The first duration is the duration between two adjacent interrupts triggered by the first chip.
  • a clock synchronization method is provided.
  • the method is applied to a second chip.
  • the second chip is wired to the first chip.
  • the method includes: the second chip triggers a second interrupt according to the first signal, and the second chip is connected to the first chip through a wired connection.
  • a signal is a signal generated by the first chip triggering the first interrupt; the second chip obtains the first time that triggers the first interrupt; the second chip obtains the first time that triggers the first interrupt; the second chip based on the first time and the second time that triggers the second interrupt, Perform clock synchronization.
  • the second chip receives first information from the first chip at a third time, the first information is used to indicate the first time, and the third time earlier than this second time.
  • the first interrupt is the Nth interrupt triggered by the first chip
  • the first information is the fourth interrupt triggered by the first chip.
  • the first duration is the duration between two adjacent interrupts triggered by the first chip, N ⁇ 2, N is an integer, or the first information is based on the first chip triggering the first interrupt.
  • the first interrupt is triggered by the first chip for the Nth time
  • the second chip receives a second signal
  • the second signal is triggered by the first chip.
  • Trigger the signal generated by the N 1th interrupt, N 1 N-1, N ⁇ 2, N is an integer
  • the second chip triggers the third interrupt according to the second signal
  • the second chip receives the signal from the first chip
  • the second information is used to indicate the sixth time when the N1th interrupt is triggered; the second chip determines the first duration based on the seventh time when the third interrupt is triggered and the second time.
  • a duration is the duration between two adjacent interrupts triggered by the first chip; the second chip determines the first moment based on the sixth moment and the first duration.
  • the second chip determines a first time offset value based on the first time and the second time; the second chip adjusts the local time offset value based on the first time offset value. clock.
  • the first interrupt is one of M 1 interrupts triggered by the first chip
  • the second chip obtains the M interrupts triggered by the first chip.
  • the second chip determines M time deviation values based on the M times and the M times corresponding to the second chip triggering M interrupts, and the i-th time deviation value among the M time deviation values It is determined based on the time when the first chip triggers the i-th interrupt and the time when the second chip triggers the i-th interrupt; wherein, the i-th interrupt triggered by the second chip is based on the i-th interrupt triggered by the first chip.
  • the second chip adjusts the local clock according to the average of the M time deviation values with a first duration as a period; or, the second chip adjusts the local clock according to the M time deviation values.
  • the average value of the time deviation value adjusts the local clock with a second duration as a period, and the second duration is greater than the first duration; wherein the first duration is the duration between two adjacent interrupts triggered by the first chip.
  • a chip including: one or more processors; memory; and one or more computer programs. Wherein, one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instruction is executed by the chip, the chip is caused to execute the method in any of the possible implementations of the fifth aspect.
  • a seventh aspect provides a computer program product containing instructions, which when the computer program product is run on a chip, causes the chip to execute the method described in the fifth aspect.
  • a chip is provided for executing instructions. When the chip is running, the chip executes the method described in the fifth aspect.
  • Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of a clock synchronization system.
  • FIG. 3 is a schematic flow chart of a clock synchronization method provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of triggering an interrupt and sending time information that triggers the interrupt provided by an embodiment of the present application.
  • Figure 5 is a schematic flow chart of a clock synchronization method provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of a clock synchronization method provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a clock synchronization device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a clock synchronization device provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. quantity. Therefore, features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, “plurality” means two or more.
  • Figure 1 is a schematic diagram of a scenario applicable to the clock synchronization method provided by the embodiment of the present application.
  • Figure 1 shows an application scenario of whole-house music playback.
  • at least one slave device is placed in each room, for example, slave device 121 to slave device 126.
  • the slave device can be a music playback device, such as a smart speaker.
  • at least one main device is placed in the whole house, for example, the main device 110.
  • the main device 110 is used to control music playback.
  • the slave devices 121 to 126 need to output sounds synchronously, so as to realize synchronous playback of music in the whole house (for example, including room 1 to room 4).
  • the main device 110 may include at least one first chip, which may be a processor.
  • the first chip may include one or more processing units.
  • the processor 110 may include an application processor. , AP), modem processor, controller, memory, video codec, digital signal processor (DSP), etc.
  • different processing units can be independent devices or integrated in one or more processors.
  • the controller may be the nerve center and command center of the main device 110 .
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • a memory may also be provided in the first chip for storing instructions and data.
  • the memory in the first chip is a cache memory.
  • the memory can store the instructions or data just used or recycled by the first chip. If the first chip needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • the first chip may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, inter-integrated circuit audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter, UART) interface, general-purpose input/output (GPIO) interface, etc.
  • I2C integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver and transmitter
  • GPIO general-purpose input/output
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the first chip may include multiple sets of I2C buses.
  • the I2S interface can be used for audio communication.
  • the first chip may also include multiple sets of I2S buses.
  • the first chip can be coupled with the audio module through the I2S bus to realize communication between the first chip and the audio module.
  • the PCM interface can also be used for audio communications to sample, quantize and encode analog signals.
  • the audio module and the wireless communication module may be coupled through a PCM bus interface. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. it will be transmitted The data is converted between serial communication and parallel communication.
  • the UART interface is generally used to connect the first chip and the wireless communication module.
  • the first chip communicates with the Bluetooth module in the wireless communication module through the UART interface to implement the Bluetooth function.
  • the audio module can transmit audio signals to the wireless communication module through the UART interface to implement the function of playing music through the Bluetooth headset.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the first chip to the display screen, wireless communication module, audio module, etc.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, etc.
  • the wireless communication function of the main device 110 can be implemented through antenna 1, antenna 2, mobile communication module, wireless communication module, modem processor, baseband processor, etc.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in master device 110 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be reused as a diversity antenna for a wireless LAN. In other embodiments, antennas may be used in conjunction with tuning switches.
  • the mobile communication module can provide wireless communication solutions including 2G/3G/4G/5G applied to the main device 110.
  • the mobile communication module may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module may be disposed in the first chip.
  • at least part of the functional modules of the mobile communication module may be provided in the same device as at least part of the modules of the first chip.
  • the main device 110 may also include a wireless communication module.
  • the wireless communication module may provide a wireless local area network (WLAN) (such as a wireless fidelity (Wi-Fi) network) applied to the main device 110. , Bluetooth (bluetooth, BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc. Wireless communication solutions.
  • the wireless communication module may be one or more devices integrating at least one communication processing module.
  • the wireless communication module receives electromagnetic waves through the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the first chip.
  • the wireless communication module can also receive the signal to be sent from the first chip, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the slave device may include the first chip and the second chip.
  • the second chip may be an audio module.
  • the audio module is used to convert digital audio information into an analog audio signal output, and is also used to convert analog audio input into a digital audio signal.
  • the audio module can also be used to encode and decode audio signals.
  • the audio module can include a hardware codec (encode and decode, codec) chip for audio collection and playback.
  • the first chip sends the audio digital signal to the codec chip through the I2S bus, and then the second chip converts the digital signal into an analog signal (ie, D/A conversion) and then plays it out.
  • the codec can also perform corresponding processing on audio signals, such as volume control, equalize (EQ) control, etc.
  • the second chip can also be connected to various peripherals, such as a microphone (MIC), an earpiece (earpiece), a speaker (speaker), etc.
  • peripherals such as a microphone (MIC), an earpiece (earpiece), a speaker (speaker), etc.
  • PA power amplifier
  • the slave device can implement audio functions through audio modules, speakers, receivers, microphones, headphone interfaces, and application processors. Such as music playback, recording, etc.
  • the first chip of the slave device can interact with the first chip of the master device 110 through a wired or wireless communication network.
  • the format or standard of the communication network is not limited. It can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof. .
  • the master device 110 and the slave devices 121 to 126 interact through a power line communication (PLC) network.
  • PLC power line communication
  • the main device 110 is used to modulate user Ethernet data and then transmit it on the power line.
  • the slave device filters out the modulated signal through a filter, and then demodulates it to obtain the original communication signal.
  • the first chips of the main device can communicate with each other through a gigabit ethernet (GE) interface.
  • GE gigabit ethernet
  • Each first chip of the main device 110 can be connected to a PLC loop, for example, the loop shown in Figure 2 1. Loop 2 and Loop 3.
  • the loop 1 to loop 3 can be connected to slave devices respectively.
  • loop 1 is connected to the slave device 124 of room 3; loop 2 can be connected to the slave device 125 and slave device 126 of room 4; loop 3 can be connected to room 1 and slave devices in room 2 (e.g., slave devices 121 to 123), thus The interaction between master and slave devices can be realized through the PLC loop.
  • the master device 110 and the first chip of the plurality of slave devices have respective clock systems.
  • the clock system performs timing according to predefined rules; the time rule can be a time system defined according to international standards, or a time standard defined according to a local LAN.
  • the first chip of the slave device can calibrate its own clock system through the PLC network, that is, clock synchronization can be achieved between the first chips of multiple devices and the first chip of the master device 110 . If synchronization of the final output signal is to be achieved, clock synchronization between the second chips of multiple slave devices is required. Therefore, how to calibrate the clock system of the second chip using the clock system of the first chip as a reference has become an urgent problem to be solved.
  • T 1 the time information of the first chip
  • T 2 T 1 +T offset
  • T offset the clock systems of the first chip and the second chip are at the same time T offset time deviation of the displayed time information.
  • the purpose of clock synchronization in the embodiment of this application is to estimate and eliminate the time offset T offset .
  • FIG. 3 is a schematic flow chart of a clock synchronization method 300 provided by an embodiment of the present application.
  • the method 300 shown in FIG. 3 may be applied to the system 200 shown in FIG. 2 , for example.
  • the method may be executed by a first slave device, for example, the first slave device is any one of the slave devices 121 to 126 .
  • the first slave device includes a first chip and a second chip.
  • the first chip performs first clock synchronization processing with the master device based on the first method.
  • the first method may be a connection method for the first chip to communicate with the host device.
  • the first method includes a short-range wireless connection or a short-range wired connection.
  • the first clock synchronization process may be a clock synchronization process based on a clock synchronization protocol (eg, Precision Time Protocol, or G.hn standard).
  • the first chip receives the first data from the master device, and the first data carries the first time timestamp T 0 .
  • the first data may be audio data, picture data or video data, for example.
  • the first timestamp T 0 may be determined by the master device, for example, the local time of the master device when the master device sends the first data.
  • the first chip triggers an interrupt to send an interrupt signal to the second chip.
  • the second chip triggers an interrupt according to the interrupt signal.
  • the first chip can trigger an interrupt at a first time interval, and the duration of the first time interval is T. That is, the first chip triggers a scheduled interrupt, and the timing duration is the duration of the first time interval. T.
  • the first chip triggering an interrupt can be understood as the first chip receiving or generating an interrupt signal (for example, high level, low level, rising edge, falling edge or pulse signal) to trigger the interrupt.
  • the first chip The chip triggers a GPIO interrupt.
  • the value of the first time interval T can be set according to the actual situation. For example, the value of T can be 100ms, that is, every 100ms, the first chip generates an interrupt and sends an interrupt signal to the second chip.
  • the first chip can trigger a first interrupt to send a first signal to the second chip; the second chip triggers a second interrupt based on the first signal.
  • the second chip obtains the time information of the interrupt triggered by the first chip.
  • the time information at which the first chip triggers an interrupt includes information at each time the first chip triggers an interrupt.
  • the time information of the first chip is a time value corresponding to each time the first chip triggers an interrupt.
  • the time value is, for example, a network time reference (NTR) value.
  • NTR network time reference
  • the first chip sends time information when the first chip triggers the interrupt to the second chip.
  • the first chip triggers the first interrupt at the first moment; the second chip triggers the second interrupt at the fourth moment, and the second interrupt is triggered based on the first interrupt.
  • the first chip sends first information to the second chip, the first information indicates the first time, and the first information may include the NTR value of the first time.
  • the first interrupt may be the Nth interrupt triggered by the first chip, N ⁇ 2, and N is an integer.
  • the first chip sends the first information before the first time to ensure the accuracy of clock calibration.
  • the first chip sends the first information to the second chip at a third time, which is a time between the first time and the second time, or in other words, the first time and the second time.
  • the duration between the three moments is less than the duration T of the first time interval.
  • the second time is the time when the first chip triggers the N-1th interrupt.
  • the NTR value of the first moment sent by the first chip at the third moment may be determined by the second moment and the duration T of the first time interval, or by the moment when the first chip triggers the first interrupt and the third time.
  • the duration T of a time interval is determined. That is to say, the first chip can determine the information of the first time based on the information of the known time before the first time.
  • the first chip can record the NTR value at the moment when the interrupt is triggered for the first time (recorded as the first NTR value). then the first time The NTR value at the moment is the sum of the first NTR value and the duration T of (N-1) first time intervals; when N is greater than or equal to 3, the NTR value at the first moment can also be the second NTR value and the The sum of the duration T of the first time interval, the second NTR value is the NTR value at the time when the first chip triggers the N-1th interrupt.
  • the first chip can record the time at which the N-1th interrupt is triggered. NTR value.
  • the first chip sending the first information at the third time can cause the second chip to receive the information at the first time before the fourth time.
  • the second chip determines the time information at which the first chip triggers the interrupt.
  • the first chip triggers the first interrupt at the first moment, and triggers the first interrupt at the second moment.
  • the second interrupt is triggered; in response to the first interrupt and the second interrupt, the second chip triggers a third interrupt and a fourth interrupt at a third time and a fourth time respectively.
  • the second chip receives the second information sent by the first chip at the fifth time, the second information indicates the time, and the fifth time is a time between the third time and the fourth time; the third time
  • the second chip determines the duration T of the first time interval based on the three moments and the fourth moment, and the second chip determines the time information of the second moment based on the second information and the duration T of the first time interval, N ⁇ 2, N is an integer.
  • the second chip performs a second clock synchronization process based on the time information of the first chip triggering the interrupt and the time information of the second chip triggering the interrupt.
  • the second chip determines the time offset T offset based on the time information of the first chip triggering the interrupt and the time information of the second chip triggering the interrupt, and eliminates T offset .
  • the time information of the second chip triggering the interrupt includes information of the time when the second chip triggers the interrupt each time. It can be understood that the second chip triggers an interrupt according to the interrupt triggered by the first chip.
  • the first chip triggers N interrupts.
  • the second chip triggers N interrupts.
  • T 2 and T 1 correspond one to one.
  • the time offset T offset between the first chip and the second chip can be determined by the time offset t offset_n between the time t 2_n when the second chip triggers the interrupt for the Nth time and the time t 1_n when the first chip triggers the interrupt for the Nth time.
  • the second chip can calibrate the local time according to the value of T offset every time T of the first time interval.
  • the second chip can determine the deviation law of the time deviation according to the values of multiple time deviations T offset .
  • the second chip can determine an average of multiple time deviation values, and the average of the time deviations can represent the time length T of the second chip's local time every first time interval compared to that of the first chip.
  • the first time offset value of the local time offset can be determined.
  • the second chip can calibrate the local time according to the deviation rule within the first time period without the first chip needing to send the time information for the first chip to trigger the interrupt.
  • the length of the first time period may be the length of M first time intervals, where M is a positive integer greater than or equal to 2.
  • M may be 1,000.
  • the second chip can determine the second time offset value of the local time of the second chip compared to the local time offset of the first chip at every second time interval based on the plurality of time offset values, wherein, The duration of the second time interval may be greater than the duration of the first time interval. Subsequently, the second chip can also calibrate the local time every second time interval according to the deviation rule. For example, the second chip can directly calibrate the local time according to the second time deviation value, or the second chip can calibrate the local time directly according to the second time deviation value. The second chip may receive the time information of the first chip triggering the interrupt sent by the first chip every second time interval, and calibrate the local time based on the time information of the first chip triggering the interrupt.
  • the second chip can perform time calibration according to the timing interrupt #1 triggered by the first chip during the first time period (the timing duration is the duration of the first time interval).
  • the second chip Self-calibration can be performed according to the time deviation rule; or, after the first time period, the second chip receives the interrupt signal sent by the first chip and the time information of the first chip triggering the interrupt at the second time interval according to the time deviation rule. , and local time calibration is performed based on the time information of the first chip triggering the interrupt.
  • the length of the second time interval is longer than the length of the first time interval, thereby saving data transmission resources.
  • the first chip can trigger n timing interrupts starting from time t 0 , and the timing duration is t; the second chip determines n time deviation values based on the n interrupts; the second chip determines n time deviation values based on the n time deviations.
  • the time information of the first chip triggering the interrupt sent by one chip, t 1 can be greater than t; optionally, starting from the time t 0 +mt, the second chip can also continue to receive the A chip triggers the first time information of the interrupt, and re-determines multiple time deviation values based on the first time information, and re-determines the time deviation law, m>n, m, n is a positive integer.
  • the period in which the second chip receives the first time information may be greater than the timing duration
  • the first chip sends the first data to the second chip.
  • the second chip receives the first data.
  • the second chip determines a second timestamp of the first data, and the second timestamp is determined based on T 0 and the time offset value T offset .
  • the clock synchronization method provided by the embodiment of the present application will be described in detail below with reference to FIG. 5 .
  • the method is applied to the first slave device.
  • the first chip triggers N interrupts, the N interrupts are scheduled interrupts, and the scheduled duration is t.
  • the second chip triggers N interrupts
  • the N interrupts triggered by the second chip can be understood as interrupt responses to the N interrupts triggered by the first chip.
  • the second chip in response to N interrupts triggered by the first chip, the second chip triggers N interrupts.
  • the second chip obtains the information of T 1 .
  • the first chip may send the NTR value of t 1_2 , and accordingly, the second chip receives the NTR value of t 1_2 .
  • the first chip can send the NTR value of t 1_2 at time t 1.
  • Time t 1 is a time between t 1_1 and t 1_2 , that is, the time between t 1 and t 1_1 is less than the time
  • the interval t for example, the time between t 1 and t 1_1 can be 50ms.
  • t 1_2 t 1_1 +t.
  • the first chip can send the NTR value of t 1_2 at time t 1 , which can reduce the calculation error caused by the second chip not receiving the NTR value of t 1_2 in time.
  • the second chip receives the NTR value of t 1_2 at time t 2 .
  • the second chip determines the NTR value of t 1_2 .
  • the second chip receives the NTR value of t 1_1 sent by the first chip at time t 3 at time t 3 , and time t 4 is a time between t 1_1 and t 1_2 .
  • the second chip determines the timing duration t based on t 2_1 and t 2_2 ; the second chip determines the NTR value of t 1_2 based on the determined timing duration t and the NTR value of t 1_1 .
  • t 1_2 t 1_1 +t.
  • the time interval between t 3 and t 2_1 is less than t.
  • the second chip determines the time offset T offset based on the information of T 1 and the information of T 2 .
  • T 2 includes N times when the second chip triggers N interrupts.
  • the second chip can read the local clock and obtain the information of T2 every time the interrupt is triggered. For example, the second chip can read the NTR value at time t 2_2 that triggers the second interrupt.
  • t offset_1 t 2_2 -(t 1_1 +t)+t delay (1)
  • t delay is the time delay between the second chip responding to the interrupt signal triggered by the first chip and the first chip triggering the interrupt.
  • t delay is usually at the nanometer level. Therefore, t delay is negligible relative to t offset_1 .
  • t offset_1 t 2_2 -(t 1_1 +t) (2)
  • t offset_1 can be understood as the local time t 2_2 when the second chip triggers the second second interrupt and the local time t 1_2 of the first chip when the first chip triggers the second first interrupt.
  • the deviation between them or in other words, the time deviation of the second chip relative to t 1_2 of the first chip, using the clock system of the first chip as a reference.
  • t offset_1 can be positive, negative, or 0, that is, taking the clock system of the first chip as a reference, the time of the second chip is ahead, behind, or equal to that of the first chip.
  • the second chip determines the time deviation rule according to the T offset .
  • the time deviation rule can be referred to the description in S304 and will not be described again.
  • the second chip can calibrate the clock system of the second chip according to the time deviation law and the clock system of the first chip as a reference. local time to achieve clock synchronization between the second chip and the first chip.
  • the second chip may receive the first data from the master device through the first chip, and the first data carries the first timestamp.
  • the second chip can determine the second timestamp of the first data according to the time deviation value or time deviation law.
  • the first time stamp of the first data is T 0
  • the time offset value determined by the second chip is T offset
  • the second time stamp is T 1
  • T 1 T 0 +T offset .
  • the above is a clock synchronization method between the first chip and the second chip in the first slave device. It can be understood that the first chip and the second chip can be implemented between the first chip and the second chip of multiple slave devices based on the above method. Chip time synchronization. Therefore, when multiple slave devices receive the first data from the master device, the multiple slave devices can realize synchronous output of the first data based on the above method.
  • Figure 7 shows a schematic block diagram of a device 700 provided by an embodiment of the present application.
  • the device 700 may be provided in the above-mentioned first slave device, and the device 700 may be the first chip in the first slave device.
  • the device 700 includes: a processing unit 710 for performing a first clock synchronization process, triggering an interrupt, and Extract the local clock; the transceiver unit 720 is used to send an interrupt signal and information, for example, the extracted local clock information.
  • Figure 8 shows a schematic block diagram of a device 800 provided by an embodiment of the present application.
  • the device 800 may be provided in the above-mentioned first slave device.
  • the device 800 may be a second chip in the first slave device.
  • the device 800 includes: a processing unit 810 that performs second clock synchronization processing, triggers interrupts and extracts local Clock; transceiver unit 820, used to receive interrupt signals and information.
  • the chip shown in Figure 9 includes a processor 901 and an interface 902.
  • the number of processors 901 may be one or more, and the number of interfaces 902 may be multiple.
  • Interface 902 is used for signal reception and transmission.
  • the chip may include memory 903.
  • the memory 903 is used to store necessary program instructions and data for the chip.
  • the chip provided by the embodiment of the present application can be used to support the electronic device to implement the functions involved in the first chip and/or the second chip in the above method embodiment, for example, determining or processing the data and information involved in the above method. At least one.
  • the embodiment of the present application provides a system, including a master device and multiple slave devices, and the system is used to implement the technical solutions in the above embodiments.
  • the implementation principles and technical effects are similar to the above-mentioned method-related embodiments, and will not be described again here.
  • Embodiments of the present application provide a readable storage medium that contains instructions that, when the instructions are run on the first chip of the first slave device, cause the first chip of the first slave device to execute Technical solution of the above embodiment.
  • the implementation principles and technical effects are similar and will not be described again here.
  • Embodiments of the present application provide a readable storage medium that contains instructions that, when the instructions are run on a second chip of a first slave device, cause the second chip of the first slave device to execute Technical solution of the above embodiment.
  • the implementation principles and technical effects are similar and will not be described again here.
  • Embodiments of the present application provide a chip.
  • the chip is used to execute instructions.
  • the technical solutions in the above embodiments are executed.
  • the implementation principles and technical effects are similar and will not be described again here.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solutions of the embodiments of the present application are essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Systems (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

Les modes de réalisation de la présente demande concernent un procédé de synchronisation d'horloge et un dispositif électronique. Le procédé comprend les étapes suivantes : une première puce dans un premier dispositif esclave déclenche une première interruption de façon à envoyer un premier signal à une seconde puce dans le premier dispositif esclave ; selon le premier signal, la seconde puce déclenche une seconde interruption ; la seconde puce acquiert un premier moment de déclenchement de la première interruption ; et, en fonction du premier moment et d'un second moment de déclenchement de la seconde interruption, la seconde puce effectue un traitement de synchronisation d'horloge. Lorsqu'une synchronisation d'horloge est effectuée entre des premières puces dans une pluralité de premiers dispositifs esclaves et une horloge de dispositif maître, un traitement de synchronisation d'horloge est effectué au moyen de secondes puces de la pluralité de premiers dispositifs esclaves, de telle sorte que des données de la pluralité de premiers dispositifs esclaves peuvent être délivrées en sortie de manière synchrone.
PCT/CN2023/104379 2022-07-06 2023-06-30 Procédé de synchronisation d'horloge et dispositif électronique WO2024007974A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210798871.7 2022-07-06
CN202210798871.7A CN117411580A (zh) 2022-07-06 2022-07-06 一种时钟同步的方法和电子设备

Publications (1)

Publication Number Publication Date
WO2024007974A1 true WO2024007974A1 (fr) 2024-01-11

Family

ID=89454364

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/104379 WO2024007974A1 (fr) 2022-07-06 2023-06-30 Procédé de synchronisation d'horloge et dispositif électronique

Country Status (2)

Country Link
CN (1) CN117411580A (fr)
WO (1) WO2024007974A1 (fr)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150092642A1 (en) * 2013-09-27 2015-04-02 Apple Inc. Device synchronization over bluetooth
CN104731736A (zh) * 2015-03-27 2015-06-24 深圳怡化电脑股份有限公司 一种时间同步装置、方法及系统
CN108462991A (zh) * 2017-02-22 2018-08-28 北京小鸟听听科技有限公司 处理器时钟同步方法、设备及系统
CN108829627A (zh) * 2018-05-30 2018-11-16 青岛小鸟看看科技有限公司 虚拟现实设备间的同步控制方法及系统
CN111679714A (zh) * 2019-12-31 2020-09-18 泰斗微电子科技有限公司 跨芯片信号同步的方法、装置及芯片
WO2022077228A1 (fr) * 2020-10-13 2022-04-21 深圳市大疆创新科技有限公司 Procédé, dispositif et système d'alignement temporel, et ensemble d'imagerie

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150092642A1 (en) * 2013-09-27 2015-04-02 Apple Inc. Device synchronization over bluetooth
CN104731736A (zh) * 2015-03-27 2015-06-24 深圳怡化电脑股份有限公司 一种时间同步装置、方法及系统
CN108462991A (zh) * 2017-02-22 2018-08-28 北京小鸟听听科技有限公司 处理器时钟同步方法、设备及系统
CN108829627A (zh) * 2018-05-30 2018-11-16 青岛小鸟看看科技有限公司 虚拟现实设备间的同步控制方法及系统
CN111679714A (zh) * 2019-12-31 2020-09-18 泰斗微电子科技有限公司 跨芯片信号同步的方法、装置及芯片
WO2022077228A1 (fr) * 2020-10-13 2022-04-21 深圳市大疆创新科技有限公司 Procédé, dispositif et système d'alignement temporel, et ensemble d'imagerie

Also Published As

Publication number Publication date
CN117411580A (zh) 2024-01-16

Similar Documents

Publication Publication Date Title
US11375312B2 (en) Method, device, loudspeaker equipment and wireless headset for playing audio synchronously
CN110832579A (zh) 最后一英里均衡
CN110636600B (zh) 一种无线设备音频同步播放的方法
US10546581B1 (en) Synchronization of inbound and outbound audio in a heterogeneous echo cancellation system
CN104320699A (zh) 蓝牙发声装置的动态调整方法
CN114258003A (zh) 音频播放控制方法、系统、设备及存储介质
GB2533831A (en) Synchronised control
WO2012068814A1 (fr) Procédé de traitement audio et terminal de communication mobile numérique bimode
WO2024007974A1 (fr) Procédé de synchronisation d'horloge et dispositif électronique
CN203243508U (zh) 一种无线啸叫抑制装置
TWI813347B (zh) 支援低功耗藍牙音訊廣播運作並可避免使用者錯過外界的警報信號或特定聲響的藍牙音訊廣播系統
CN108989918B (zh) 一种音频处理装置和一种音频播放系统
CN102881302A (zh) 通信方法和通信系统
JP2004221951A (ja) 伝送データのジッター補正方法
US20210125594A1 (en) Wireless midi headset
US11374729B2 (en) Audio synchronization processing circuit and method thereof
CN213754842U (zh) 一种基于5g信号传输的音频系统
CN115776628B (zh) 用于tws蓝牙耳机双耳录音精确同步的方法
JP2002157867A (ja) オーディオシステム及びオーディオ装置の制御方法
US20230102871A1 (en) Bluetooth voice communication system and related computer program product for generating stereo voice effect
CN208227287U (zh) 智能音频处理设备
EP4369747A1 (fr) Dispositif électronique et procédé de transmission de données dans le dispositif électronique
US20230353920A1 (en) Wireless headset and audio device
WO2022087621A1 (fr) Interface de bus série universel virtuel
JP2006246348A (ja) 無線通信システム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23834741

Country of ref document: EP

Kind code of ref document: A1