A digital signal timing control method for SPI isolation chip and SPI isolation chip

By receiving differential signals in the SPI isolation chip for decoding and verification, determining the validity of the signal and performing reset processing, the problem of difficulty in controlling timing of long-distance data transmission in the existing technology is solved, and stable and reliable data transmission and circuit simplification are achieved. , reduces costs.

CN118152319BActive Publication Date: 2024-11-08UNISEMI POWER INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311070308.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2024-11-08
Estimated Expiration
2043-08-23

AI Technical Summary

Technical Problem

When existing SPI isolation chips transmit long-distance data in harsh environments, the low signal-to-noise ratio and complex circuit structures lead to difficulty in timing control, increasing the probability of errors in transmission paths.

Method used

By receiving differential signals for decoding, the signal validity and logic level are judged, and the pulse width and flip time are used to judge the differential signal's validity checksum reset processing is realized, reducing phase-locked loops and high frequency The use of synchronous clock data recovery circuit.

Benefits of technology

It realizes stable and reliable data transmission, reduces the probability of errors in the transmission path, simplifies the circuit structure, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118152319B_ABST
    Figure CN118152319B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a SPI isolation chip digital signal timing control method and an SPI isolation chip, which determines whether the input first digital signal and the second digital signal are valid; and determines whether the received differential signal has a preset logic level by comparing the mutual sampling results of the first digital signal and the second digital signal, so as to determine the validity of the received differential signal, thereby achieving stable and reliable data transmission with low cost, greatly reducing the probability of error and lockup of the transmission path, and in addition, can greatly reduce the use of phase-locked loops and high-frequency synchronous clock data recovery circuits in terms of circuit structure, simplify the control logic, thereby reducing the circuit area and reducing the cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application belong to the technical field of timing control, and in particular, relate to a SPI isolation chip digital signal timing control method and a SPI isolation chip. Background Art

[0002] The SPI isolation chip is a synchronous serial data bus peripheral interface that enables fast and long-distance data exchange between the master device and the slave device. It helps to exchange data over long distances (cable distance is less than 10 meters) between the device and the central control unit. In many industrial application scenarios, the environment is relatively harsh and the communication distance is longer, and electrical isolation is required to protect the equipment and reduce the signal-to-noise ratio. The isolated SPI communication interface can meet the above requirements and optimize SPI communication. The main modules of the isolated SPI chip include bandgap reference, LDO stabilization circuit, signal receiving and transmitting circuit, low-power comparator, clock oscillator, and digital logic circuit. Among them, the digital logic circuit mainly realizes the signal encoding function, including data validity judgment, data encoding and decoding, register reset, etc. When using synchronous logic, a high-frequency oscillator is required for timing control, and complex circuits such as phase-locked loop multiplication and high-frequency counters are required to achieve nanosecond timing control. Summary of the invention

[0003] In order to solve or alleviate the problems in the prior art, an embodiment of the present application provides a SPI isolation chip digital signal timing control method, including:

[0004] Receive the differential signal transmitted by the transmitting circuit of the upper-level SPI isolation chip;

[0005] Decoding the differential signal to obtain a first digital signal and a second digital signal;

[0006] Determining whether the first digital signal and the second digital signal are valid;

[0007] Determining whether the received differential signal has a preset logic level by comparing the mutual sampling results of the first digital signal and the second digital signal;

[0008] If the first digital signal and the second digital signal are valid signals, and the received differential signal has a preset logic level, releasing the received differential signal;

[0009] After a preset time, a signal is returned to the receiving circuit of the upper-level SPI isolation chip in the SPI isolation chip through the transmitting circuit inside the SPI isolation chip, and the receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

[0010] As a preferred embodiment of the present application, the receiving of the differential signal transmitted by the transmitting circuit of the previous-level SPI isolation chip includes:

[0011] The comparator circuit outputs logic levels to represent positive and negative pulses on the first differential line and the second differential line to obtain the first digital signal and the second digital signal, and both the positive and negative pulses are high level.

[0012] As a preferred embodiment of the present application, the determining whether the first digital signal and the second digital signal are valid includes:

[0013] Determine whether the pulse width of the first digital signal and the second digital signal is greater than a first preset pulse width and less than a second preset pulse width; if yes, obtain a first quasi-valid digital signal and a second quasi-valid digital signal; if no, the first digital signal and / or the second digital signal are invalid data and are filtered out; and,

