Teensy 4.1 documentation of SPI ports doesn't seem to match the Reference Manual

MarkW307

New member
I am very confused. After reviewing the Reference Manual and the color coded images on PJRC regarding the 4.1, I am unable to match up the SPI ports.
On this page, https://www.pjrc.com/store/teensy41.html, there are images of the Teensy with the SPI ports called out but they don't seem to match the manual.
For example, Pin 26 is labelled as MOSI1, but it is Pad AD_B1_14 which connects to LPSPI3 SDO (MOSI), via SW_MUX_CTL_PAD_GPIO_AD_B1_14 from page 505 of the Reference Manual. Likewise, Pin 39 (pad AD_B1_13) is shown as MISO1, but the manual shows it potentially connected to LPSPI3 as well. (Page 504).
I am using Document Number: IMXRT1060XRM Rev. 1, 05/2022.
Is there some convention of labelling for the Teensy that is there for historical reasons?
Thanks.
 
The motivation is that I am trying to connect an AD7380 to two SPI ports to take advantage of the increased data rate, but I'm having trouble determining which SPI ports are in use when an Audio Adapter and external QSPI RAM is in use.
 
Note in many of the subsystems, like, SPI, or I2C or SPI, there are often two different things.
The Arduino objects, like SPI, SPI1 and SPI2

And then there is the IMXRT object. From My own Excel document, we have SPI using pins 11-13 (and CS or two...)
1719873081774.png

And from a different page that shows the MUX settings (what each pin can do depending on what mode it is in)
1719873240006.png


From this you will see that for the SPI object we are actually using IMXRT object LPSPI4.
In the same way as the Serial1 object uses the hardware object LPUART6

And as you noticed Pin 26:
26/A12AD_B1_14FLEXSPIA_SCLKACMP_OUT02LPSPI3_SDOSAI1_TX_BCLKCSI_DATA03GPIO1_IO30USDHC2_DATA6KPP_ROW00ENET2_1588_EVENT3_OUTFLEXIO3_FLEXIO14

So yes SPI1 uses the hardware object LPSPI3.

The memory chips on the bottom both supports LPSI as well as FlexSPI
1719873650640.png

1719873713342.png

So we do have SPI2 using the LPSPI1 object
But these pins can also be used in FlexSPI2, which is what is used if you have memory or storage chips on them.

Audio Adapter. Is setup to use the SPI object on pins 11-13, As mentioned on the Audio product page, these pins are shareable.
1719873905515.png


Hope some of this helps
 
Thanks, Kurt. I had a feeling it was a mapping of physical ports to Arduino objects, but being unfamiliar with Arduino I was unable to make the connection (pun intended). I have been using the color coded spreadsheets that I believe you developed to try and understand this.
Is there a quick reference to show which ports map to which Arduino objects?
Since I need both the external RAM and the Audio adapter I only see LPSPI3 available so I will look at FlexIO as a possible solution to have a SPI with two receive channels.

Thanks again,

Mark
 
Back
Top