switching from Teensy 3.2 to Teensy 4.0/4.x

Markyb

Member
I have been using the Teensy 3.2 in a sold product for many years. It works great, thank you PJRC. However, now delivery on the Teensy 3.2 is way out there.

All inputs to the Teensy 3.2 in my product are powered from the 3.3 volt output from the Teensy 3.2.

Is the Teensy 4.x pin for pin and software C++ compatible with the Teensy 3.2? In other words, is the Teensy 4.x a drop in replacement, or do I need to rewrite the software and/or re-layout the PCBs?

Thank you in advance.
 
It's hard to say how much of a 1:1 it will be. I have a project built on the 3.2 had every pin is used for sensors, display, SD, etc. I replaced the 3.2 with a 4.0 and only had to make a few code changes (a watchdog timer and my resolution for analogReadResolution). Display, SD sensors, etc. all worked. Loop functions that sum a variable may need to get addressed since the 4.0 is sooooo much faster.

in my case it was a 1:0.9999 swap.

Hope this helps
 
It's hard to say how much of a 1:1 it will be. I have a project built on the 3.2 had every pin is used for sensors, display, SD, etc. I replaced the 3.2 with a 4.0 and only had to make a few code changes (a watchdog timer and my resolution for analogReadResolution). Display, SD sensors, etc. all worked. Loop functions that sum a variable may need to get addressed since the 4.0 is sooooo much faster.

in my case it was a 1:0.9999 swap.

Hope this helps

Thank you so much.
 
I have been using the Teensy 3.2 in a sold product for many years. It works great, thank you PJRC. However, now delivery on the Teensy 3.2 is way out there.

All inputs to the Teensy 3.2 in my product are powered from the 3.3 volt output from the Teensy 3.2.

Is the Teensy 4.x pin for pin and software C++ compatible with the Teensy 3.2? In other words, is the Teensy 4.x a drop in replacement, or do I need to rewrite the software and/or re-layout the PCBs?

Thank you in advance.

It depends on what you are doing. If you only use the first serial port, use SPI port without using the alternate pins, normal I2C, don't use the DAC (A14) don't use the inner analog pins (AREF, A10, A11) then things are generally fine. If you use other serial ports, rely on 5v digitial inputs, use the audio shield, use DMA specific to the Teensy 3.x processors, or use the optimized pins for some of the SPI displays, then you might have problems.

Some time ago, I wrote up a document that went into more detail on the unofficial Teensy wiki:
 
It depends on what you are doing. If you only use the first serial port, use SPI port without using the alternate pins, normal I2C, don't use the DAC (A14) don't use the inner analog pins (AREF, A10, A11) then things are generally fine. If you use other serial ports, rely on 5v digitial inputs, use the audio shield, use DMA specific to the Teensy 3.x processors, or use the optimized pins for some of the SPI displays, then you might have problems.

Some time ago, I wrote up a document that went into more detail on the unofficial Teensy wiki:

Thank you.
I am driving the 2.8" SPI touch screen sold by PJRC (I like to support them), dual serial ports, one for RS-485, other for RS-232, (plus the standard USB), and a bunch of I2C chips for 18 bit A/D and 12 bit D/A's plus single bit outputs for relays etc. plus 2 PWM outputs for PID style control. The product uses 2 or more Teensy's which talk over the RS-485 port. The user can interface via the RS-232, or tap in as a 485 node, or get 0-5V or 4-20mA from the D/A's.
My plan now is to drop in a Teensy 4.0 (I just ordered a bunch), and test. I am relatively convinced that I will not blow up my boards (which are much more expensive), and can fix any problems in software.
 
Thank you.
I am driving the 2.8" SPI touch screen sold by PJRC (I like to support them), dual serial ports, one for RS-485, other for RS-232, (plus the standard USB), and a bunch of I2C chips for 18 bit A/D and 12 bit D/A's plus single bit outputs for relays etc. plus 2 PWM outputs for PID style control. The product uses 2 or more Teensy's which talk over the RS-485 port. The user can interface via the RS-232, or tap in as a 485 node, or get 0-5V or 4-20mA from the D/A's.
My plan now is to drop in a Teensy 4.0 (I just ordered a bunch), and test. I am relatively convinced that I will not blow up my boards (which are much more expensive), and can fix any problems in software.

The special CS and D/C pins used to optimize the SPI touch screen on the Teensy 3.x processors don't have the same optimization on the Teensy 4.x. The display should still work, it just might be slightly slower (but then the Teensy 4.0 is much faster than the Teensy 3.2 -- however for things like displays, it generally is the display itself that is the bottleneck).

I forgot to mention, I have a google docs spreadsheet that tries to go into detail about what each Teensy supports on each pin. In theory it should be up to date:

 
MichaelMeissner,
Again thank you. Your Google docs spreadsheet is very detailed and helpful.

It looks like I might have some problems, and may need to re-layout the PCB.
I have also spent all day having lead time issues with other chips, so a wholesale redesign based on what is available may end up happening anyway.
 
It's hard to say how much of a 1:1 it will be. I have a project built on the 3.2 had every pin is used for sensors, display, SD, etc. I replaced the 3.2 with a 4.0 and only had to make a few code changes (a watchdog timer and my resolution for analogReadResolution). Display, SD sensors, etc. all worked. Loop functions that sum a variable may need to get addressed since the 4.0 is sooooo much faster.

in my case it was a 1:0.9999 swap.

Hope this helps

What was your solution to the watchdog timer? Is there a watchdog library that supports all Teensy classes?
 
Back
Top