[0014] It is determined whether the flipping time of the positive and negative pulse signals of the first digital signal and the second digital signal is at a preset time point. If yes, it is determined that the first quasi-valid digital signal and the second quasi-valid digital signal are both valid digital signals.

[0015] As a preferred embodiment of the present application, the determining whether the received differential signal has a preset logic level by comparing the mutual sampling results of the first digital signal and the second digital signal includes:

[0016] When the first digital signal and the second digital signal are on the rising edge, timing starts, and the rising edge of the first digital signal is used to sample the second digital signal to obtain a first detection result. At the same time, the rising edge of the second digital signal is used to sample the first digital signal to obtain a second detection result. If the logic levels output by the first detection result and the second detection result are both 1, it is determined that the received differential signal has a preset logic level.

[0017] As a preferred embodiment of the present application, the method further includes:

[0018] When it is determined that both the first quasi-valid digital signal and the second quasi-valid digital signal are invalid digital signals, a receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

[0019] As a preferred embodiment of the present application, the determining whether the pulse width of the first digital signal and the second digital signal is less than the second preset pulse width includes:

[0020] Determine whether the pulse widths of the positive and negative pulses of the first digital signal and the second digital signal meet the requirements of a preset time window. If yes, determine that the pulse widths of the first digital signal and the second digital signal are less than a second preset pulse width.

[0021] As a preferred embodiment of the present application, the method further includes:

[0022] When the positive and negative pulses on the first digital signal and the second digital signal are not effectively flipped, an error is reported, and the receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

[0023] As a preferred embodiment of the present application, the method further includes:

[0024] When the receiving circuit in the SPI isolation chip is reset to an initial state, the timer in the SPI isolation chip is reset at the same time.

[0025] Compared with the prior art, the embodiment of the present application provides a method for controlling the timing of digital signals of an SPI isolation chip, by judging whether the input first digital signal and the second digital signal are valid; and by comparing the mutual sampling results of the first digital signal and the second digital signal to determine whether the received differential signal has a preset logic level, so as to determine the validity of the received differential signal, thereby achieving stable and reliable data transmission with low cost, greatly reducing the probability of error and lockup of the transmission path, and in addition, it can greatly reduce the use of phase-locked loops and high-frequency synchronous clock data recovery circuits in terms of circuit structure, simplify the control logic, thereby reducing the circuit area and reducing the cost.

[0026] In a second aspect, an embodiment of the present application provides an SPI isolation chip, which is implemented by the SPI isolation chip digital signal timing control method described in any one of the first aspects.

[0027] Compared with the prior art, the beneficial effects of the technical solution provided in the second aspect of the present application are the same as those of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. Some specific embodiments of the present application will be described in detail in an illustrative and non-restrictive manner with reference to the drawings. The same reference numerals in the drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the drawings:

[0029] Figure 1It is a flow chart of a method for controlling digital signal timing of an SPI isolation chip provided in an embodiment of the present application;

[0030] Figure 2 It is a flow chart of a digital signal timing control process of an SPI isolation chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.

[0032] refer to Figure 1 , the embodiment of the present application provides a SPI isolation chip digital signal timing control method, comprising:

[0033] Step S01, receiving a differential signal transmitted by a transmitting circuit of an upper-level SPI isolation chip;

[0034] It should be noted that, in a specific application, the SPI isolation chip has a transmitting circuit and a receiving circuit. First, the SPI isolation chip receives the differential signal transmitted by the transmitting circuit of the upper-level SPI isolation chip communicating with it.

[0035] Step S02, decoding the differential signal to obtain a first digital signal and a second digital signal;

[0036] Step S02 specifically includes: outputting logic levels through a comparator circuit to represent positive and negative pulses on the first differential line and the second differential line to obtain a first digital signal and a second digital signal, and both the positive and negative pulses are high level.

[0037] It should be noted that step S02 is performed inside the SPI isolation chip. When the receiving circuit in the SPI isolation chip receives the input differential signal, it will perform decoding processing to obtain the first digital signal and the second digital signal.

[0038] Step S03, determining whether the first digital signal and the second digital signal are valid;

