Jump to content
  • 0

Analog Discovery 2, I2C errors appear at Protocol Spy Tool


Vanko2

Question

Hi there folks,

great to meet you. 

Recently the company i work bought an Analog Discovery 2 to work with, and all I can say is - This is a great instrument, although I am using very small amount of its power.

I have noticed something that lost me 2 days of work to discover that the problem is not my communication but in the way that the data is read by the AD2.

The setup is like this - I have two boards communicating over I2C to each other and I am monitoring the messages in the Protocol part of the Waveforms.

When i am sending large packets with more than 5 bytes of data there are some errors appearing on the tool but the messages actually are all right.

My guess is that the discretization frequency is too small so it is getting errors in messages (i have seen this too when I have used the logic analyzer  part of the software, although the I2C speed is 100kHz,  when the scan frequency is smaller than 400kHz the protocol is not decoded in the right way.) There is no way(as far as I have tried) to adjust the frequency in Protocol mode. I am uploading pictures, hope it gets clear.

Another thing is that the buffer that it stores the information from the protocol is quite large and the tool(waveforms) starts to work slowly, maybe it will be good to be able to adjust the size and flush the buffer more frequently.

I will be glad to here from you is there a way to fix this issues. Thanks in advance.

AD2_false1.jpg

AD2_false2.jpg

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @Vanko2

I think I managed to reproduce the problem you are describing, by using long wires or having ground connection only through USB.
Such setup could cause ringing/glitches which are interpreted as clock pulses.

Make sure to use short wires and have ground connection between the AD2 and the analyzed circuit.

image.thumb.png.168e4f1987f6acf113f6409c01dbfac3.png

In the Logic Analyzer, for 100kHz I2C use at least 400kHz to make sure to capture I2C low/high correctly.

image.thumb.png.4bf47b825f758501ff5a2b2fef115924.png

 

For the next software version I have enabled the Frequency in Protocol/I2C/Spy which will be used to filter such glitches, less than 10% of the specified frequency.

With noisy signal having specified 10MHz, only filters 10ns glitches:

image.png.e5a40534051b76c40abf91601b5d6343.png

Filtering 250us glitches:

image.png.da6890a44d69644bddb6dc6c5982f39e.png

 

You are right, too much captured text can slow the application down, leading to losing data. I will have to add some history limitation.

Link to comment
Share on other sites

Hi @attila,

You are great man!

Thanks for noticing me and that you have tracked the problem so fast. I am using the stock provided cables with not more than 10sm extension to the ground, but the ground of the analyzer is directly to the ground of the board.

I am so happy that there will be solution for that. When is the next version of the software expected? I am not in a hurry, just asking :)

Have a great day!

Link to comment
Share on other sites

Hi @Vanko2

I'm in the middle of implementing other improvements but I will try to do a beta release Monday or Tuesday.

You could use the Scope to analyze the I2C signals, connect the negative input (1-) the AD2 ground and positive (1+) to the SCL.

With very long ground, 3 meters of USB cable between I2C device and AD2, some external noise time to time hits the SCL edge which causes glitch on the digital reading.

image.png.7bf0e0c3d42468ae65eadcba65552115.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...