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

Thread: Custom Teensy 4.1 Woes

  1. #1
    Senior Member
    Join Date
    Jun 2013
    Posts
    546

    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.
    Click image for larger version. 

Name:	flashTraceLengths.jpg 
Views:	11 
Size:	46.4 KB 
ID:	30302

    And here's the Flash Memory layout. I tried to mimic the T4.1 design as much as possible.
    Click image for larger version. 

Name:	flashLayout.jpg 
Views:	15 
Size:	164.4 KB 
ID:	30303

    Suspect 2: Bootloader Layout:
    I'm showing this one from layer 4 because most of the signals to the bootloader are routed there.
    Click image for larger version. 

Name:	bootloadLayout.jpg 
Views:	17 
Size:	206.8 KB 
ID:	30304

    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.
    Click image for larger version. 

Name:	usbTrackLengths.jpg 
Views:	11 
Size:	22.6 KB 
ID:	30306
    And here is the USB data lines layout.
    Click image for larger version. 

Name:	usbDataLines.jpg 
Views:	13 
Size:	236.2 KB 
ID:	30305

    I'm really at a loss as to how to solve my problem. I would greatly appreciate any help.
    Last edited by yeahtuna; 02-04-2023 at 12:43 AM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,707
    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?

  3. #3
    Senior Member
    Join Date
    Jun 2013
    Posts
    546
    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.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,707
    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.

Posting Permissions

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