Change from Teensy3.2 to Teensy4.1

I made a large (2’x 5’) RGB display using my own PCB which had a Teensy3.2 connected to circuitry much like the Smartmatrix shield. (I used same logic,different parts). It was working WELL, until I put 12Volts on a digital pin and blew a hole in the Teensy. I had another one but I wasn’t sure if it was working or not. I can write to an I2C display with it, but in my matrix circuit, it does not work. I could have other problems (but unlikely, since I replaced all logic chips) but I really needed a Teensy3.2 to be sure.
There are NONE for sale in North America! I tried all the usual places, including PJRC.
The Teensy 4.1 has the same pinout as the 3.2 so I bought one from Digikey and tried it today with a known working program that compiled with the 3.2. The 4.1 it compiles with many errors.
(eg. first error is C:\Program Files (x86)\Arduino\libraries\SmartMatrixFE\src/MatrixTeensy4Hub75Refresh_Impl.h:269:32: error: ‘FLEXIO_PIN_CLK_TEENSY_PIN’ was not declared in this scope
uint8_t selected_clk_pin = FLEXIO_PIN_CLK_TEENSY_PIN;
I DID NOT change this line in my code, yet: #include <MatrixHardware_Teensy3_ShieldV4.h> .
I see there is a different shield for Teensy4.1…will this be a problem? Did the logic change from 3.2 to 4.1? In other words, is a 3.2 totally replaceable by a 4.1…just change the MatrixHardware line?

I tried to edit my post. It is NOT a Teensy 4.1 I substituted. The pinout of a 4.1 is NOT the same as 3.2.

It is Teensy4.0 that I bought: same pinout as the 3.2.

Continuing with the differences:. Teensy 4.0 has NO SD card slot while the 4.1 does. Am I correct in this assumption? I’m having issues with the change from 3.2 to 4.1 and the Smart matrix LED panel from Adafruit. My first panel quit working properly (only red LEDs work) using the original Smart matrix shield for the 3.2 as it had the SD card slot. Purchased a whole new setup, Smart MN attic LED panel, Smart matrix shield for 4.2 and a new Teensy 4.2. Uploaded the SD sketch successfully, put the whole thing together and got NOTHING. There doesn’t seem to be a power LED on the Teensy and the panel doesn’t light up. NOTHING. I’m stumped and cannot revert back to my old SM Shield. I’m not sure what part is defunct. LED board, SM Shield or Teensy 4.1.

When changing between the two you need to be sure you are using the latest version of the library, have configured your code to have the right include for your hardware setup and you might well need to change your shield. I needed to use the Teensy4 to SmartLED Shield for Teensy3 adapter

As I understand it, there are major differences between the Smart Matrix support for Teensy 3.x and Teensy 4.x. The pinout is completely different. In part this is due to the chip internals that the Smart Matrix team uses (things like DMA resources, PWM, etc. are completely different). I haven’t peered under the covers in terms of what the library does.

The simplest approach may be to buy the Smart Matrix Teensy 4.x shield (it will work on both 4.0 and 4.1) that is available in several places (crowd supply, adafruit, sparkfun, digikey, and perhaps mouser).

At a higher level (for Arudino usage), I put together this list of differences on the un-official Teensy wiki:

[*] (Teensy Compatibility · TeensyUser/doc Wiki · GitHub)

If you only need one Teensy 3.2, I probably have one that I can spare that I can send you. But I don’t think I have more than 1 that is unallocated.

i had a similar problem. I used a Teensy 3.5 for the SD card slot. We use them at work to run animated gifs on 30-35 different Matrix’s. We could not find any recently, so i designed a hat to work with a ESP32 Dev board and a micro sd module. Works great ( I need to make a few physical changes). And esp32’s are cheaper and more readily available. Is it possible for you to switch to those?

Thanks. I think this is the answer I was expecting but hoping was NOT true, ie that pin functions change. I’m pretty good at making converter dongles, so I guess I’ll have to bite the bullet and make one. PJRC says no Teensy 3.2 until 2023!!! No chip supply.