Protocol

The Protocol interface uses the device Digital Pattern Generator and Logic Analyzer resources to transfer data using UART, SPI, and I2C protocols.

When the Debug option is enabled, the Logic Analyzer can be used to investigate the signals. In this case, the Protocol instrument will not receive data, it will only send data.

 

1. UART

The UART settings contain the following:

The TX field contains a text box to type the characters to send. With Auto option, the typed characters are immediately sent, or by pressing the Send send button. File content can also be sent using the button below the text box.

The RX field contains the enable button to receive data and the option to print the sent TX data as well. The received data is printed with blue, the sent with green, and eventual errors with red. The unprintable characters codes are displayed between braces.

 

2. SPI

The SPI interface implements a protocol master controller. It allows sending and receiving data in single, dual, and quad modes. The select signal is activate from software, therefore it does not have exact timing with the bit serialization. The larger transfers with more bits that the custom Patterns or Logic Analyzer device buffer are split to separate transfers.
On the Analog Discovery, the Patterns buffer size is 1k or 16k bits, and the Logic is 4k or 16k bits.

The SPI settings contain the following:

The Simple mode lets you create simple transmissions and contains the following options:


The Custom mode lets you write communication script with the following functions:

Under the examples menu, you can find scripts for some Pmods/ICs.


The Sensor mode lets you write communication script, which will be executed at precise timing with the following functions:

When the Sensor is executed, first the loop function is called to build the transmission bit sequence without performing it on the device. The bit sequence length is limited by the device Pattern or Logic buffer size. After the initialize function, the loop transmission sequence is performed for the given number of iterations, then the loop function is called to decode the received data, and finally the finish function is called.

 

3. I2C

The I2C interface implements a protocol master controller. The transfer length is limited to the custom Patters or Logic Analyzer device buffer size. The read operations with sub-address use restart and transfer length is limited to less than half of the device buffer size. The write operations aren't stopped on not acknowledge, but the appropriate error is shown in the software.

The I2C settings contain the following:

The Simple mode lets you create simple transmissions and contains the following options:


The Custom mode lets you write communication script with the following functions:

Under the examples menu you, can find scripts for some Pmods/ICs.


The Sensor mode lets you write communication script, which will be executed at precise timing with the following functions:

When the Sensor is executed, first the loop function is called to build the transmission bit sequence without performing it on the device. The bit sequence length is limited by the device Pattern or Logic buffer size. After the initialize function, the loop transmission sequence is performed for the given number of iterations, then the loop function is called to decode the received data, and finally the finish function is called.