Use the Beagle I2C/SPI Protocol Analyzers and Total Phase Software API to Accurately Monitor SPI Devices

Question from the Customer:

I will be using two Beagle I2C/SPI Protocol Analyzers to monitor SPI devices, the data from two A/D converters. I will be using the Beagle Software API and C#. Normally, I only use one Beagle analyzer - I have some questions about doing this and about the data measurements.

  • How do I identify each Beagle? I need to know which data stream is coming from which device.
  • I did not find an API command to reset the timestamp counter - is there a way I can do that?
  • How can I get the most accurate data readings?
  • Using two Beagle analyzers, can I use different threads or must all the calls be on a single thread?

Response from Technical Support:

Thanks for your questions!

  • Port numbers are assigned by the Beagle software API, but a port number is not guaranteed to always be the same for each Beagle I2C/SPI Protocol Analyzer connected to the PC. However, the serial number of a Beagle analyzer is fixed. To identify the Beagle analyzer, use the command  bg_unique_id(). This function returns the serial number of the Beagle analyzer, which will tell you which Beagle analyzer is on which port.
Beagle I2C/SPI Protocol Analyzer Figure 1: Beagle I2C/SPI Protocol Analyzer
  • To reset the timestamp counter you can use two commands: bg_disable and bg_enable. That will reset the Beagle analyzers, which will also reset the timestamps. For more information about Beagle API commands, please refer to section 6 of the Beagle Protocol Analyzer User Manual.
  • The accuracy of the Beagle analyzer and the Data Center Software can be configured by changing the Data Center sampling rate. The maximum rate is 50 MHz, which provides a 20 ns resolution. For more information, please refer to section 8.2.1 of the Data Center Software User Manual.  Note: these settings can be adjusted in the API as well.
  • Both single-threading and multithreading are supported. Single-threading allows maximum cross-platform compatibility. For multithreading, each API call can be wrapped with a safe locking mechanism before and after each invocation. For more information, please refer to section 4.8 of the Beagle Protocol Analyzer User Manual.

Additional resources that you may find helpful include the following:

We hope this answers your questions. If you have other questions about our protocol analyzers or other Total Phase products, feel free to email us at sales@totalphase.com, or if you already own one of our devices and have a technical question, please submit a request for technical support.

Leave a Reply