Jump to content
  • 0

SPI Protocol read from master and slave


martinpi

Question

Hi everyone,

I am new to AnalogDiscovery and new to SPI. So it is a beginner's question, I apologize.

I am debugging an SPI connection which works most of the time, but not always.
The setup is fairly simple, it is an Arduino communicating with an RFID-RC522 module.
I would like to know if the master (Arduino) fails to send or the slave (RC522) fails to respond.

I use protocol --> SPI and and click the "Command" checkbox to observe the communication.
I did not find a means of triggering the protocol viewer.
The data quickly scrolls out of the screen and I am hardly quick enough to click the stop button or make a screenshot.

So I thought of writing a script which puts the result in a file which I can examine later.
Or, better,  the script would write only interesting data to the file.
As far as I have seen, there are commands to read from the slave or act as a master, but not read from master and slave.
And I need to specify the number of bytes when reading, but I do not know how many bytes will be sent.

Thank you.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hi @martinpi

The Protocol SPI can be used in Spy mode. The other modes (Master, Custom, Sensor) the device behaves as a master.

You can increase the history, the max lines, to have more to scroll up.

You can also use the Logic Analyzer to trigger on specific SPI data, like to trigger when the 2nd byte/word is a specific value.

image.png.cbc118b52120df236b7bcaee6d2ac9bd.png
 

Link to comment
Share on other sites

On 2/18/2020 at 11:21 AM, attila said:

Hi @martinpi

The Protocol SPI can be used in Spy mode. The other modes (Master, Custom, Sensor) the device behaves as a master.

You can increase the history, the max lines, to have more to scroll up.

You can also use the Logic Analyzer to trigger on specific SPI data, like to trigger when the 2nd byte/word is a specific value.

image.png.cbc118b52120df236b7bcaee6d2ac9bd.png
 

Thanks, increasing the history to unlimited is the thing I need!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...