|
|
I2C signal measurement solution is provided by HUANGjin TL2136B logic analyzerTime:2017-03-27 I2C bus is a very common bus in electronic products. Its advantage is that it only needs two lines, and many IC can be connected in parallel for control. However, I2C bus debugging is often difficult due to the multi-device and Open drain architecture. This article presents some practical application examples and USES the functions of Logic Analyzer to help troubleshoot problems. Use rotational storage for long time data recording When an I2C bus signal is abnormal, it is often not clear which device is at fault. Therefore, it is impossible to locate the problem points by setting triggers. Users will probably want to extract all the waveforms before analyzing them slowly. But the logic analyzer is basically sampling the signal, whether the signal is changed or not, as the sampling capture action continues, and constantly consume memory. Transitional Storage is a mode of storing waveform data. It only stores waveform data during Transition. In this way, when the data is not in Transition, the logic analyzer can continue to wait without storing any data into memory. Instead of storing the data once for each sampling point, the transition storage will allow more data to be recorded. The transmission speed of I2C is shown in Table 1 below. The overall speed is not very fast, so it will be very suitable for the use of rotational storage to prolong the storable time. Mode (mode) Transmission speed Standard 400 kbit/s Fast/Fast plus 1 Mbit/s High speed 3.4 Mbit/s For example, the I2C bus on the circuit board connects device A and Device B, but In the process of burn-in Test, the I2C bus has the wrong problem. The known phenomenon is that when an error occurs, an invalid Address will appear on the I2C bus, and it will occur several times during the burning process. How can a logic analyzer be used to clarify a problem? Such a problem, if you want to capture all the waveform data down, in fact, it is difficult. Because the time point and the number of problems are not necessarily, and as long as good A few days of machine testing also made it impractical to Log all the data, and it was necessary to look for problem points in a large amount of data. It's also quite a time-consuming and laborious job. Therefore, I2C trigger function in logic analyzer can be used for positioning. First, enter the valid addresses of device A(Addr:12h) and Device B (Addr:34h). The logic analyzer is then asked to find the address that does not meet the above two criteria. The actual Settings are shown in Figure 1. Figure 1 USES I2C trigger function to locate invalid addresses Then, the logic analyzer captures the waveform and then automatically stores the waveform, so that each successful trigger can be saved during the burning process and the trigger point of the archived waveform can be viewed later. Making good use of I2C trigger function can quickly assist waveform positioning, which is much more meaningful than capturing more data. Similarly, make good use of the whole I2C parameter as the Trigger condition, such as address matching or data matching or multi-order Trigger to specify more accurate Trigger, which is a function that cannot be achieved by using Edge Trigger alone. Issue point of I2C triggered inspection time violation I2C bus specifies that SCL and SDA must be sent out at the specified time, otherwise the behavior of the whole bus will be wrong, resulting in communication failure. Sometimes the actual waveform time has exceeded the specification, but it cannot be picked out in the development and verification, because sometimes the time error is small, so that the product can still be used normally. However, problems are often left to mass production, resulting in a high rate of production defects, or even to the user. These are undesirable outcomes in product development. As shown in Figure 2, the time violation check of the logic analyzer can be enabled as a trigger condition to set the time value to be checked, and then the logic analyzer can help to pick out the time violation. The logic analyzer system adopts 200MHz sampling rate for sampling. Therefore, the minimum time width that can be checked is 5ns; This can assist the user to use the trigger to do time violation check, which is suitable for burning machine test, detection of I2C bus signal time in this way. Using The Schmitt trigger circuit architecture to capture good quality I2C signals When using a logic analyzer to make measurements, you often see some noise. But when using an oscilloscope, it seems there is no such thing. What is the reason? How do you eliminate it? This is because the I2C bus is open drain structure, and the bus is connected to a lot of devices, as well as some electrostatic protection parts, etc., which may make the I2C waveform may not be a good square wave. The common I2C waveform is shown in Figure 3 and 4. But such waveform in I2C specification, is normally acceptable, there is no problem. Because of this, generally I2C chip, there must be a Schmitt trigger circuit in the signal input pin, so as to solve the problem of perfect signal input can correctly process the logic signal. For this reason, logic analyzers can also be used to do a more perfect signal extraction operation. FIG. 5 shows the general logic analyzer, which USES a single trigger level to distinguish logic 0 from logic 1. In this way, it is easy to cause many unexpected logic changes near the Threshold of the signal to be tested. The phenomenon of making the retrieved signal sound like noise or bounce. If low-pass filter is adopted, noise can be filtered out, but the high-frequency noise that may cause line problems is also filtered out at the same time. In any case, this is not an appropriate solution. Figure 6 shows the screen after the Schumitter trigger circuit is enabled. In this architecture, two groups of trigger voltages are adopted, namely Thres-high and Thres-low. The interval between two voltages is called the no-turn region, in which no matter how the signal changes, the logic is not affected. In this way, the I2C signal can be captured normally, and the real high-frequency noise will not be missed, which also conforms to the I2C chip design specification. Stack oscilloscope can see I2C digital and analog signals simultaneously After using I2C bus trigger and analysis function provided by logic analyzer. The captured waveforms are subject to problem analysis at the beginning. Many projects involve software and hardware collaboration and involve a large number of people. Not being able to see the corresponding analog signals at the same time is not very helpful in determining the problem. In particular, the problem is caused by the circuit, and the digital signal does not clearly show the problem point. However, the simple logic analyzer stack oscilloscope is not helpful because most of the time the logic analyzer can grasp the length of time is much longer than the oscilloscope, so that even if the oscilloscope shows the waveform, it is not in the right position. Only through the logic analyzer trigger function to locate the signal, so that the captured analog signal is meaningful. Figure 7 is to use the stack and set the trigger to catch both digital and analog signals, the user can send it to the person who needs to see the waveform, I2C bus digital decoding part of the user can quickly understand what he sees the waveform. The analog part of the signal, on the other hand, faithfully represents the original shape of the waveform. The combination of the two becomes the best measurement scheme. |