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

Thread: SPI2 Pins on Teensy 4.1?

  1. #1
    Junior Member
    Join Date
    May 2020
    Posts
    2

    SPI2 Pins on Teensy 4.1?

    I was happy to see the pads on the backside of the Teensy 4.1 for a flash memory chip.
    I attempted to put a Cypress 8 Mbit FRAM chip on instead of the flash and use then use the SPI2 pins... but they don't seem to be the same on a Teensy 4.1.

    here is the configuration code fragment:


    #include <SPI.h>
    #include "Adafruit_FRAM_SPI.h" // This works with the pins noted for Teensy 4.0, but not 4.1

    uint8_t FRAM_CS = 44; // SPI2 CS is pin 36 for Teensy 4.0 and 44 (?) for Teensy 4.1 I think
    Adafruit_FRAM_SPI fram = Adafruit_FRAM_SPI(FRAM_CS, &SPI2); // use hardware SPI2

    uint8_t FRAM_SCK = 45; // SPI2 SCK 37 is pin for Teensy 4.0 and 45 (?) for Teensy 4.1 I think
    uint8_t FRAM_MISO = 42; // SPI2 MISO is pin 34 for Teensy 4.0 and 42 (?) for Teensy 4.1 I think
    uint8_t FRAM_MOSI = 43; // SPI2 MOSI is pin 35 for Teensy 4.0 and 43 (?) for Teensy 4.1 I think

    I must have the pins wrong or .... ?

    Is there a schematic with right numbers or am I mistaken altogether about trying to put the FRAM on the flash pads? The pinouts are identical.

    Thanks in advance for any help.

  2. #2
    Senior Member
    Join Date
    Dec 2015
    Location
    LA
    Posts
    169
    Don't know about your FRAM but there is something about if just one ram chip it has to be on the smaller pad location.

    https://www.pjrc.com/store/psram.html

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,490
    Those pins when used for QSPI PSRAM or FLASH are not using the SPI2 bus at all. They map direct as QSPI devices with FlexSPI hardware pin function from the 1062.

    If the FRAM can do QSPI it may map - but would take different setup. If those pins maps as SPI2 ( need to print the KurtE card back ) it would take wiring connect and setup as needed to do that device.

  4. #4
    Junior Member
    Join Date
    May 2020
    Posts
    2
    Thanks.

    Well, I guess I'll desolder it and put on a breakout board. It does not use QSPI. The pads on the back board are great, but apparently not usable as I had hoped.

    Thanks again.

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,490
    If the pinout matches that pin set does have SPI2 support. See :: KurtE/TeensyDocuments/blob/master/Teensy4%20Pins.xlsx

    If there is an SPI library for it - it may work if moved to SPI2 pins and one of the pins worked for CS.

Posting Permissions

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