Electronics > Microcontrollers

Need suggestion for USB SPI adapter that can work as full duplex SPI slave

(1/11) > >>

wb0gaz:
I have a microcontroller application that functions as SPI master (MOSI/MISO/SCK/SS) at 2 MBPS clock rate, and is intended to transfer data full-duplex (one byte clocked in for each byte clocked out.) The microcontroller application asserts SS, transfers some data (potentially a finite length, potentially open-ended, streaming-style), then releases SS, and will do these transactions "forever".

I need a device that would bridge this full duplex stream to a PC so the stream could be manipulated with an application on a PC (record the output stream to a file, play back a recorded stream from a file, do both of these at once, function as a SPI slave loopback device, etc.) Ideally the device would expose an API that would do things supporting this (notify when SS changes, notify when a byte has been received on MOSI, provide a way to send a byte on MISO that would be clocked out, etc.)

I've been searching for USB SPI adapters, but these seem geared to providing electrical interface for programming SPI flash memory modules and the like (the adapter would serve as SPI master in this case, which isn't useful for my requirement.)

So, any suggestions/ideas that does not involve creating the tool, rather something that can be bought, used, and be supported by vendor or community?

Thanks!

RoGeorge:
Raspberry Pi is a SBC (single board computer), and it has SPI, so you can connect your microcontroller to the Raspberry Pi SPI pins directly, with wires, without going through USB (beware that Raspbery Pi pins are 3.3V, not 5V - if your SPI works with 5V SPI, then use a level translator instead of direct wires, Raspberry Pi inputs ar NOT 5V tolerant).  There are many models of RPi, from $5 to $100.

RPi is a full computer, so it can run Linux, Python, whatever, and can process your data.  Or, it can just read the SPI data then send that over LAN or Wi-Fi to another computer.

wb0gaz:
Thank you, RoGeorge.

If I cannot find a commercial product that performs this function, that would be a good alternative, but at the expense of some integration work.

mon2:
Maybe TotalPhase has a suitable tool ?

https://www.totalphase.com/products/aardvark-i2cspi/

wb0gaz:
Thank you, mon2. I'll contact the vendor to get help determining suitability (I have questions primarily about latency, jitter and full-duplex SPI getting handled over a USB connection.)

While the thread is open, I'd be grateful for any other suggestions/ideas, as well as any help in pre-qualifying a solution (I'm concerned about how USB 1.1/2.0 (being half duplex) might impact my application which needs continuous full duplex streaming.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version