Teensy 4.1 Pinout from BETA -> Production

Status
Not open for further replies.

Dylpickle

Active member
Hey Guys,

I'm using Kicad to plan out something i've written on my t4.0 which will be migrated to the 4.1 when it arrives next week.

I'm using this part symbol library below for my schematic. I noticed its for the beta and the SPI pins seem to differ to the 4.1 pins here.

14FlH0g.png

If someone could verify which is correct ill edit the symbol and if the original creator is good with it he might be able to add it to his.
 
In the Teensy 4.0:
  • There are 28 pins on the outer edges;
  • There are 5 pins at the back;
  • Pads 24 - 33 are underneath the back of the Teensy 4.0 with a 2.54mm pitch;
  • Pads 34 - 39 are underneath the front of the Teensy 4.0 with a 2.00mm pitch (plus ground, 3.3v) -- these pins are for the micro SD card;
  • The D-/D+ pads are for the USB host connection;
  • There are no pads for the standard USB connection.

The Teensy 4.1 is mostly similar, but there are differences:
  • The 28 pins on the outer rows have the same pin number (pins 0/1 are now alternate pins for SPI1);
  • The 5 pins just before the micro SD card reader are the same as the 5 pins at the back of the Teensy 4.0, but they are in a different location;
  • Pins 24 - 33 are the same as the pads on the Teensy 4.0;
  • Pads 48 - 54 are for attaching the psram and/or flash memory chips;
  • The Teensy 4.1 has new pins 33 - 41 (pin 39 is the standard MISO1, pin 38 is the preferred CS1) -- these pins are not available on the Teensy 4.0;
  • The micro SD card has the pins 42 - 47. You cannot access these pins without a break-out board;
  • The Teensy 4.1 has pins for the USB host output inside the Teensy;
  • There are 2 pads for the D-/D+ used for the standard USB connection;
  • There are 6 pins for the ethernet header.

So if you are using SPI1 in Teensy, you will need to use 'SPI.setMISO(1)' to continue to use pins 0/1. Or switch to using pins 39/38 for the Teensy 4.1.

If you access pads 34 - 39 on the Teensy 4.0, you will need to change them to pins 42 - 47, and if you use it for something other than a micro SD card, you will need to use a breakout card to get access to those pins.
 

Yeah, thats what i was using as my point of reference. I just saw that 38/39 were MISO1 and CS1 were in red and differed to what the symbol showed.

Im using a daisy chain of 595 and 165s so i just worked out i can use 0,1,27 for the 165 and the usual 10,11,13 for the 595.

Was still interested to see if it had changed or not.
 
So if you are using SPI1 in Teensy, you will need to use 'SPI.setMISO(1)' to continue to use pins 0/1. Or switch to using pins 39/38 for the Teensy 4.1.

Whoops, that should be you will need to use 'SPI1.setMISO(1)'.

In terms of 'favored' CS1 pin (i.e. 0 on both Teensy 4.0 and 4.1 and also pin 38 on the Teensy 4.1), only a few devices seem to use the hardware CS pin. IIRC, the displays that have the optimizations, want to use the hardware CS pin for the D/C pin to allow the use with DMA and not the actual CS pin.
 
Note: I believe when I first setup the SPI library for T4.1, I left the SPI1 default pins the same as for T4.
That is you don't need to do SPI1.setMISO(1); but you do need to call SPI1.setMISO(39);

Also note, with CS pins, like all teensy boards, unless your sketch/library actually uses the CS pin using Hardware CS stuff, you can use any digitalPin.

To be more specific if your sketch/library does something like: digitalWrite(cs_pin, HIGH); Or use digitalWriteFast or touches the port registers to control the CS pin you can use any digital pin. I have seen (updated) a few display drivers who fail their init code with a non hardware CS pin selected but never need/use it in hardware way.

Also note Hardware CS pins on T4 are processed different than they are on T3.x. And whereas with T3.x as part of your adding stuff to output Queue (PUSHR) you can specify the state of up to 4 CS pins, with T4.x you can choose which (singular) CS pin should be asserted through different register... ...
 
Status
Not open for further replies.
Back
Top