[0039] Step S03 specifically includes: determining whether the pulse width of the first digital signal and the second digital signal is greater than the first preset pulse width and less than the second preset pulse width; if yes, obtaining the first quasi-valid digital signal and the second quasi-valid digital signal; if no, the first digital signal and the second digital signal are invalid data and are filtered out; and,

[0040] It is determined whether the flipping time of the positive and negative pulse signals of the first digital signal and the second digital signal is at a preset time point. If yes, it is determined that the first quasi-valid digital signal and the second quasi-valid digital signal are both valid digital signals.

[0041] The determining whether the pulse widths of the first digital signal and the second digital signal are less than a second preset pulse width includes:

[0042] Determine whether the flip time of the positive and negative pulses of the first digital signal and the second digital signal meets the requirement of the preset time window, and if so, determine that the pulse width of the first digital signal and the second digital signal is less than the second preset pulse width.

[0043] It should be noted that in a specific application, the pulse width of the input first digital signal and the second digital signal will be judged first, so the validity requirements of the internal differential signal of the SPI isolation chip will be first used to judge whether the pulse width of the first digital signal and the second digital signal is greater than the first preset pulse width. In other words, this step mainly filters out the signals with smaller pulse widths of the first digital signal and the second digital signal. At the same time, according to the validity requirements of the internal differential signal of the SPI isolation chip, it is also necessary to judge whether the pulse width of the input first digital signal and the second digital signal is less than the preset second pulse width. If the first valid digital signal and the second valid digital signal meet the above conditions, according to the validity requirements of the internal differential signal of the SPI isolation chip, it is also necessary to judge the logic level of the signal and the flip time of the positive and negative pulse signals of the first digital signal and the second digital signal.

[0044] Step S04, determining whether the received differential signal has a preset logic level by comparing the mutual sampling results of the first digital signal and the second digital signal;

[0045] It should be noted that step S04 specifically includes:

[0046] Specifically, when the first digital signal and the second digital signal are on the rising edge, timing starts, and the rising edge of the first digital signal is used to sample the second digital signal to obtain a first detection result. At the same time, the rising edge of the second digital signal is used to sample the first digital signal to obtain a second detection result. If the logic levels output by the first detection result and the second detection result are both 1, it is determined that the first digital signal and the second digital signal have a preset logic level.

[0047] It should be noted that, when it is determined that both the first quasi-valid digital signal and the second quasi-valid digital signal are invalid digital signals, the receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

[0048] When the positive and negative pulses on the first digital signal and the second digital signal are not effectively flipped, an error is reported, and the receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

[0049] Step S05, if the first digital signal and the second digital signal are valid signals, and the received differential signal has a preset logic level, releasing the received differential signal;

[0050] It should be noted that if both the input first digital signal and the second digital signal are valid, and the received differential signal has a preset logic level 1, the received differential signal is allowed to be released to the digital control logic.

[0051] Step S06, after a preset time, a signal is returned to the receiving circuit of the upper-level SPI isolation chip in the SPI isolation chip through the transmitting circuit inside the SPI isolation chip, and the receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

[0052] It should be noted that after receiving the differential signal, a certain amount of time needs to be reserved to process the received differential signal, so the timer needs to be started. After the timer reaches the preset time, the transmitting circuit in the SPI isolation chip returns the signal to the receiving circuit in the upper-level SPI isolation chip so that the upper-level SPI isolation chip can perform the next step of data processing.

[0053] At the same time, the receiving circuit in the SPI isolation chip needs to be reset in order to receive the next differential signal.

[0054] In an embodiment of the present application, when the receiving circuit in the SPI isolation chip is reset to an initial state, the timer in the SPI isolation chip is reset at the same time.

[0055] In an embodiment of the present application, a timer is used to time the time for the transmitting circuit of the processed signal SPI isolation chip to return a signal to the receiving circuit of the upper-level SPI isolation chip; after resetting the timer in the SPI isolation chip, the transmitting circuit of the SPI isolation chip will no longer transmit a signal to the receiving circuit of the upper-level SPI isolation chip.

[0056] like Figure 2 As shown, the SPI isolation chip digital signal timing control method of the present application will be introduced in detail with the specific implementation method of the SPI isolation chip receiving data.

[0057] When the receiving circuit of the SPI isolation chip receives the signal bit1, when the receiving signal bit is successful, the comparator circuit inside the SPI isolation chip first outputs the logic level to represent the positive and negative pulses on the differential line to obtain the first digital signal and the second digital signal, the positive pulse is high, and the negative pulse is high. Figure 2 In the received signal bit1, there is a negative pulse first and then a positive pulse, so a high pulse is output first and then a high pulse.

