Thanks for the tips.
So how fast must it be? How much hard work must the RPi and the Teensy do apart from communications ?
Good questions. I have several projects in mind and it may vary. One for example is a POV display with a rotating line of APA102 LEDs, to be updated as fast as possible (this chip has 20 KHz PWM and data can be clocked at 20 Mbps, so > 1000 updates per second is reasonable). There's no fixed speed requirement, but the faster I can get data to it, the more resolution - so I was wanting to explore just how fast that can be. There are other potential projects as well. And it's a matter of technical curiosity...
USB in serial mode should work very well, the Teensy can deliver up to 10Mbps over serial usb,
with the RPi beeing Linux, USB serial should work as a charm.
OK, that is a leading contender; that's about the throughput others have given for
Teensy + Wiznet 820io ethernet.
Does anybody have any practical experience with fast USB serial between RPi and T3.1 specifically?
Async serial is in general a simple and easy to use, and can be clocked quite fast with short cables.
I'm guessing that async is still going to be limited to around 1 Mbps, tho, right? Can they go any faster?
And there probably isn't any route to
isochronous serial between the two (UART based but with one clock per bit rather than using 8x or 16x edge detection; the ATMega328p has this via XCLK).
RPi I2C hardware is a bit buggy, not handling clock stretching correctly, tested to be not 100% reliable.
Let's rule that out then. It was never a leading contender anyway.
I dont know why the shared memory PRU's on the BBB would be a problem, you dont have to use them and if you do
they can with some hard work be made to do some nice tricks, including fast communications.
Actually, I realize that given enough effort, it might be the best solution technically - the shared memory is a big plus. It's the learning curve that puts me off. I'd rather if possible continue to use the Teensy 3.x which is more familiar to me, is used in other projects, has many libraries I'd like to make use of, etc. I'm also not a linux expert, and the RPi has a larger community.
So
this thread is about exploring what's possible in terms of high speed RPi <-> Teensy connections - for my projects or anybody's projects. I couldn't find such a thread on the forum. (Pointers welcome tho).
There is another option I'd like to hear about from those with more knowledge -
SPI. How fast can a RPi master communicate with a Teensy 3.1 via SPI? I'm assuming the slave Teensy might need to use DMA to keep up with fast timing set by the RPi master, especially if the master is reading info from the slave.
The last option (not included in OP) would be an
8 bit parallel transfer. I don't know if that's possible (at high speed). There was a time when we could crank out some decent transfer rates over the simple IBM PC parallel port (decent for its time).