Teensy 4.1 - SPI ports

Status
Not open for further replies.

criscecconello

New member
Hi,

I am intend to use 4 SPI devices and I would like to use 2 SPI in Teensy 4.1, but I would like to confirm the pins if am right or not.


SPI0 - 2 devices
MOSI0 - PIN 11
MISO0 - PIN 12
SCK0 - PIN 13
CS0 - PIN 10 (for the first device)
CS0-1 - PIN 37 (for the second device)

SPI1 - 2 devices
MOSI1 - PIN 26
MISO1 - PIN 1
SCK1 - PIN 27
CS1 - PIN 0 (for the third device)
CS1-1 - PIN 38 (for the fourth device)


Am I right with these pins configurations? In my case, how I set up CS pin in code for the second device and the fourth device?

Thanks for your support.
 
Seems to me, by using the pins-mux pdf found by following the link "A larger, more detailed pinout chart" etc. (and the reference manual), that those CS-pins mentioned for the SPI1 (or LPSPI3 in the mux-pdf or reference manual) are just the two alternate pins for the same signal. The only basic SPI port with more than 1 CS signal available on Teensy 4.1 is that SPI0 (or LPSPI4 in the mux-pdf/reference manual).

In some cases one might be able to use a GPIO pin to play the CS-pin, but that has some limitations.

If the QSPI memory things or SD card slot is not being used, a 3rd simple SPI can be found sharing those pins. In fact, two different SPI capable modules over the QSPI, though tweaking the FlexSPI that does the QSPI to play the role of a simple SPI, while lucrative, isn't trivial (if even possible in a "normal" programming setup?), as I haven't found any direct examples to do so.

Or, maybe some of the suitable FLEXIO pins are still free, and could configure them for an extra SPI port?
 
Status
Not open for further replies.
Back
Top