Determining communication direction in SPI ports

Click For Summary
SUMMARY

This discussion focuses on determining the communication direction in a two-wire SPI bus without a slave select line. The user seeks methods to identify which device is transmitting and receiving data. Suggestions include using back-to-back diodes to identify the clock line and employing small capacitors with series resistors to achieve RC rounding on the data lines. The user acknowledges the complexity of the task due to potential open collector drives and the lack of documentation for the consumer-level devices involved.

PREREQUISITES
  • Understanding of SPI protocol and its operation
  • Familiarity with electronic components such as diodes, capacitors, and resistors
  • Experience with oscilloscopes for signal analysis
  • Knowledge of open collector configurations in digital circuits
NEXT STEPS
  • Research methods for reverse engineering SPI communication
  • Learn about using oscilloscopes for capturing and analyzing SPI signals
  • Explore techniques for handling open collector outputs in digital communication
  • Investigate the use of RC circuits for signal shaping in data transmission
USEFUL FOR

Electronics engineers, embedded systems developers, and hobbyists involved in reverse engineering SPI communication protocols.

fizz_it
Messages
29
Reaction score
0
Hi

I have to reverse engineer/decode the communication on a two wire SPI bus, there is no slave select line to help determine master and slave. How do I determine which side is communicating at any point in time? I think I can determine which side is the clock with a couple of back to back diodes. But the data line is more difficult. I have tried diodes and series resistors but I have difficultly interperating the results. The difficulty comes from probable open collector drives for the data lines.

What can I do?
 
Engineering news on Phys.org
I forgot most of SPI, read up the protocode and the interface, read the serial data with the scope and find out what's going on. Particular if you can control and send out certain command and data. I debugged interface like this before. This is a simple communication link, shouldn't be hard to figure out.
 
I understand the protocol and can list the data that comes out of the communications channel quite easily. The question is how do I determine the direction of the data without a slave select line? One side of the of the communication channel always clocks but I know that there is bi-directional communication. This is a more difficult problem than most people realize as most have never had to do this activity. The two devices are commercially available consumer level products for which there is no documentation.
 
I would temporarily put a small capacitance at each data pin, with a resistor in series between the two devices. Size the caps and resistor to give you just a little RC rounding of the edges. That will show you who is transmitting and who is receiving.
 
I'll give it a try, thanks!
 

Similar threads

Replies
3
Views
1K
  • · Replies 42 ·
2
Replies
42
Views
5K
Replies
2
Views
5K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
2
Views
2K