WO2024007974A1 - Clock synchronization method and electronic device - Google Patents
Clock synchronization method and electronic device Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 230000001960 triggered effect Effects 0.000 claims description 123
- 238000004891 communication Methods 0.000 description 31
- 230000006854 communication Effects 0.000 description 31
- 230000008569 process Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 9
- 238000010295 mobile communication Methods 0.000 description 7
- 230000005236 sound signal Effects 0.000 description 6
- 230000001360 synchronised effect Effects 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising 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
Provided in the embodiments of the present application are a clock synchronization method and an electronic device. The method comprises: a first chip in a first slave device triggers a first interruption so as to send a first signal to a second chip in the first slave device; according to the first signal, the second chip triggers a second interruption; the second chip acquires a first moment of triggering the first interruption; and, according to the first moment and a second moment of triggering the second interruption, the second chip performs clock synchronization processing. When clock synchronization is performed between first chips in a plurality of first slave devices and a master device clock, clock synchronization processing is performed by means of second chips of the plurality of first slave devices, so that data of the plurality of first slave devices can be synchronously output.
Description
本申请要求于2022年7月6日提交中国专利局、申请号为202210798871.7、申请名称为“一种时钟同步的方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the China Patent Office on July 6, 2022, with the application number 202210798871.7 and the application title "A clock synchronization method and electronic device", the entire content of which is incorporated herein by reference. Applying.
本申请涉及终端领域,并且更具体地,涉及一种时钟同步的方法和电子设备。The present application relates to the field of terminals, and more specifically, to a clock synchronization method and electronic equipment.
在数据共享的场景中,存在多个设备同时显示同一数据的情况,例如,全屋或多房间音乐播放的场景,多个设备同时播放同一首歌时,如果每个设备的声音不能同步,就会出现多重奏。In data sharing scenarios, there are situations where multiple devices display the same data at the same time. For example, in a whole-house or multi-room music playback scenario, when multiple devices play the same song at the same time, if the sound of each device cannot be synchronized, There will be polyphonies.
目前,大部分的设备的数字信号的处理已经被整合到中央处理芯片中,而模拟阶段的声音处理(将数字音效数据转换为可输出的模拟信号)则大多由编解码(coder/decoder,codec)芯片负责。如果要实现多个设备输出信号的同步,则需要实现多个设备的codec芯片之间的时钟同步。At present, the digital signal processing of most devices has been integrated into the central processing chip, while the sound processing in the analog stage (converting digital sound effect data into output analog signals) is mostly performed by codecs (coder/decoder, codec). ) chip is responsible. If you want to synchronize the output signals of multiple devices, you need to achieve clock synchronization between the codec chips of multiple devices.
发明内容Contents of the invention
本申请提供一种时钟同步的方法和电子设备,可以使得从设备的第一芯片和第二芯片之间实现时钟同步,从而可以实现多个从设备的输出信号的同步。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.
第一方面,提供了一种系统,该系统包括主设备和多个从设备,该多个从设备中的每个从设备包括第一芯片和第二芯片,该第一芯片通过第一方式与该主设备通信,该第一方式包括近距离有线连接或近距离无线连接,其中,第一从设备中的第一芯片,用于基于该第一方式与该主设备进行第一时钟同步处理,该第一从设备是该多个从设备中的任意一个从设备;该第一芯片,用于触发第一中断,以向该第一从设备中的第二芯片发送第一信号;该第二芯片,用于根据该第一信号,触发第二中断;该第二芯片,还用于获取触发该第一中断的第一时刻;该第二芯片,还用于根据该第一时刻和触发该第二中断的第二时刻,进行第二时钟同步处理。In a first aspect, a system is provided. The 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 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. At the second moment of the second interrupt, the second clock synchronization process is performed.
本申请实施例中,第一从设备中的第一芯片通过第一时钟同步处理与主设备的时钟同步,该第一从设备是该多个从设备中的任意一个从设备;该第一从设备中的第二芯片根据接收第一芯片的中断信号的时刻以及该第一芯片触发该中断的时刻,进行第二时钟同步处理,实现与该第一芯片的时钟同步。通过多个第一从设备的该第二芯片进行该第二时钟同步处理,可以使得该多个从设备的数据的同步输出。In the embodiment of the present application, 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. By performing the second clock synchronization process on the second chip of the plurality of first slave devices, the data of the plurality of slave devices can be output synchronously.
结合第一方面,在第一方面的某些实现方式中,该第二芯片,还用于获取触发该第一中断的第一时刻,包括:在第三时刻接收来自该第一芯片的该第一信息,该第一信息用于指示该第一时刻,该第三时刻早于该第二时刻。In connection with the first aspect, in some implementations of the first aspect, 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.
结合第一方面,在第一方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第一信息是根据该第一芯片触发第一次中断的第四时刻和第一时长确定的,该第一时长为该第一芯片触发相邻两次中断之间的时长,N≥2,N为整数,或者,该第一信息是根据该第一从设备的第一芯片触发第N1次中断的第五时刻和该第一时长确定的,N1=N-1,N≥3,N为整数。In conjunction with the first aspect, in some implementations of the first aspect, the first interrupt is the Nth interrupt triggered by the first chip, and 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 fifth moment when the first chip triggers the N 1th interrupt and the first duration are determined, N 1 =N-1, N≥3, and N is an integer.
结合第一方面,在第一方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第一芯片还用于:触发第N1次中断,以向该第二芯片发送第二信号,N1=N-1,N≥2,N为整数;该第二芯片,还用于根据该第二信号,触发第三中断;该第二芯片,还用于接收来自第一芯片的第二信息,该第二信息用于指示触发该第N1次中断的第六时刻;该第二芯片,还用于根据触发该第三中断的第七时刻以及该第二时刻确定第一时长,该第一时长为该第一芯片触发相邻两次中断之间的时长;该第二芯片,还用于获取触发该第一中断的第一时刻,包括:该第二芯片根据该第六时刻和该第一时长确定该第一时刻。
In conjunction with the first aspect, in some implementations of the first aspect, 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 second chip sends a second signal, N 1 =N-1, N≥2, N is an integer; the second chip is also used to trigger a third interrupt according to the second signal; the second chip is also used to Receive second information from the first chip, the second information is used to indicate the sixth time when the N1th interrupt is triggered; the second chip is also used to indicate the seventh time when the third interrupt is triggered and the third time. 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.
结合第一方面,在第一方面的某些实现方式中,该第二芯片,还用于根据该第一时刻和触发该第二中断的第二时刻,进行第二时钟同步处理,包括:根据该第一时刻和该第二时刻确定第一时间偏差值;根据该第一时间偏差值调整本地时钟。In conjunction with the first aspect, in some implementations of the first aspect, 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.
结合第一方面,在第一方面的某些实现方式中,该第一中断为该第一芯片触发的M次中断中的一次中断,该第二芯片还用于:获取该第一芯片触发该M次中断对应的M个时刻;根据该M个时刻和该第二芯片触发M次中断对应的M个时刻确定M个时间偏差值,该M个时间偏差值中的第i个时间偏差值是根据该第一芯片触发第i次中断的时刻和该第二芯片触发第i次中断的时刻确定的;其中,该第二芯片触发的第i次中断是根据该第一芯片触发的第i次中断触发的,M≥2,M为整数,i=1,2,…,M。In connection with the first aspect, in some implementations of the first aspect, the first interrupt is one of M interrupts triggered by the first chip, and the second chip is also used to: obtain the trigger triggered by the first chip. M moments corresponding to M interrupts; 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. Interrupt triggered, M≥2, M is an integer, i=1, 2,...,M.
结合第一方面,在第一方面的某些实现方式中,该第二芯片,还用于根据该第一时刻和触发该第二中断的第二时刻,进行第二时钟同步处理,包括:根据该M个时间偏差值的平均值以第一时长为周期调整本地时钟;或者,根据该M个时间偏差值的平均值以第二时长为周期调整本地时钟,该第二时长大于第一时长;其中,该第一时长为所述第一芯片触发相邻两次中断之间的时长。In conjunction with the first aspect, in some implementations of the first aspect, 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.
第二方面,提供一种时钟同步的方法,该方法应用于第一系统,该第一系统包括主设备和多个从设备,该多个从设备中的每个从设备包括第一芯片和第二芯片,该第一芯片通过第一方式与该主设备通信,该第一方式包括近距离有线连接或近距离无线连接,该方法包括:第一从设备中的第一芯片,基于该第一方式与该主设备进行第一时钟同步处理,该第一从设备是该多个从设备中的任意一个从设备;该第一芯片触发第一中断,以向该第一从设备中的第二芯片发送第一信号;该第二芯片根据该第一信号,触发第二中断;该第二芯片获取触发该第一中断的第一时刻;该第二芯片根据该第一时刻和触发该第二中断的第二时刻,进行第二时钟同步处理。In a second aspect, 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.
本申请实施例中,第一从设备中的第一芯片通过第一时钟同步处理与主设备的时钟同步,该第一从设备是该多个从设备中的任意一个从设备;该第一从设备中的第二芯片根据接收第一芯片的中断信号的时刻以及该第一芯片触发该中断的时刻,进行第二时钟同步处理,实现与该第一芯片的时钟同步。通过多个第一从设备的该第二芯片进行该第二时钟同步处理,可以使得该多个从设备的数据同步输出。In the embodiment of the present application, 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. By performing the second clock synchronization process on the second chip of the plurality of first slave devices, the data of the plurality of slave devices can be output synchronously.
结合第二方面,在第二方面的某些实现方式中,该第二芯片接收来自该第一芯片的第一信息,该第一信息用于指示该第一时刻。In conjunction with the second aspect, in some implementations of the second aspect, the second chip receives first information from the first chip, and the first information is used to indicate the first moment.
结合第二方面,在第二方面的某些实现方式中,该第二芯片在第三时刻接收来自该第一芯片的该第一信息,该第三时刻早于该第二时刻。Combined with the second aspect, in some implementations of the second aspect, 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.
结合第二方面,在第二方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第一信息是根据该第一芯片触发第一次中断的第四时刻和第一时长确定的,该第一时长为该第一芯片触发相邻两次中断之间的时长,N≥2,N为整数,或者,该第一信息是根据该第一芯片触发第N1次中断的第五时刻和该第一时长确定的,N1=N-1,N≥3,N为整数。Combined with the second aspect, in some implementations of the second aspect, the first interrupt is the Nth interrupt triggered by the first chip, and the first information is the fourth interrupt triggered by the first chip. moment and the first duration, 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 fifth moment of N 1 interruptions and the first duration are determined, N 1 =N-1, N≥3, and N is an integer.
结合第二方面,在第二方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第一芯片触发第N1次中断,以向该第二芯片发送第二信号,N1=N-1,N≥2,N为整数;该第二芯片根据该第二信号,触发第三中断;该第二芯片接收来自该第一芯片的第二信息,该第二信息用于指示触发该第N1次中断的第六时刻;该第二芯片根据触发该第三中断的第七时刻以及该第二时刻确定第一时长,该第一时长为该第一从设备的第一芯片触发相邻两次中断之间的时长;该第二芯片根据该第六时刻和该第一时长确定该第一时刻。Combined with the second aspect, in some implementations of the second aspect, 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.
结合第二方面,在第二方面的某些实现方式中,该第二芯片根据该第一时刻和该第二时刻确定第一时间偏差值;该第二芯片根据该第一时间偏差值调整本地时钟。Combined with the second aspect, in some implementations of the second aspect, 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.
结合第二方面,在第二方面的某些实现方式中,该第一中断为该第一芯片触发的M1次中断中的一次中断,该第二芯片获取该第一芯片触发该M次中断对应的M个时刻;该第二芯片根据该M个时刻和该第二芯片触发M次中断对应的M个时刻确定M个时间偏差值,该M个时间偏差值中的第i个时间偏差值是根据该第一芯片触发第i次中断的时刻和该第二芯片触发第i次中断的时刻确定的;其中,该第二芯片触发的第i次中断是根据该第一芯片触发的第i次中断触发的,M≥2,M为整数,i=1,2,…,M。Combined with the second aspect, in some implementations of the second aspect, the first interrupt is one of M 1 interrupts triggered by the first chip, and the second chip obtains the M interrupts triggered by the first chip. Corresponding M times; 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. Triggered by interrupts, M≥2, M is an integer, i=1, 2,...,M.
结合第二方面,在第二方面的某些实现方式中,该第二芯片根据该M个时间偏差值的平均值以第
一时长为周期调整本地时钟;或者,该第二芯片根据该M个时间偏差值的平均值以第二时长为周期调整本地时钟,该第二时长大于第一时长;其中,该第一时长为该第一芯片触发相邻两次中断之间的时长。Combined with the second aspect, in some implementations of the second aspect, 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.
第三方面,提供一种时钟同步的方法,其特征在于,该方法应用于电子设备,该电子设备包括第一芯片和第二芯片,该第一芯片触发第一中断,以向该第二芯片发送第一信号;该第二芯片根据该第一信号,触发第二中断;该第二芯片获取触发该第一中断的第一时刻;该第二芯片根据该第一时刻和触发该第二中断的第二时刻,进行时钟同步处理。In a third aspect, 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.
结合第三方面,在第三方面的某些实现方式中,该第二芯片在第三时刻接收来自该第一芯片的该第一信息,该第一信息用于指示该第一时刻,该第三时刻早于该第二时刻。Combined with the third aspect, in some implementations of the third aspect, 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.
结合第三方面,在第三方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第一信息是根据该第一芯片触发第一次中断的第四时刻和第一时长确定的,该第一时长为该第一芯片触发相邻两次中断之间的时长,N≥2,N为整数,或者,该第一信息是根据该第一芯片触发第N1次中断的第五时刻和该第一时长确定的,N1=N-1,N≥3,N为整数。Combined with the third aspect, in some implementations of the third aspect, the first interrupt is the Nth interrupt triggered by the first chip, and the first information is the fourth interrupt triggered by the first chip. moment and the first duration, 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 fifth moment of N 1 interruptions and the first duration are determined, N 1 =N-1, N≥3, and N is an integer.
结合第三方面,在第三方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第一芯片触发第N1次中断,以向该第二芯片发送第二信号,N1=N-1,N≥2,N为整数;该第二芯片根据该第二信号,触发第三中断;该第二芯片接收来自该第一芯片的第二信息,该第二信息用于指示触发该第N1次中断的第六时刻;该第二芯片根据触发该第三中断的第七时刻以及该第二时刻确定第一时长,该第一时长为该第一芯片触发相邻两次中断之间的时长;该第二芯片获取触发该第一中断的第一时刻,该第二芯片根据该第六时刻和该第一时长确定该第一时刻。Combined with the third aspect, in some implementations of the third aspect, 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.
结合第三方面,在第三方面的某些实现方式中,该第二芯片根据该第一时刻和该第二时刻确定第一时间偏差值;该第二芯片根据该第一时间偏差值调整本地时钟。Combined with the third aspect, in some implementations of the third aspect, 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.
结合第三方面,在第三方面的某些实现方式中,该第一中断为该第一芯片触发的M1次中断中的一次中断,该第二芯片获取该第一芯片触发该M次中断对应的M个时刻;该第二芯片根据该M个时刻和该第二芯片触发M次中断对应的M个时刻确定M个时间偏差值,该M个时间偏差值中的第i个时间偏差值是根据该第一芯片触发第i次中断的时刻和该第二芯片触发第i次中断的时刻确定的;其中,该第二芯片触发的第i次中断是根据该第一芯片触发的第i次中断触发的,M≥2,M为整数,i=1,2,…,M。Combined with the third aspect, in some implementations of the third aspect, the first interrupt is one of the M 1 interrupts triggered by the first chip, and the second chip obtains the M interrupts triggered by the first chip. Corresponding M times; 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. Triggered by interrupts, M≥2, M is an integer, i=1, 2,...,M.
结合第三方面,在第三方面的某些实现方式中,该第二芯片根据该M个时间偏差值的平均值以第一时长为周期调整本地时钟;或者,该第二芯片根据该M个时间偏差值的平均值以第二时长为周期调整本地时钟,该第二时长大于第一时长;其中,该第一时长为该第一芯片触发相邻两次中断之间的时长。Combined with the third aspect, in some implementations of the third aspect, 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.
结合第四方面,在第四方面的某些实现方式中,该第二芯片,还用于获取触发该第一中断的第一时刻,包括:用于在第三时刻接收来自该第一芯片的该第一信息,该第一信息用于指示该第一时刻,该第三时刻早于该第二时刻。Combined with the fourth aspect, in some implementations of the fourth aspect, 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.
结合第四方面,在第四方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第一信息是根据该第一芯片触发第一次中断的第四时刻和第一时长确定的,该第一时长为该第一芯片触发相邻两次中断之间的时长,N≥2,N为整数,或者,该第一信息是根据该第一芯片触发第N1次中断的第五时刻和该第一时长确定的,N1=N-1,N≥3,N为整数。In connection with the fourth aspect, in some implementations of the fourth aspect, the first interrupt is the Nth interrupt triggered by the first chip, and the first information is the fourth interrupt triggered by the first chip. moment and the first duration, 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 fifth moment of N 1 interruptions and the first duration are determined, N 1 =N-1, N≥3, and N is an integer.
结合第四方面,在第四方面的某些实现方式中,该第一芯片还用于触发第N1次中断,以向该第二芯片发送第二信号,N1=N-1,N≥2,N为整数;该第二芯片,还用于根据该第二信号,触发第三中断;该第二芯片,还用于接收来自该第一芯片的第二信息,该第二信息用于指示触发该第N1次中断的第六时刻;该第二芯片,还用于根据触发该第三中断的第七时刻以及该第二时刻确定第一时长,该第一时长为该第一芯片触发相邻两次中断之间的时长;该第二芯片,还用于获取触发该第一中断的第一时刻,
包括:根据该第六时刻和该第一时长确定该第一时刻。Combined with the fourth aspect, in some implementations of the fourth aspect, the first chip is also used to trigger the N 1th interrupt to send a second signal to the second chip, N 1 =N-1, N≥ 2, N is an integer; the second chip is also used to trigger a third interrupt according to the second signal; the second chip is also used to receive second information from the first chip, and the second information is used to Indicates the sixth moment when the N1th interrupt is triggered; the second chip is also used to determine a first duration based on the seventh moment when the third interrupt is triggered and the second moment, and the first duration is for the first chip The duration between triggering two adjacent interrupts; the second chip is also used to obtain the first moment when the first interrupt is triggered, Including: determining the first moment based on the sixth moment and the first duration.
结合第四方面,在第四方面的某些实现方式中,该第二芯片,还用于根据该第一时刻和触发该第二中断的第二时刻,进行时钟同步处理,包括:根据该第一时刻和该第二时刻确定第一时间偏差值;根据该第一时间偏差值调整本地时钟。In connection with the fourth aspect, in some implementations of the fourth aspect, 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.
结合第四方面,在第四方面的某些实现方式中,该第一中断为该第一芯片触发的M1次中断中的一次中断,该第二芯片还用于:获取该第一芯片触发该M次中断对应的M个时刻;根据该M个时刻和该第二芯片触发M次中断对应的M个时刻确定M个时间偏差值,该M个时间偏差值中的第i个时间偏差值是根据该第一芯片触发第i次中断的时刻和该第二芯片触发第i次中断的时刻确定的;其中,该第二芯片触发的第i次中断是根据该第一芯片触发的第i次中断触发的,M≥2,M为整数,i=1,2,…,M。Combined with the fourth aspect, in some implementations of the fourth aspect, the first interrupt is one of M 1 interrupts triggered by the first chip, and 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. Triggered by interrupts, M≥2, M is an integer, i=1, 2,...,M.
结合第四方面,在第四方面的某些实现方式中,该第二芯片,还用于根据该第一时刻和触发该第二中断的第二时刻,进行时钟同步处理,包括:根据该M个时间偏差值的平均值以第一时长为周期调整本地时钟;或者,根据该M个时间偏差值的平均值以第二时长为周期调整本地时钟,该第二时长大于第一时长;其中,该第一时长为该第一芯片触发相邻两次中断之间的时长。In connection with the fourth aspect, in some implementations of the fourth aspect, 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.
第五方面,提供一种时钟同步的方法,该方法应用于第二芯片,该第二芯片和第一芯片有线连接,该方法包括:该第二芯片根据第一信号触发第二中断,该第一信号是该第一芯片触发第一中断产生的信号;该第二芯片获取触发该第一中断的第一时刻;该第二芯片根据该第一时刻和触发该第二中断的第二时刻,进行时钟同步处理。In a fifth aspect, 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.
结合第五方面,在第五方面的某些实现方式中,该第二芯片在第三时刻接收来自该第一芯片的第一信息,该第一信息用于指示该第一时刻,该第三时刻早于该第二时刻。In conjunction with the fifth aspect, in some implementations of the fifth aspect, 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.
结合第五方面,在第五方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第一信息是根据该第一芯片触发第一次中断的第四时刻和第一时长确定的,该第一时长为该第一芯片触发相邻两次中断之间的时长,N≥2,N为整数,或者,该第一信息是根据该第一芯片触发第N1次中断的第五时刻和该第一时长确定的,N1=N-1,N≥3,N为整数。In conjunction with the fifth aspect, in some implementations of the fifth aspect, the first interrupt is the Nth interrupt triggered by the first chip, and the first information is the fourth interrupt triggered by the first chip. moment and the first duration, 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 fifth moment of N 1 interruptions and the first duration are determined, N 1 =N-1, N≥3, and N is an integer.
结合第五方面,在第五方面的某些实现方式中,该第一中断为该第一芯片触发的第N次中断,该第二芯片接收第二信号,该第二信号为该第一芯片触发第N1次中断产生的信号,N1=N-1,N≥2,N为整数;该第二芯片根据该第二信号,触发第三中断;该第二芯片接收来自该第一芯片的第二信息,该第二信息用于指示触发该第N1次中断的第六时刻;该第二芯片根据触发该第三中断的第七时刻以及该第二时刻确定第一时长,该第一时长为该第一芯片触发相邻两次中断之间的时长;该第二芯片根据该第六时刻和该第一时长确定该第一时刻。Combined with the fifth aspect, in some implementations of the fifth aspect, the first interrupt is triggered by the first chip for the Nth time, the second chip receives a second signal, and 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.
结合第五方面,在第五方面的某些实现方式中,该第二芯片根据该第一时刻和该第二时刻确定第一时间偏差值;该第二芯片根据该第一时间偏差值调整本地时钟。In connection with the fifth aspect, in some implementations of the fifth aspect, 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.
结合第五方面,在第五方面的某些实现方式中,该第一中断为该第一芯片触发的M1次中断中的一次中断,该第二芯片获取该第一芯片触发该M次中断对应的M个时刻;该第二芯片根据该M个时刻和该第二芯片触发M次中断对应的M个时刻确定M个时间偏差值,该M个时间偏差值中的第i个时间偏差值是根据该第一芯片触发第i次中断的时刻和该第二芯片触发第i次中断的时刻确定的;其中,该第二芯片触发的第i次中断是根据该第一芯片触发的第i次中断触发的,M≥2,M为整数,i=1,2,…,M。Combined with the fifth aspect, in some implementations of the fifth aspect, the first interrupt is one of M 1 interrupts triggered by the first chip, and the second chip obtains the M interrupts triggered by the first chip. Corresponding M times; 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. Triggered by interrupts, M≥2, M is an integer, i=1, 2,...,M.
结合第五方面,在第五方面的某些实现方式中,该第二芯片根据该M个时间偏差值的平均值以第一时长为周期调整本地时钟;或者,该第二芯片根据该M个时间偏差值的平均值以第二时长为周期调整本地时钟,该第二时长大于第一时长;其中,该第一时长为该第一芯片触发相邻两次中断之间的时长。Combined with the fifth aspect, in some implementations of the fifth aspect, 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.
第六方面,提供了一种芯片,包括:一个或多个处理器;存储器;以及一个或多个计算机程序。其中,一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被芯片执行时,使得芯片执行上述第五方面中任一项可能的实现中的方法。In a sixth aspect, a chip is provided, 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.
第八方面,提供了一种芯片用于执行指令,当所述芯片运行时,所述芯片执行上述第五方面所述的方法。In an eighth aspect, a chip is provided for executing instructions. When the chip is running, the chip executes the method described in the fifth aspect.
图1是本申请实施例提供的一种应用场景的示意图。Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
图2是一种时钟同步系统的示意图。Figure 2 is a schematic diagram of a clock synchronization system.
图3是本申请实施例提供的一种时钟同步的方法的示意性流程图。FIG. 3 is a schematic flow chart of a clock synchronization method provided by an embodiment of the present application.
图4本申请实施例提供的一种触发中断并发送触发中断的时间信息的示意图。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.
图5本申请实施例提供的一种时钟同步的方法的示意性流程图。Figure 5 is a schematic flow chart of a clock synchronization method provided by an embodiment of the present application.
图6本申请实施例提供的一种时钟同步的方法的示意图。Figure 6 is a schematic diagram of a clock synchronization method provided by an embodiment of the present application.
图7是本申请实施例提供的一种时钟同步的装置的示意性结构图。FIG. 7 is a schematic structural diagram of a clock synchronization device provided by an embodiment of the present application.
图8是本申请实施例提供的一种时钟同步的装置的示意性结构图。FIG. 8 is a schematic structural diagram of a clock synchronization device provided by an embodiment of the present application.
图9是本申请实施例提供的一种芯片的结构示意图。FIG. 9 is a schematic structural diagram of a chip provided by an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
在本申请实施例的描述中,除非另有说明,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the description of the embodiments of the present application, unless otherwise stated, the terms "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.
图1是适用于本申请实施例提供的时钟同步方法的一种场景示意图。Figure 1 is a schematic diagram of a scenario applicable to the clock synchronization method provided by the embodiment of the present application.
图1所示为全屋音乐播放的应用场景,在该场景中,每个房间中放置至少一个从设备,例如,从设备121至从设备126,该从设备可以是音乐播放设备,例如智能音箱。其次,在全屋中放置至少一个主设备,例如,主设备110,该主设备110用于控制音乐播放。当主设备110控制音乐开始播放时,需要从设备121至从设备126同步输出声音,从而实现全屋(例如,包括房间1至房间4)音乐的同步播放。Figure 1 shows an application scenario of whole-house music playback. In this scenario, 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. . Secondly, 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. When the master device 110 controls music to start playing, 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).
示例性地,主设备110可以包括至少一个第一芯片,该第一芯片可以是处理器,该第一芯片可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。Exemplarily, 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. For example, the processor 110 may include an application processor. , AP), modem processor, controller, memory, video codec, digital signal processor (DSP), etc. Among them, different processing units can be independent devices or integrated in one or more processors.
其中,控制器可以是主设备110的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Among them, 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.
第一芯片中还可以设置存储器,用于存储指令和数据。在一些实施例中,第一芯片中的存储器为高速缓冲存储器。该存储器可以保存第一芯片刚用过或循环使用的指令或数据。如果第一芯片需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the first chip for storing instructions and data. In some embodiments, 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.
在一些实施例中,第一芯片可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路间音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,通用输入输出(general-purpose input/output,GPIO)接口等。In some embodiments, 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接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,该第一芯片可以包含多组I2C总线。Among them, the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the first chip may include multiple sets of I2C buses.
I2S接口可以用于音频通信。在一些实施例中,该第一芯片还可以包含多组I2S总线。该第一芯片可以通过I2S总线与音频模块耦合,实现第一芯片与音频模块之间的通信。The I2S interface can be used for audio communication. In some embodiments, 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.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块与无线通信模块可以通过PCM总线接口耦合。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications to sample, quantize and encode analog signals. In some embodiments, 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.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输
的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接第一芯片与无线通信模块。例如:第一芯片通过UART接口与无线通信模块中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块可以通过UART接口向无线通信模块传递音频信号,实现通过蓝牙耳机播放音乐的功能。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. In some embodiments, the UART interface is generally used to connect the first chip and the wireless communication module. For example: the first chip communicates with the Bluetooth module in the wireless communication module through the UART interface to implement the Bluetooth function. In some embodiments, 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.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接第一芯片与显示屏,无线通信模块,音频模块等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, 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.
该主设备110的无线通信功能可以通过天线1,天线2,移动通信模块,无线通信模块,调制解调处理器以及基带处理器等实现。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.
天线1和天线2用于发射和接收电磁波信号。主设备110中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。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.
移动通信模块可以提供应用在主设备110上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块的至少部分功能模块可以被设置于第一芯片中。在一些实施例中,移动通信模块的至少部分功能模块可以与第一芯片的至少部分模块被设置在同一个器件中。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. In some embodiments, at least part of the functional modules of the mobile communication module may be disposed in the first chip. In some embodiments, 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.
该主设备110还可以包括无线通信模块,无线通信模块可以提供应用在该主设备110上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到第一芯片。无线通信模块还可以从第一芯片接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。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.
该从设备(例如,从设备121至从设备126中的任一个)可以包括该第一芯片和第二芯片。该第二芯片可以是音频模块,具体地,该音频模块用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块还可以用于对音频信号编码和解码,该音频模块可以包括用于音频采集和播放的硬件编码译码器(encode and decode,codec)芯片。当要播放音频时,该第一芯片将音频数字信号通过I2S总线送给codec芯片,然后由该第二芯片将数字信号转换成模拟信号(即D/A转换)再播放出来。codec还可以对音频信号做相应的处理,比如音量控制、均衡(equalize,EQ)控制等。The slave device (eg, any one of slave device 121 to slave device 126) may include the first chip and the second chip. The second chip may be an audio module. Specifically, 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. When audio is to be played, 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.
该第二芯片还可以连接各种外设,例如有麦克风(microphone,MIC)、听筒(earpiece)、扬声器(speaker)等。codec与外设之间设置有功率放大器(power amplifier,PA),用于对音频信号进行功率放大,可以放大出音单元的音量。The second chip can also be connected to various peripherals, such as a microphone (MIC), an earpiece (earpiece), a speaker (speaker), etc. There is a power amplifier (PA) between the codec and the peripherals, which is used to amplify the power of the audio signal and amplify the volume of the sound unit.
从设备可以通过音频模块,扬声器,受话器,麦克风,耳机接口,以及应用处理器等实现音频功能。例如音乐播放,录音等。The slave device can implement audio functions through audio modules, speakers, receivers, microphones, headphone interfaces, and application processors. Such as music playback, recording, etc.
从设备的第一芯片可以通过有线或无线通信网络与主设备110的第一芯片进行交互,通信网络的制式或标准不做限定,可以是广域网、局域网、点对点连接等方式,或它们的任意组合。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. .
在一种实现中,如图2中所示,该主设备110和从设备121至126通过电力线通信(power line communication,PLC)网络实现交互。其中,主设备110用于将用户以太网数据进行调制,然后在电力线上进行传输。从设备经过滤波器将调制信号滤出,再经过解调,就可得到原通信信号。主设备的第一芯片之间可以通过千兆以太网(gigabit ethernet,GE)接口进行通信,主设备110的每个第一芯片可以分别连接一个PLC回路,例如,如图2中所示的回路1、回路2以及回路3。该回路1至回路3上可以分别连接从设备,例如,回路1上连接房间3的从设备124;回路2上可以连接房间4的从设备125以及从设备126;回路3上可以连接房间1和房间2的从设备(例如,从设备121至123),从而
通过PLC回路可以实现主从设备的交互。In one implementation, as shown in FIG. 2 , the master device 110 and the slave devices 121 to 126 interact through a power line communication (PLC) network. Among them, 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. 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. For example, 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.
主设备110和多个从设备的第一芯片都有各自的时钟系统。时钟系统按照预先定义的规则进行计时;时间规则可以是按照国际标准定义的时间体系,或者按照本地局域网定义的时间标准。从设备的第一芯片可以通过PLC网络对自身的时钟系统进行校准,即多个设备的第一芯片与主设备110的第一芯片之间可以实现时钟同步。如果要实现最终输出信号的同步,则需要多个从设备的第二芯片之间实现时钟同步。因此,如何以第一芯片的时钟系统作为参考将第二芯片的时钟系统进行校准,成为亟待解决的问题。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.
假设第一芯片的时间信息用T1来表示,第二芯片的时间信息用T2来表示,并假设T2=T1+Toffset,即在同一时刻第一芯片和第二芯片的时钟系统显示的时间信息存在的Toffset时间偏差。则本申请实施例中时钟同步的目的是估计并消除时间偏差Toffset。Assume that the time information of the first chip is represented by T 1 and the time information of the second chip is represented by T 2 , and assume that T 2 =T 1 +T offset , that is, 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 .
图3是本申请实施例提供的一种时钟同步的方法300的示意性流程图。图3所示的方法300例如可以应用于图2所示的系统200中。该方法可以由第一从设备执行,例如,该第一从设备为从设备121至从设备126中的任一个。该第一从设备包括第一芯片和第二芯片。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.
S301,第一芯片基于第一方式与主设备进行第一时钟同步处理。S301. The first chip performs first clock synchronization processing with the master device based on the first method.
其中,第一方式可以是第一芯片与主设备通信的连接方式,例如,第一方式包括近距离无线连接或近距离有线连接。第一时钟同步处理可以是基于时钟同步协议(例如,精确时钟协议(Precision Time Protoco),或者,G.hn标准)的时钟同步处理。The first method may be a connection method for the first chip to communicate with the host device. For example, 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).
可选地,S302,第一芯片接收来自主设备的第一数据,该第一数据携带第一时间时间戳T0。Optionally, S302, the first chip receives the first data from the master device, and the first data carries the first time timestamp T 0 .
其中,该第一数据例如可以是音频数据、图片数据或视频数据。该第一时间戳T0可以由该主设备确定,例如,为该主设备发送该第一数据时该主设备的本地时间。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.
S303,第一芯片触发中断,以向第二芯片发送中断信号。相应地,该第二芯片根据该中断信号,触发中断。S303. The first chip triggers an interrupt to send an interrupt signal to the second chip. Correspondingly, the second chip triggers an interrupt according to the interrupt signal.
具体地,如图4中所示,第一芯片可以以第一时间间隔触发中断,该第一时间间隔的时长为T,即第一芯片触发定时中断,定时时长为该第一时间间隔的时长T。其中,第一芯片触发中断可以理解为该第一芯片接收或产生中断信号(例如,高电平、低电平、上升沿、下降沿或脉冲信号),触发中断,示例性地,该第一芯片触发GPIO中断。第一时间间隔T的取值可以根据实际情况设置,例如T的取值可以为100ms,即每隔100ms,该第一芯片产生一次中断,并向该第二芯片发送一次中断信号。Specifically, as shown in Figure 4, 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. For example, 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.
以该第一芯片触发的一次中断为例,第一芯片可以触发第一中断,以向该第二芯片发送第一信号;该第二芯片根据该第一信号,触发第二中断。Taking an interrupt triggered by the first chip as an example, 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.
S304,该第二芯片获取该第一芯片触发中断的时间信息。S304: The second chip obtains the time information of the interrupt triggered by the first chip.
该第一芯片触发中断的时间信息包括该第一芯片每次触发中断时刻的信息。例如,该第一芯片的时间信息为该第一芯片每次触发中断的时刻对应的时间值,该时间值例如为网络时钟参考(network time reference,NTR)值。该第一芯片触发N次中断的时刻可以表示为T1,T1={t1_1,t1_2…t1_n},其中,t1_n表示第一芯片触发第N次中断的时刻,N为大于等于2的正整数。The time information at which the first chip triggers an interrupt includes information at each time the first chip triggers an interrupt. For example, 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. The time when the first chip triggers the Nth interrupt can be expressed as T 1 , T 1 ={t 1_1 , t 1_2 ...t 1_n }, where t 1_n represents the time when the first chip triggers the Nth interrupt, and N is greater than or equal to 2 is a positive integer.
一个示例中,第一芯片向该第二芯片发送该第一芯片触发中断的时间信息。In one example, the first chip sends time information when the first chip triggers the interrupt to the second chip.
以该第一芯片触发的一次中断为例,第一芯片在第一时刻触发第一中断;该第二芯片在第四时刻触发第二中断,该第二中断是根据该第一中断触发的。该第一芯片向该第二芯片发送第一信息,该第一信息指示该第一时刻,该第一信息可以包括该第一时刻的NTR值。其中,该第一中断可以为该第一芯片触发的第N次中断,N≥2,N为整数。Taking an interrupt triggered by the first chip as an example, 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. Wherein, the first interrupt may be the Nth interrupt triggered by the first chip, N≥2, and N is an integer.
一种可能的实现方式中,该第一芯片在该第一时刻之前发送该第一信息,以保证时钟校准的精度。In a possible implementation, the first chip sends the first information before the first time to ensure the accuracy of clock calibration.
示例性地,该第一芯片在第三时刻向该第二芯片发送该第一信息,该三时刻为该第一时刻和第二时刻之间的一个时刻,或者说,该第一时刻和第三时刻之间的时长小于该第一时间间隔的时长T。该第二时刻为该第一芯片触发第N-1次中断的时刻。For example, 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.
该第一芯片在该第三时刻发送的该第一时刻的NTR值可以由第二时刻以及该第一时间间隔的时长T确定,或者由该第一芯片触发第一个中断的时刻以及该第一时间间隔的时长T确定。也就是说,第一芯片可以在该第一时刻之前,根据已知的时刻的信息确定该第一时刻的信息。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.
例如,该第一芯片可以记录第一次触发中断的时刻的NTR值(记为第一NTR值)。则该第一时
刻的NTR值为该第一NTR值与(N-1)个第一时间间隔的时长T的和;当N大于等于3时,该第一时刻的NTR值还可以为第二NTR值与该第一时间间隔的时长T的和,该第二NTR值为该第一芯片触发第N-1次中断的时刻的NTR值,例如,该第一芯片可以记录第N-1次触发中断的时刻的NTR值。For example, 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. For example, the first chip can record the time at which the N-1th interrupt is triggered. NTR value.
应理解,该第一芯片在该第三时刻发送该第一信息,可以使得该第二芯片在该第四时刻之前接收到该第一时刻的信息。It should be understood that 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.
另一个示例中,由该第二芯片确定该第一芯片触发中断的时间信息。In another example, the second chip determines the time information at which the first chip triggers the interrupt.
具体地,以第一芯片触发的第N-1次中断(第一中断)和第N次中断(第二中断)为例,第一芯片在第一时刻触发该第一中断,在第二时刻触发该第二中断;响应于该第一中断和该第二中断,该第二芯片分别在第三时刻、第四时刻触发第三中断和第四中断。该第二芯片在第五时刻接收该第一芯片发送的第二信息,该第二信息指示该一时刻,该第五时刻为该第三时刻和该第四时刻之间的一个时刻;该第二芯片根据该三时刻和该第四时刻确定第一时间间隔的时长T,该第二芯片根据第二信息和该第一时间间隔的时长T确定该第二时刻的时间信息,N≥2,N为整数。Specifically, taking the N-1th interrupt (first interrupt) and the Nth interrupt (second interrupt) triggered by the first chip as an example, 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.
S305,该第二芯片根据该第一芯片触发中断的时间信息,以及该第二芯片触发中断的时间信息进行第二时钟同步处理。S305: 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.
具体地,该第二芯片根据该第一芯片触发中断的时间信息,以及该第二芯片触发中断的时间信息的确定时间偏差Toffset,并消除Toffset。Specifically, 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 .
其中,该第二芯片触发中断的时间信息包括该第二芯片每次触发中断的时刻的信息。可以理解,该第二芯片根据第一芯片触发的中断触发中断。该第一芯片触发N次中断,相应地,该第二芯片触发N次中断,该第二芯片触发中断的时刻可以表示为T2,T1={t2_1,t2_2…t2_n},其中,t2_n表示该第二芯片触发第N次中断的时刻,N≥2,N为整数。T2和T1一一对应。Wherein, 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. Correspondingly, the second chip triggers N interrupts. The time when the second chip triggers the interrupt can be expressed as T 2 , T 1 ={t 2_1 , t 2_2 ...t 2_n }, where , t 2_n represents the time when the second chip triggers the Nth interrupt, N≥2, N is an integer. T 2 and T 1 correspond one to one.
该第一芯片和该第二芯片的时间偏差Toffset可以由该第二芯片第N次触发中断的时刻t2_n与该第一芯片第N次触发中断的时刻t1_n之间的时间偏差toffset_n组成。Toffset={toffset_1,toffset_2,…,toffset_n},toffset_n=t2_n–t1_n。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. composition. T offset = {t offset_1 , t offset_2, ..., t offset_n }, t offset_n = t 2_n – t 1_n .
该第二芯片可以每隔第一时间间隔的时长T根据该Toffset的值校准一次本地时间。The second chip can calibrate the local time according to the value of T offset every time T of the first time interval.
可选地,该第二芯片可以根据多个时间偏差Toffset的值确定时间偏差的偏差规律。Optionally, the second chip can determine the deviation law of the time deviation according to the values of multiple time deviations T offset .
示例性地,该第二芯片可以确定多个时间偏差值的平均值,该时间偏差的平均值可以表示该第二芯片的本地时间每隔第一时间间隔的时长T相较于第一芯片的本地时间偏差的第一时间偏差值。For example, 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.
例如,该第二芯片可以在第一时间段内根据该偏差规律校准本地时间,而无需该第一芯片发送该第一芯片触发中断的时间信息。该第一时间段的时长可以是M个第一时间间隔的时长,M为大于等于2的正整数,示例性地,M的值可以取1000。For example, 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. For example, the value of M may be 1,000.
又如,该第二芯片可以根据该多个时间偏差值确定该第二芯片的本地时间每隔第二时间间隔的时长相较于第一芯片的本地时间偏差的第二时间偏差值,其中,该第二时间间隔的时长可以大于该第一时间间隔的时长。后续,该第二芯片还可以根据该偏差规律每隔第二时间间隔的时长校准一次本地时间,示例性地,该第二芯片可以直接根据该第二时间偏差值校准本地时间,或者,该第二芯片可以每隔第二时间间隔的时长接收该第一芯片发送的该第一芯片触发中断的时间信息,并根据该第一芯片触发中断的时间信息校准本地时间。For another example, 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.
也就是说,第二芯片在第一时间段内可以根据第一芯片触发的定时中断#1(定时时长为第一时间间隔的时长)进行时间校准,在该第一时长之后,该第二芯片可以根据时间偏差规律进行自行校准;或者,在该第一时长之后,该第二芯片根据时间偏差规律以第二时间间隔的时长接收第一芯片发送的中断信号以及第一芯片触发中断的时间信息,并根据该第一芯片触发中断的时间信息进行本地时间校准,该第二时间间隔的时长大于该第一时间间隔的时长,从而可以节省数据传输资源。That is to say, 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). After the first duration, 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.
举例来说,该第一芯片从t0时刻开始可以触发n个定时中断,定时时长为t;该第二芯片根据n个中断确定n个时间偏差值;该第二芯片根据该n个时间偏差值确定时间偏差规律;在t0+nt时刻之后,该第二芯片可以根据该时间偏差规律每隔时间t校准一次本地时间而无需处理第一芯片发送的第一芯片触发中断的时间信息,或者,该第一芯片也可以在t0+nt时刻之后无需触发中断;或者,该第二芯片在t0+nt时刻之后,根据该时间偏差规律每隔时间t1校准一次本地时间而无需处理第一芯片发送的第一芯片触发中断的时间信息,t1可以大于t;可选地,从t0+mt时刻开始,该第二芯片还可以继续接收第
一芯片触发中断的第一时间信息,并根据该第一时间信息重新确定多个时间偏差值,并重新确定时间偏差规律,m>n,m,n为正整数。可选地,从t0+mt时间开始,该第二芯片接收第一时间信息的周期可以大于该定时时长t,例如,该第二芯片可以每隔整数倍定时时长确定一次时间偏差。For example, 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 value determines the time deviation rule; after time t 0 +nt, the second chip can calibrate the local time every time t according to the time deviation rule without processing the time information sent by the first chip that triggers the interrupt, or , the first chip does not need to trigger an interrupt after time t 0 +nt; or, the second chip calibrates the local time every time t 1 according to the time deviation law after time t 0 +nt without processing the first 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. Optionally, starting from time t 0 +mt, the period in which the second chip receives the first time information may be greater than the timing duration t. For example, the second chip may determine a time deviation every integer multiple of the timing duration.
可选地,S306,该第一芯片向该第二芯片发送该第一数据。Optionally, S306, the first chip sends the first data to the second chip.
相应地,该第二芯片接收该第一数据。Correspondingly, the second chip receives the first data.
可选地,S307,该第二芯片确定该第一数据的第二时间戳,该第二时间戳是根据T0和时间偏差值Toffset确定的。Optionally, S307, 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 .
以下结合图5详细说明本申请实施例提供的时钟同步的方法。该方法应用于该第一从设备。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.
S501,第一芯片触发N次中断,该N次中断为定时中断,定时时长为t。S501, the first chip triggers N interrupts, the N interrupts are scheduled interrupts, and the scheduled duration is t.
第一芯片触发N次中断的时刻表示为T1,T1={t1_1,t1_2…t1_n},t1_n表示第一芯片第N次触发中断的时刻。The time when the first chip triggers the Nth interrupt is represented as T 1 , T 1 ={t 1_1 , t 1_2 ...t 1_n }, and t 1_n represents the time when the first chip triggers the Nth interrupt.
相应地,第二芯片触发N次中断,该第二芯片触发的N次中断可以理解为对该第一芯片触发的N次中断的中断响应。或者说,响应于该第一芯片触发的N次中断,该第二芯片触发N次中断。第二芯片触发N次中断的时刻表示为T2={t2_1,t2_2…t2_n},t2_n表示第N次触发中断的时刻,N≥2,N为整数。Correspondingly, the second chip triggers N interrupts, and the N interrupts triggered by the second chip can be understood as interrupt responses to the N interrupts triggered by the first chip. In other words, in response to N interrupts triggered by the first chip, the second chip triggers N interrupts. The time when the second chip triggers the Nth interrupt is expressed as T 2 ={t 2_1 , t 2_2 ...t 2_n }, t 2_n represents the time when the Nth interrupt is triggered, N≥2, and N is an integer.
S502,第二芯片获取T1的信息。S502, the second chip obtains the information of T 1 .
以第一芯片在t1_2时刻触发第二次中断,第二芯片在t2_2时刻触发第二次中断为例。Take the first chip triggering the second interrupt at time t 1_2 and the second chip triggering the second interrupt at time t 2_2 as an example.
一个示例中,第一芯片可以发送t1_2的NTR值,相应地,第二芯片接收t1_2的NTR值。In one example, 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 .
参考图6的(a),第一芯片可以在t1时刻发送t1_2的NTR值,t1时刻为t1_1与t1_2之间的一个时刻,即t1与t1_1之间的时长小于定时间隔t,例如,t1与t1_1之间的时长可以为50ms。其中,t1_2=t1_1+t。第一芯片可以在该t1时刻发送t1_2的NTR值,可以减小第二芯片因接收该t1_2的NTR值不及时而带来的计算误差。Referring to (a) of Figure 6, 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. Among them, 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.
相应地,该第二芯片在t2时刻接收该t1_2的NTR值。Correspondingly, the second chip receives the NTR value of t 1_2 at time t 2 .
另一个示例中,第二芯片确定t1_2的NTR值。In another example, the second chip determines the NTR value of t 1_2 .
参考图6的(b),该第二芯片在t3时刻接收第一芯片在t4时刻发送的t1_1的NTR值,该t4时刻为t1_1与t1_2之间的一个时刻。该第二芯片根据t2_1和t2_2确定定时时长t;该第二芯片根据确定的定时时长t和t1_1的NTR值确定t1_2的NTR值。t1_2=t1_1+t。Referring to (b) of FIG. 6 , 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.
其中,t3和t2_1之间的时间间隔小于t。Among them, the time interval between t 3 and t 2_1 is less than t.
S503,该第二芯片根据T1的信息和T2的信息确定时间偏差Toffset。S503: The second chip determines the time offset T offset based on the information of T 1 and the information of T 2 .
其中,T2包括该第二芯片触发N次中断的N个时刻。该第二芯片可以在每次触发中断时读取本地时钟,获取T2的信息。例如,该第二芯片可以读取触发第二次中断的时刻t2_2的NTR值。Among them, 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.
该第二芯片根据接收的t1_2的NTR值以及该t2_2的NTR值确定一次时钟偏差toffset_1。其中,t1_2=t1_1+t。The second chip determines a primary clock offset t offset_1 based on the received NTR value of t 1_2 and the NTR value of t 2_2 . Among them, t 1_2 =t 1_1 +t.
t1_1,t2_2以及toffset_1的值满足如下关系:
toffset_1=t2_2-(t1_1+t)+tdelay (1)The values of t 1_1 , t 2_2 and t offset_1 satisfy the following relationship:
t offset_1 =t 2_2 -(t 1_1 +t)+t delay (1)
toffset_1=t2_2-(t1_1+t)+tdelay (1)The values of t 1_1 , t 2_2 and t offset_1 satisfy the following relationship:
t offset_1 =t 2_2 -(t 1_1 +t)+t delay (1)
其中,tdelay为第二芯片响应第一芯片触发的中断信号与第一芯片触发中断之间的时延,tdelay通常是纳米级的,因此,tdelay相对于toffset_1可以忽略不计。即:
toffset_1=t2_2-(t1_1+t) (2)Among them, 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 . Right now:
t offset_1 =t 2_2 -(t 1_1 +t) (2)
toffset_1=t2_2-(t1_1+t) (2)Among them, 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 . Right now:
t offset_1 =t 2_2 -(t 1_1 +t) (2)
以上关系式(2)中,toffset_1可以理解为该第二芯片触发第二次第二中断时的本地时间t2_2与第一芯片触发第二次第一中断时第一芯片的本地时间t1_2之间的偏差,或者说,该第二芯片以第一芯片的时钟系统为参考,相对于该第一芯片的t1_2存在的时间偏差。In the above relationship (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.
应理解,toffset_1的取值可以为正,或者为负,或者为0,即以第一芯片的时钟系统为参考,第二芯片相对于第一芯片的时间超前或滞后,或相等。It should be understood that the value of 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.
可以理解,该第二芯片每隔时间间隔t确定一个时间偏差Toffset的值,Toffset={toffset_1,toffset_2,…,toffset_n},n为正整数。It can be understood that the second chip determines a value of time offset T offset every time interval t, T offset ={t offset_1 , t offset_2 ,..., t offset_n }, n is a positive integer.
可选地,S504,该第二芯片根据该Toffset确定时间偏差规律。Optionally, S504, the second chip determines the time deviation rule according to the T offset .
该时间偏差规律可以参考S304中的描述,不再赘述。The time deviation rule can be referred to the description in S304 and will not be described again.
从而,该第二芯片可以根据该时间偏差规律以第一芯片的时钟系统为参考,校准该第二芯片的本
地时间,实现该第二芯片与该第一芯片之间的时钟同步。Therefore, 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.
可选地,S505,在该第二芯片可以通过该第一芯片接收来自主设备的第一数据,该第一数据携带第一时间戳。Optionally, in S505, the second chip may receive the first data from the master device through the first chip, and the first data carries the first timestamp.
可选地,S506,该第二芯片可以根据时间偏差值或时间偏差规律确定该第一数据的第二时间戳。Optionally, S506, the second chip can determine the second timestamp of the first data according to the time deviation value or time deviation law.
例如,该第一数据的第一时间戳为T0,该第二芯片确定的时间偏差值为Toffset,该第二时间戳为T1,T1=T0+Toffset。For example, 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.
图7示出了本申请实施例提供的装置700的示意性框图。该装置700可以设置于上述第一从设备中,该装置700可以是第一从设备中的第一芯片,该装置700中包括:处理单元710,用于执行第一时钟同步处理,触发中断以及提取本地时钟;收发单元720,用于发送中断信号以及信息,例如,提取的本地时钟的信息。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.
图8示出了本申请实施例提供的装置800的示意性框图。该装置800可以设置于上述第一从设备中,该装置800可以是第一从设备中的第二芯片,该装置800中包括:处理单元810,执行第二时钟同步处理,触发中断以及提取本地时钟;收发单元820,用于接收中断信号以及信息。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.
对于装置的实现形式是芯片的情况,可参见图9所示的芯片的结构示意图。图9所示的芯片包括处理器901和接口902。其中,处理器901的数量可以是一个或多个,接口902的数量可以是多个。接口902用于信号的接收和发送。可选的,该芯片可以包括存储器903。存储器903中用于保存芯片必要的程序指令和数据。本申请实施例提供的芯片,可以用于支持电子设备实现上述方法实施例中第一芯片和/或第二芯片所涉及的功能,例如,确定或处理上述方法中所涉及的数据和信息中的至少一种。For the case where the device is implemented in the form of a chip, please refer to the schematic structural diagram of the chip shown in Figure 9 . 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. Optionally, 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. When the chip is running, the technical solutions in the above embodiments are executed. The implementation principles and technical effects are similar and will not be described again here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the embodiments of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, 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 described again here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, 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.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
In addition, 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.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If 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. Based on this understanding, 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. .
以上所述,仅为本申请的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。
The above are only specific implementation modes of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes within the technical scope disclosed in the embodiments of the present application. or replacement, all should be covered by the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.
Claims (14)
- 一种时钟同步的方法,其特征在于,所述方法应用于电子设备,所述电子设备包括第一芯片和第二芯片,所述方法包括:A clock synchronization method, characterized in that the method is applied to electronic equipment, the electronic equipment includes a first chip and a second chip, and the method includes:所述第一芯片触发第一中断,以向所述第二芯片发送第一信号;The first chip triggers a first interrupt to send a first signal to the second chip;所述第二芯片根据所述第一信号,触发第二中断;The second chip triggers a second interrupt according to the first signal;所述第二芯片获取触发所述第一中断的第一时刻;The second chip obtains the first moment when the first interrupt is triggered;所述第二芯片根据所述第一时刻和触发所述第二中断的第二时刻,进行时钟同步处理。The second chip performs clock synchronization processing based on the first time and the second time when the second interrupt is triggered.
- 根据权利要求1所述的方法,其特征在于,所述第二芯片获取触发所述第一中断的第一时刻,包括:The method of claim 1, wherein the second chip obtains the first moment when the first interrupt is triggered, including:所述第二芯片在第三时刻接收来自所述第一芯片的第一信息,所述第一信息用于指示所述第一时刻,所述第三时刻早于所述第二时刻。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, and the third time is earlier than the second time.
- 根据权利要求2所述的方法,其特征在于,所述第一中断为所述第一芯片触发的第N次中断,所述第一信息是根据所述第一芯片触发第一次中断的第四时刻和第一时长确定的,所述第一时长为所述第一芯片触发相邻两次中断之间的时长,N≥2,N为整数,或者,所述第一信息是根据所述第一芯片触发第N1次中断的第五时刻和所述第一时长确定的,N1=N-1,N≥3,N为整数。The method of claim 2, wherein the first interrupt is the Nth interrupt triggered by the first chip, and the first information is the Nth interrupt triggered by the first chip. Determined by four moments and a first duration, 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 The fifth moment when the first chip triggers the N 1th interrupt and the first duration are determined, N 1 =N-1, N≥3, and N is an integer.
- 根据权利要求1所述的方法,其特征在于,所述第一中断为所述第一芯片触发的第N次中断,所述方法还包括:The method of claim 1, wherein the first interrupt is the Nth interrupt triggered by the first chip, and the method further includes:所述第一芯片触发第N1次中断,以向所述第二芯片发送第二信号,N1=N-1,N≥2,N为整数;The first chip triggers the N 1th interrupt to send a second signal to the second chip, N 1 =N-1, N≥2, N is an integer;所述第二芯片根据所述第二信号,触发第三中断;The second chip triggers a third interrupt according to the second signal;所述第二芯片接收来自所述第一芯片的第二信息,所述第二信息用于指示触发所述第N1次中断的第六时刻;The second chip receives second information from the first chip, and the second information is used to indicate the sixth moment when the N1th interrupt is triggered;所述第二芯片根据触发所述第三中断的第七时刻以及所述第二时刻确定第一时长,所述第一时长为所述第一芯片触发相邻两次中断之间的时长;The second chip determines a first duration based on the seventh moment when the third interrupt is triggered and the second moment, where the first duration is the duration between two adjacent interrupts triggered by the first chip;所述第二芯片获取触发所述第一中断的第一时刻,包括:The second chip obtains the first moment when the first interrupt is triggered, including:所述第二芯片根据所述第六时刻和所述第一时长确定所述第一时刻。The second chip determines the first time based on the sixth time and the first duration.
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述第二芯片根据所述第一时刻和触发所述第二中断的第二时刻,进行时钟同步处理,包括:The method according to any one of claims 1 to 4, characterized in that the second chip performs clock synchronization processing according to the first time and the second time when the second interrupt is triggered, including:所述第二芯片根据所述第一时刻和所述第二时刻确定第一时间偏差值;The second chip determines a first time deviation value based on the first time and the second time;所述第二芯片根据所述第一时间偏差值调整本地时钟。The second chip adjusts the local clock according to the first time offset value.
- 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一中断为所述第一芯片触发的M次中断中的一次中断,所述方法还包括:The method according to any one of claims 1 to 4, wherein the first interrupt is one of M interrupts triggered by the first chip, and the method further includes:所述第二芯片获取所述第一芯片触发所述M次中断对应的M个时刻;The second chip obtains M times corresponding to the first chip triggering the M interrupts;所述第二芯片根据所述M个时刻和所述第二芯片触发M次中断对应的M个时刻确定M个时间偏差值,所述M个时间偏差值中的第i个时间偏差值是根据所述第一芯片触发第i次中断的时刻和所述第二芯片触发第i次中断的时刻确定的;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 is based on The moment when the first chip triggers the i-th interrupt and the moment when the second chip triggers the i-th interrupt are determined;其中,所述第二芯片触发的第i次中断是根据所述第一芯片触发的第i次中断触发的,M≥2,M为整数,i=1,2,…,M。Wherein, the i-th interrupt triggered by the second chip is triggered according to the i-th interrupt triggered by the first chip, M≥2, M is an integer, i=1, 2,...,M.
- 根据权利要求6所述的方法,其特征在于,所述第二芯片根据所述第一时刻和触发所述第二中断的第二时刻,进行时钟同步处理,包括:The method of claim 6, wherein the second chip performs clock synchronization processing based on the first time and the second time when the second interrupt is triggered, including:所述第二芯片根据所述M个时间偏差值的平均值以第一时长为周期调整本地时钟;或者,The second chip adjusts the local clock according to the average value of the M time deviation values with a first duration as a period; or,所述第二芯片根据所述M个时间偏差值的平均值以第二时长为周期调整本地时钟,所述第二时长大于第一时长;The second chip adjusts the local clock according to the average value of the M time deviation values 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.
- 一种电子设备,其特征在于,所述电子设备包括第一芯片和第二芯片,所述第一芯片和所述第二芯片有线连接,其中, An electronic device, characterized in that the electronic device includes a first chip and a second chip, and the first chip and the second chip are wired, wherein,所述第一芯片,用于触发第一中断,以向所述第二芯片发送第一信号;The first chip is used to trigger a first interrupt to send a first signal to the second chip;所述第二芯片,用于根据所述第一信号,触发第二中断;The second chip is used to trigger a second interrupt according to the first signal;所述第二芯片,还用于获取触发所述第一中断的第一时刻;The second chip is also used to obtain the first moment when the first interrupt is triggered;所述第二芯片,还用于根据所述第一时刻和触发所述第二中断的第二时刻,进行时钟同步处理。The second chip is also configured to perform clock synchronization processing based on the first time and the second time when the second interrupt is triggered.
- 根据权利要求8所述的电子设备,其特征在于,所述第二芯片,还用于获取触发所述第一中断的第一时刻,包括:The electronic device according to claim 8, characterized in that the second chip is also used to obtain the first moment when the first interrupt is triggered, including:在第三时刻接收来自所述第一芯片的第一信息,所述第一信息用于指示所述第一时刻,所述第三时刻早于所述第二时刻。First information from the first chip is received at a third time, the first information is used to indicate the first time, and the third time is earlier than the second time.
- 根据权利要求9所述的电子设备,其特征在于,所述第一中断为所述第一芯片触发的第N次中断,所述第一信息是根据所述第一芯片触发第一次中断的第四时刻和第一时长确定的,所述第一时长为所述第一芯片触发相邻两次中断之间的时长,N≥2,N为整数,或者,所述第一信息是根据所述第一芯片触发第N1次中断的第五时刻和所述第一时长确定的,N1=N-1,N≥3,N为整数。The electronic device according to claim 9, wherein the first interrupt is the Nth interrupt triggered by the first chip, and the first information is based on the first interrupt triggered by the first chip. The fourth 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 The fifth moment when the first chip triggers the N 1th interrupt and the first duration are determined, N 1 =N-1, N≥3, and N is an integer.
- 根据权利要求8所述的电子设备,其特征在于,所述第一芯片还用于触发第N1次中断,以向所述第二芯片发送第二信号,N1=N-1,N≥2,N为整数;The electronic device according to claim 8, characterized in that the first chip is also used to trigger the N 1th interrupt to send a second signal to the second chip, N 1 =N-1, N≥ 2, N is an integer;所述第二芯片,还用于根据所述第二信号,触发第三中断;The second chip is also used to trigger a third interrupt according to the second signal;所述第二芯片,还用于接收来自所述第一芯片的第二信息,所述第二信息用于指示触发所述第N1次中断的第六时刻;The second chip is also configured to receive second information from the first chip, where the second information is used to indicate the sixth moment when the N1th interrupt is triggered;所述第二芯片,还用于根据触发所述第三中断的第七时刻以及所述第二时刻确定第一时长,所述第一时长为所述第一芯片触发相邻两次中断之间的时长;The second chip is also configured to determine a first duration based on the seventh moment when the third interrupt is triggered and the second moment, where the first duration is between two adjacent interrupts triggered by the first chip. duration;所述第二芯片,还用于获取触发所述第一中断的第一时刻,包括:The second chip is also used to obtain the first moment when the first interrupt is triggered, including:根据所述第六时刻和所述第一时长确定所述第一时刻。The first time is determined based on the sixth time and the first duration.
- 根据权利要求8至11中任一项所述的电子设备,其特征在于,所述第二芯片,还用于根据所述第一时刻和触发所述第二中断的第二时刻,进行时钟同步处理,包括:The electronic device according to any one of claims 8 to 11, characterized in that the second chip is further configured to perform clock synchronization based on the first time and the second time when the second interrupt is triggered. Processing, including:根据所述第一时刻和所述第二时刻确定第一时间偏差值;Determine a first time deviation value based on the first time and the second time;根据所述第一时间偏差值调整本地时钟。Adjust the local clock according to the first time offset value.
- 根据权利要求8至11中任一项所述的电子设备,其特征在于,所述第一中断为所述第一芯片触发的M次中断中的一次中断,所述第二芯片还用于:The electronic device according to any one of claims 8 to 11, wherein the first interrupt is one of M interrupts triggered by the first chip, and the second chip is also used for:获取所述第一芯片触发所述M次中断对应的M个时刻;Obtain M times corresponding to the first chip triggering the M interrupts;根据所述M个时刻和所述第二芯片触发M次中断对应的M个时刻确定M个时间偏差值,所述M个时间偏差值中的第i个时间偏差值是根据所述第一芯片触发第i次中断的时刻和所述第二芯片触发第i次中断的时刻确定的;M time deviation values are determined based on the M times and the M times corresponding to the second chip triggering M interrupts. The i-th time deviation value among the M time deviation values is based on the first chip. The moment when the i-th interrupt is triggered and the moment when the second chip triggers the i-th interrupt are determined;其中,所述第二芯片触发的第i次中断是根据所述第一芯片触发的第i次中断触发的,M≥2,M为整数,i=1,2,…,M。Wherein, the i-th interrupt triggered by the second chip is triggered according to the i-th interrupt triggered by the first chip, M≥2, M is an integer, i=1, 2,...,M.
- 根据权利要求13所述的电子设备,其特征在于,所述第二芯片,还用于根据所述第一时刻和触发所述第二中断的第二时刻,进行时钟同步处理,包括:The electronic device according to claim 13, wherein the second chip is further configured to perform clock synchronization processing based on the first time and the second time when the second interrupt is triggered, including:根据所述M个时间偏差值的平均值以第一时长为周期调整本地时钟;或者,Adjust the local clock according to the average value of the M time deviation values with a first duration as a period; or,根据所述M个时间偏差值的平均值以第二时长为周期调整本地时钟,所述第二时长大于第一时长;Adjust the local clock according to the average value of the M time deviation values with a second duration as a period, and the second duration is longer than the first duration;其中,所述第一时长为所述第一芯片触发相邻两次中断之间的时长。 Wherein, the first duration is the duration between two adjacent interrupts triggered by the first chip.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210798871.7 | 2022-07-06 | ||
CN202210798871.7A CN117411580A (en) | 2022-07-06 | 2022-07-06 | Clock synchronization method and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024007974A1 true WO2024007974A1 (en) | 2024-01-11 |
Family
ID=89454364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/104379 WO2024007974A1 (en) | 2022-07-06 | 2023-06-30 | Clock synchronization method and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117411580A (en) |
WO (1) | WO2024007974A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118244843B (en) * | 2024-05-29 | 2024-10-15 | 荣耀终端有限公司 | Time synchronization method and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150092642A1 (en) * | 2013-09-27 | 2015-04-02 | Apple Inc. | Device synchronization over bluetooth |
CN104731736A (en) * | 2015-03-27 | 2015-06-24 | 深圳怡化电脑股份有限公司 | Time synchronization device, method and system |
CN108462991A (en) * | 2017-02-22 | 2018-08-28 | 北京小鸟听听科技有限公司 | Processor clock synchronous method, equipment and system |
CN108829627A (en) * | 2018-05-30 | 2018-11-16 | 青岛小鸟看看科技有限公司 | Synchronisation control means and system between virtual reality device |
CN111679714A (en) * | 2019-12-31 | 2020-09-18 | 泰斗微电子科技有限公司 | Cross-chip signal synchronization method and device and chip |
WO2022077228A1 (en) * | 2020-10-13 | 2022-04-21 | 深圳市大疆创新科技有限公司 | Time alignment method, device and system, and imaging assembly |
-
2022
- 2022-07-06 CN CN202210798871.7A patent/CN117411580A/en active Pending
-
2023
- 2023-06-30 WO PCT/CN2023/104379 patent/WO2024007974A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150092642A1 (en) * | 2013-09-27 | 2015-04-02 | Apple Inc. | Device synchronization over bluetooth |
CN104731736A (en) * | 2015-03-27 | 2015-06-24 | 深圳怡化电脑股份有限公司 | Time synchronization device, method and system |
CN108462991A (en) * | 2017-02-22 | 2018-08-28 | 北京小鸟听听科技有限公司 | Processor clock synchronous method, equipment and system |
CN108829627A (en) * | 2018-05-30 | 2018-11-16 | 青岛小鸟看看科技有限公司 | Synchronisation control means and system between virtual reality device |
CN111679714A (en) * | 2019-12-31 | 2020-09-18 | 泰斗微电子科技有限公司 | Cross-chip signal synchronization method and device and chip |
WO2022077228A1 (en) * | 2020-10-13 | 2022-04-21 | 深圳市大疆创新科技有限公司 | Time alignment method, device and system, and imaging assembly |
Also Published As
Publication number | Publication date |
---|---|
CN117411580A (en) | 2024-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11375312B2 (en) | Method, device, loudspeaker equipment and wireless headset for playing audio synchronously | |
CN108337595B (en) | Bluetooth headset realizes the method being precisely played simultaneously | |
WO2024007974A1 (en) | Clock synchronization method and electronic device | |
CN204669601U (en) | A kind of full Wireless high fidelity sound system | |
CN110636600B (en) | Audio synchronous playing method for wireless equipment | |
KR20190034206A (en) | Control connected multimedia devices | |
GB2533831A (en) | Synchronised control | |
CN114258003A (en) | Audio playing control method, system, device and storage medium | |
TWI813347B (en) | Bluetooth audio broadcasting system supporting bluetooth low energy audio broadcasting operations and capable of avoiding user from missing external alert signals or specific sounds | |
CN104320699A (en) | Method for dynamically adjusting Bluetooth sounding device | |
WO2012068814A1 (en) | Audio processing method and dual-mode digital mobile communication terminal | |
CN102881302A (en) | Method and system for processing audio signals in a central audio hub | |
JP2004221951A (en) | Method for correcting jitter of transmission data | |
US20210125594A1 (en) | Wireless midi headset | |
CN213754842U (en) | Audio system based on 5G signal transmission | |
CN115776628B (en) | Method for accurate synchronization of two-ear recording of TWS Bluetooth headset | |
JP2002157867A (en) | Audio system and control method of audio unit | |
US20230102871A1 (en) | Bluetooth voice communication system and related computer program product for generating stereo voice effect | |
US20220322209A1 (en) | Bluetooth audio broadcasting system and related multi-member bluetooth device supporting bluetooth low energy audio broadcasting operations and capable of avoiding user from missing external alert signals or specific sounds | |
CN208227287U (en) | Intelligent audio processing equipment | |
EP4369747A1 (en) | Electronic device, and method of transmitting data in electronic device | |
JP2006246348A (en) | Wireless communication system | |
EP4232908A1 (en) | Virtual universal serial bus interface | |
CN112235685A (en) | Sound box networking method and sound box system | |
JP2011155616A (en) | Receiving apparatus, method and system for transmitting voice signal |
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 |