[0058] The first digital signal and the second digital signal are filtered at the Tflt timing to obtain the first quasi-valid data and the second quasi-valid data. That is, when the pulse width of the first quasi-valid data and the second quasi-valid data is greater than the preset pulse width, the first quasi-valid data and the second quasi-valid data are obtained.

[0059] The rising edges of the first quasi-valid data and the second quasi-valid data respectively change the first data logic level and the second data logic level from low level to high level and latch them. The rising edge of the first data logic level is used to sample the second data logic level, and the rising edge of the second data logic level is used to sample the first data logic level. By comparing the two sampling results, it is determined whether the received differential signal is logic level 1 or logic level 0. Figure 2 As shown, the first data logic level comes later than the rising edge of the second data logic level, and the output result of the rising edge of the first data logic level sampling the second data logic level is a logic level of 1, indicating that the logic level of the received differential signal is 0. Conversely, the second data logic level comes later than the rising edge of the first data logic level, and the output result of the rising edge of the second data logic level sampling the first data logic level is a logic level of 1, indicating that the logic level of the received differential signal is 1.

[0060] When the second data logic level and the first data logic level are both 1, another judgment condition needs to be added: whether the pulse time of the positive and negative pulses on the differential line of the differential signal meets the time window requirements, and whether the pulse width of the first digital signal and the second digital signal is less than the second preset pulse width.

[0061] This time window is an important condition for distinguishing valid data. If the time of the effective flip of the positive and negative pulses on the differential line of the detected differential signal is at the preset time point of the timer, it is considered that the flip is valid.

[0062] In combination with the above, if the first data logic level, the second data logic level, and the valid data output logic level are all 1, and the flip time is valid, the received differential signal is considered valid, and the received data is allowed to be released to the digital control logic based on the results of the mutual sampling of the first data logic level and the first data logic level in the above text, that is, the output signal in the figure changes from 1 to 0.

[0063] After successfully receiving the data, the timer will be started. After the timing ends, the data will be returned to the receiving circuit of the SPI isolation chip of the upper level. At the same time, all registers and signals in the receiving circuit of the SPI isolation chip will be reset to the initial state and wait for the next data to be received.

[0064] Figure 2 When the receiving signals bit2 and bit3 are not received, data reception cannot be successful, that is, the valid data output logic level is 0. At this time, if there is no error detection mechanism to reset control, the data receiving circuit is locked in the current state and cannot continue to receive valid signals, which will cause the entire system communication to be interrupted and unable to detect useful information, thus creating a safety risk.

[0065] Figure 2 In the case of receiving signal bit2, the first negative pulse width cannot pass the Tflt timing filter. Therefore, no pulse is generated in the second quasi-valid data signal. Then the logic level of the second data signal remains at 0 and cannot become higher. Therefore, the first negative pulse is filtered out as invalid data. The timer starts timing from the rising edge of the second data signal. Since the logic level of the second data signal is 0, the rising edge of the first data signal samples the logic level of the second data signal, and the result of sampling the logic level of the first data signal with the rising edge of the second data signal is 0. Therefore, when the timer expires, the falling edge detection result output signal of the timer output is 0. This indicates that the positive and negative pulses on the differential line of the differential signal are not effectively flipped within the timing time of the timer. At this time, the flip time error is reported. After the error is reported, a pulse signal will be generated on the reset signal, and all registers and signals in the receiving circuit, including the error status indication, will be reset to the initial state to wait for the next data reception. This type of error also includes the case of only a single positive pulse or negative pulse.

[0066] Figure 2 In the case of receiving signal bit3, it can be known from the above that the logic level of the valid data is 1, the logic level of is 11, and the second negative pulse behind cannot pass the Tflt timing filter. Therefore, no pulse is generated in the second quasi-valid data signal, that is, the logic level of the second data signal cannot become high. The falling edge of the second data signal samples the logic level of the second data signal. If the result is 0, the negative pulse reception error. After the error is reported, a pulse signal will be generated on the reset signal, and all registers and signals in the receiving circuit, including the error status indication, will be reset to the initial state and wait for the next data to be received. Similarly, this type of error also includes the case where the valid data is 1 and the second positive pulse behind cannot pass the Tflt timing filter.

