Data exchange between Teensy 4.1 and Rapsberry Pi 4B

Status
Not open for further replies.

MarekM

Member
Hi All,

I need to send (not necessarily receive) data from Teensy 4.1 to Raspberry Pi 4B and to be more specific... about 100 bytes 10 times a second.

I tried using SPI but cannot make it working... (I followed this thread but failed at some point...). I was able to set RPi4 as SPI Master (wiringPi JAVA) and Teensy 4.1 as SPI Slave (C)... and exchange the data till the point of sending/receiving 3 bytes. When I tried sending more bytes from Teensy, I received data in incorrect order as described in SPISlave_T4 thread - and the solution that was introduced there, did not work for me.


My question is... is there a way to send the data as described above other than SPI... I think here of I2C or serial interface (USB wont work in my case).

Has anyone succeed with such a data transfer - if so, could you please share the source code?

Thanks in advance for your help.
 
Use Serial interface. (Not usb serial aka Serial ).
Use a real serial port, ie Serial1.

I have two serials on rpi4: serial0 is already used by other device and serial1, but I have heard that there are issues with serial1 (seems to be not entirely stable - I have read on the net somewhere).
 
I was talking about Serial1 on the Teensy. Perfectly stable.
I don't know about the stability of the rpi serial ports, though you can feed the serial output from the Teensy serial pot to whichever you with on the rpi.
 
Actually RPi4 has 6 UARTS (RPi3 had 2..., but I bought RPi4 recently and did not update myself ;) ). I have already connected RPi4 UART3 with Teensy 4.1 Serial8 and it looks promising. After the quick tests done yesterday connection seems to be stable, but this requires at least a view days testing. Thanks for your pointers.
 
Status
Not open for further replies.
Back
Top