Teensy4.0: Connecting Pin24-Pin33

Status
Not open for further replies.

Uwe

Active member
Hello,
I want to use pin26&27 on a Teensy4.0. They are on the backside of the board and only available as a solder pad.
Is there a standard component which I can solder to these pins which "interfaces" to a pin header?
Or do I have to solder cables to it? What is the best solution?
Any idea/experience is welcome :)

Uwe
 
Well the simplest way is to use the Teensy 4.1 now that it is available, and it has those pins as part of the normal pinout..

Last July, I added this page to the unofficial Teensy wiki on the various carrier boards available for the Teensy 4.0:

Most of these boards are PCBs that you solder on to the back of the Teensy and provide holes that you can solder normal header pins to. If you ever plan to get a Teensy 4.1, this PCB is perhaps the most compatible, in that pins 24 through 32 on the left side and pin 33 on the right side are in the same position as those pins on the Teensy 4.1. Note, pins 34 through 39 are not the same pins on the Teensy 4.0/PCB and in the Teensy 4.1. On the Teensy 4.0 those are the SD card reader pins, while on the Teensy 4.1, they are separate pins not available on the Teensy 4.0. The SD card reader pins are routed to the SD card reader:

While it isn't compatible with the Teensy 4.1, this board from Talldog, exposes the bottom pins:
 
Thank you for your answer!
Switching to 4.1 could be a good idea but I have to check a compatibility questions first:
Is it possible to use a SRAM on the audio shield in combination with a SD-Card on the 4.1?
At the moment I have them both on the audio shield.
If I use the 4.1 I could remove the SD-Card from the audio shield. (I have my own board based on the audio shield but with some extensions)
Maybe I should make this question a new thread...
 
The SD library can use either SPI or SDIO, depending on whether your code uses SD.begin(cspin) or SD.begin(BUILTIN_SDCARD).

SPI and SDIO are completely independent, so if you have a SD card on SDIO it should not interfere with access to a memory chip on SPI.

But with either Teensy 4.0 or 4.1, adding a SRAM chip on SPI probably doesn't make a lot of sense. The existing code in the audio library only supports one SRAM chip which is relatively small and fairly slow. It is only usable for audio delay. That made more sense with Teensy 3.0, 3.1, 3.2 where the on-chip RAM is limited (16K or 64K) which left little RAM for audio delay. On Teensy 4.x where you have 1024K of RAM, incurring so much overhead just to add a slow 128K RAM chip probably doesn't make sense.

If you really need more RAM, adding the PSRAM chip(s) to Teensy 4.1 is definitely the way to go. The chip has 8192K and uses 4 bit I/O at a much higher clock speed. The on-chip hardware maps the PSRAM chip as if were real memory, so you're not going through the SPI library. The Cortex M7 cache is used to speed up most types of access, so while the PSRAM isn't nearly as fast as on-chip RAM, you only suffer that slower speed for cache misses. For many types of access, it gives pretty good performance (but some there are some exceptions like huge FIR filters where the cache helps much less). If 8BM isn't enough, you can solder 2 of them and they're accessible as 16MB memory. The best part is you can just create variables and arrays with EXTMEM or call extmem_malloc() and then use the variables the same way as any others in normal on-chip memory. With slow SPI, all must be done by special code calling the SPI library functions.

But to answer your original question, if you really are using a slow 23LC1024 (or similar) RAM chip on the SPI pins, switching the SD card from SPI to SDIO will not cause a problem. If anything, it may help, because the SPI pins won't be need some of the time for SD.
 
Thank you Paul for these valuable informations!
I think I will go for the "adding SRAM+SD to Teensy 4.1" solution. So move them from the audio board to 4.1.
If I got you correctly that will also free up the first SPI port, right?
In that case I don't even need pin26&27 (for the second SPI) which was my initial problem.
 
Yup, that will leave SPI unused. Both the built in SD card and PSRAM have their own dedicated higher bandwidth connections which are completely independent of SPI.
 
Is it possible that "AudioPlaySerialflashRaw" is not working anymore if I move the PSRAM away from the audio shield?
 
That is indeed a problem.
I wrote my own component that uses the PSRAM from Teensy4.1 instead of the audio shield.
It's based on "play_serialflash_raw" and needed only some small modifications.
If you are interested I can post it here.
 
Status
Not open for further replies.
Back
Top