Teensy 4.1 to Raspberry PI 5

damo1976

Well-known member
Hi all,

I am looking for a solution to connect a Teensy 4.1 to a Raspberry PI5.
I have used all the hardware UART on the Teensy 4.1.
I would prefer not to use the USB connection on the Teensy because I want to use that to connect to the PC.
I am looking at SPI but what would be much more convenient would be to have one more UART connection to link the boards together.
I am trying to get my head around the FlexIO libraries but its a bit of a mindfield for a novice like me. I just want something simple that will give me a fast connection between the 2 boards.
I have designed my own protocol accross my project that is a 6 byte package so that is all that will be transmitted back and forth.
Any help or suggestions welcome.
 
I am trying to get my head around the FlexIO libraries

FlexIO used as additional serial ports is easy by using Kurt's FlexIO_t4 library. It's included with Teensyduino install. In Arduino IDE, just click File > Examples > FlexIO_t4 > Serial to get started.

Some of that library's examples are a bit complicated, but newer ones like this MIDI transmit example are quite simple. The main 2 things to know about FlexIO for more serial ports is which pins have FlexIO support (serial is simple, you can use any of the pins) and slowing the FlexIO clock if you need access to baud rates less than about 59000.
 
even if ethernet port is already used on Raspberry you can have multiple devices on an ethernet network., this is the cheapest fastest and more robust solution

if you don't want to use ethernet

If you have very few data a serial can be enough
else solution for longer cables and more robust than serial can be to use canbus
 
Back
Top