Custom Teensy 4.1 Woes

yeahtuna

Well-known member
Custom Teensy 4.1 Bootloader issues

Hi All,

Thank-you in advance for any help / guidance you can provide. I'm having trouble with a custom T4.1.

The issue is that pressing the program button on the device, rarely (about 5% of the time) causes the device to program. The other 95% of the time when I press the program button on the device, the bootloader LED flashes 3 times, and then the device reboots without loading HalfKay. Instead it just runs the code that's already on the device and the bootloader flash sequence never repeats.

I'm not sure where to start looking. I'm think it's probably a signal integrity issue, but I don't know where to start.

Board Specs
4-layer 1.6mm, signal, GND, VCC, signal

Suspect 1: Flash Layout
Here's a the measurements of my data and clock lines for the SPI Flash.
flashTraceLengths.jpg

And here's the Flash Memory layout. I tried to mimic the T4.1 design as much as possible.
flashLayout.jpg

Suspect 2: Bootloader Layout:
I'm showing this one from layer 4 because most of the signals to the bootloader are routed there.
bootloadLayout.jpg

Suspect 3: USB D+/D- lines
Here are the trace specs. I wonder if the thin trace width is part of the problem. They are spaced 5mils apart.
usbTrackLengths.jpg
And here is the USB data lines layout.
usbDataLines.jpg

I'm really at a loss as to how to solve my problem. I would greatly appreciate any help.
 
Last edited:
3 blinks means the flash chip didn't respond. The blink codes are documented at the bottom of the T4 bootloader chip page.

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

"Why" is a much harder question to answer than "what", but hopefully at least knowing the problem involves communication with the flash chip helps. As a first generic question, do you have a power supply decoupling capacitor close to the flash chip?
 
Problem solved A17 is not located at N3. Unfortunately SD_B1_05 looks too similar to AD_B1_05. I'll get it in the next try.
 
Yeah, the native pin labels are almost like someone at NXP tried to make the most confusing error-prone naming scheme possible. FWIW, I got them mixed up many times in the early days (in 2018) while designing Teensy 4.0.
 
Back
Top