Dangerous Prototypes

Other projects => Open Bench Logic Sniffer => Topic started by: neoirto on July 16, 2013, 12:18:57 pm

Title: I2C 400 KHz + 4 Digital channels recording limits ?
Post by: neoirto on July 16, 2013, 12:18:57 pm
Hi all,

I'm looking for a logic analyzer to sniff, decode, and record an I2C bus with high traffic at 400 KHz.
In the same data records as I2C, I'd like to record 4-6 Digital channels at the same frequency, and then I'd like to be able to decode :
- I2C traffic between one I2C peripheral (saying 0x04 adress) and his master. In the analyze step, will it be possible to exclude all other peripheral address traffic than Master and 0x04, to be able to only debug my peripheral easily ?
- if not, perharps can I generate a raw recording file I can easily parse and clean later with C program on my own, or even on an Excel sheet (old ways...) ? And after this treatment on my own, will it be possible to re-import this cleaned data for a further graphical analysis ?

In the same data records as I2C, is there any limitation to record 4-6 digital channels during long times (several seconds) ? I heard some sniffer was limited by buffers, and can not record long time data samples ?

I will run under Win 7, if it helps.

Thank you in advance for your answers :)
Title: Re: I2C 400 KHz + 4 Digital channels recording limits ?
Post by: Qwlciguk on July 16, 2013, 04:51:29 pm
[quote author="neoirto"]Hi all,

I'm looking for a logic analyzer to sniff, decode, and record an I2C bus with high traffic at 400 KHz.
In the same data records as I2C, I'd like to record 4-6 Digital channels at the same frequency, and then I'd like to be able to decode :
- I2C traffic between one I2C peripheral (saying 0x04 adress) and his master. In the analyze step, will it be possible to exclude all other peripheral address traffic than Master and 0x04, to be able to only debug my peripheral easily ?
- if not, perharps can I generate a raw recording file I can easily parse and clean later with C program on my own, or even on an Excel sheet (old ways...) ? And after this treatment on my own, will it be possible to re-import this cleaned data for a further graphical analysis ?

In the same data records as I2C, is there any limitation to record 4-6 digital channels during long times (several seconds) ? I heard some sniffer was limited by buffers, and can not record long time data samples ?

I will run under Win 7, if it helps.

Thank you in advance for your answers :)[/quote]

The answer is a little complicated.  The OBLS has some 200K bytes of internal memory storage.  There is no mode that allows live "streaming" of data to the host PC.  It is a simple 200K storage block.  You can capture no more than that.  This 200K storage can be divided up different ways depending on how many channels you're using.  For a simple 8 channel capture, you get a full 200k samples.  If you configure it for 16 or 32 channels, you can capture proportionally less samples.  This is for the standard non-RLE capture mode.  For RLE mode, it only captures data if it changes, though there is a limit even there.  If you configure for 8 bits with RLE, you can capture 200K "changes" in signal.  If the signals are qiescent for a long period of time, the timer rolls over and it consumes a sample anyway.  In 8 bit mode, you get a max of 127 sample clocks before rollover.  So, 1 sample gets recorded every 127 clocks even if there are no changes detected.  In 16 bit mode, you get 32767 clocks before rollover, but of course the total number of samples that can be recorded is cut in half due to the doubling of the channel count.  Similarly for 32 channel mode, the timer rolls over after 2^31 - 1 counts at the current sample clock.

In practice, it's hard to predict which limit you will run up against, "signal changes" or rollovers.

As far as live capture filtering on particular traffic, no the OBLS has no provision to understand anything about I2C and so cannot do any filtering of what gets captured.  That is the job of a proper protocol analyzer.  You can of course, capture everything, export the captured data, post-filter it and reload it back into the client software.

All that said, from your description of what you're trying to do, I predict that the OBLS will not work for you.  Given the low speed of I2C, you'd be better off with one of the commercial low speed streaming logic analyzers available.  Yes, they're more money, but they're more likely to be able to do what you want.
Title: Re: I2C 400 KHz + 4 Digital channels recording limits ?
Post by: neoirto on July 16, 2013, 05:21:14 pm
Thanks for your very clear reply Qwlciguk,

So I would better choose something like the Saleae Logic, with 10 billions samples (sorry, I can't place an url as a new member) at 119€ ?
Do you know any other model that could match my needings at lower price please ?

When you say :
Quote
There is no mode that allows live "streaming" of data to the host PC. It is a simple 200K storage block.

Does it mean some logic analyzers can send all the channel's data to PC via an USB connection ? Is it what the Saleae Logic does ?

Tx again ;)
Title: Re: I2C 400 KHz + 4 Digital channels recording limits ?
Post by: Qwlciguk on July 17, 2013, 12:32:11 am
[quote author="neoirto"]Thanks for your very clear reply Qwlciguk,

So I would better choose something like the Saleae Logic, with 10 billions samples (sorry, I can't place an url as a new member) at 119€ ?
Do you know any other model that could match my needings at lower price please ?

When you say :
Quote
There is no mode that allows live "streaming" of data to the host PC. It is a simple 200K storage block.

Does it mean some logic analyzers can send all the channel's data to PC via an USB connection ? Is it what the Saleae Logic does ?

Tx again ;)[/quote]

Yes, it is my understanding that the Saleae Logic devices will stream continuously to the host computer, albeit at 24 MHz max sample rate.  So, in that case, you're limited only by the disk storage available on the host computer.  The OBLS is limited to the internal memory on board its FPGA.

My only direct experience with non-professional logic analyzers is with the OBLS.  In my day job, I regularly use a top of the line Tektronix Logic Analyzer that costs upwards of $180K.
Title: Re: I2C 400 KHz + 4 Digital channels recording limits ?
Post by: neoirto on July 17, 2013, 01:07:40 pm
Quote
Tektronix Logic Analyzer that costs upwards of $180K

Wouuuush.... That much ?
I think, the Saleae Logic will be enough for me. Another model with analog I/O could have been great, for a few bucks more, but it will make the job !

Tx again Qwlciguk

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01002056872session_write_close ( )...(null):0
20.01032188448ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01042189224Database_MySQL->query( ).../DatabaseHandler.php:119
40.05542327944Database_MySQL->error( ).../Db-mysql.class.php:273