[0067] In the case of an output reception data error, while the reset signal resets the receiving circuit, it also resets the timer, causing it to stop timing and preventing the transmitting circuit of the SPI isolation chip from returning data to the receiving circuit of the upper-level SPI isolation chip. In the case of a data reception error, the output data keeps the previous valid reception data unchanged.

[0068] In a second aspect, an embodiment of the present application provides an SPI isolation chip, which is implemented by the SPI isolation chip digital signal timing control method described in any one of the first aspects.

[0069] Compared with the prior art, the beneficial effects of the technical solution provided in the second aspect of the present application are the same as those of the first aspect and will not be repeated here.

[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A SPI isolation chip digital signal timing control method, characterized in that: include: Receive the differential signal transmitted by the transmitting circuit of the upper-level SPI isolation chip; Decoding the differential signal to obtain a first digital signal and a second digital signal; Determining whether the first digital signal and the second digital signal are valid; Determining whether the received differential signal has a preset logic level by comparing the mutual sampling results of the first digital signal and the second digital signal; If the first digital signal and the second digital signal are valid signals, and the received differential signal has a preset logic level, releasing the received differential signal; After a preset time, a signal is returned to the receiving circuit of the upper-level SPI isolation chip in the SPI isolation chip through the transmitting circuit inside the SPI isolation chip, and the receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

2. A SPI isolation chip digital signal timing control method as claimed in claim 1, characterized in that, The step of decoding the differential signal to obtain a first digital signal and a second digital signal comprises: The comparator circuit of the SPI isolation chip outputs a logic level to represent the positive and negative pulses on the first differential line and the second differential line to obtain the first digital signal and the second digital signal, and both the positive and negative pulses are high level.

3. A SPI isolation chip digital signal timing control method as claimed in claim 1, characterized in that, The determining whether the first digital signal and the second digital signal are valid includes: Determine whether the pulse width of the first digital signal and the second digital signal is greater than the first preset pulse width and less than the second preset pulse width; if yes, obtain the first quasi-valid digital signal and the second quasi-valid digital signal; if no, the first digital signal and the second digital signal are invalid data and are filtered; and, It is determined whether the flipping time of the positive and negative pulse signals of the first digital signal and the second digital signal is at a preset time point. If yes, it is determined that the first quasi-valid digital signal and the second quasi-valid digital signal are both valid digital signals.

4. A SPI isolation chip digital signal timing control method as claimed in claim 2, characterized in that, The step of comparing the mutual sampling results of the first digital signal and the second digital signal to determine whether the received differential signal has a preset logic level comprises: When the first digital signal and the second digital signal are on the rising edge, timing starts, and the rising edge of the first digital signal is used to sample the second digital signal to obtain a first detection result. At the same time, the rising edge of the second digital signal is used to sample the first digital signal to obtain a second detection result. If the logic levels output by the first detection result and the second detection result are both 1, it is determined that the received differential signal has a preset logic level.

5. A SPI isolation chip digital signal timing control method as claimed in claim 4, characterized in that, The method further comprises: When it is determined that the first quasi-valid digital signal and / or the second quasi-valid digital signal are both invalid digital signals, a receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

6. A SPI isolation chip digital signal timing control method as claimed in claim 1, characterized in that, The determining whether the pulse widths of the first digital signal and the second digital signal are less than a second preset pulse width includes: Determine whether the pulse widths of the positive and negative pulses of the first digital signal and the second digital signal meet the requirements of a preset time window. If yes, determine that the pulse widths of the first digital signal and the second digital signal are less than a second preset pulse width.

7. A SPI isolation chip digital signal timing control method as claimed in claim 3, characterized in that: The method further comprises: When the positive and negative pulses on the first digital signal and the second digital signal are not effectively flipped, an error is reported, and the receiving circuit in the SPI isolation chip is reset to receive the next differential signal.

8. A SPI isolation chip digital signal timing control method as claimed in claim 1, characterized in that, The method further comprises: When the receiving circuit in the SPI isolation chip is reset to an initial state, the timer in the SPI isolation chip is reset at the same time.

9. An SPI isolation chip, characterized in that: This is achieved by the SPI isolation chip digital signal timing control method as described in any one of claims 1 to 8.