Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Teensy 4.1 Pinout from BETA -> Production

  1. #1
    Junior Member
    Join Date
    Jun 2020
    Posts
    18

    Teensy 4.1 Pinout from BETA -> Production

    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.

    Click image for larger version. 

Name:	14FlH0g.png 
Views:	45 
Size:	26.1 KB 
ID:	20624

    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.

  2. #2
    Senior Member
    Join Date
    Mar 2016
    Posts
    197
    I would go by what's on the pjrc site. It's what I've been using for my designs.

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,411
    You might look at pin definitions I posted https://forum.pjrc.com/threads/61399...l=1#post243491

  4. #4
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,828
    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.

  5. #5
    Junior Member
    Join Date
    Jun 2020
    Posts
    18
    Quote Originally Posted by KurtE View Post
    You might look at pin definitions I posted https://forum.pjrc.com/threads/61399...l=1#post243491
    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.

  6. #6
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,828
    Quote Originally Posted by MichaelMeissner View Post
    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.

  7. #7
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,411
    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... ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •