Teensy 4.1 burn after upload

Vinparvin

Member
Hello everyone,

First time posting here, but not the first time on this forum. I am also french Canadian, I might make some horrible mistake, please don't judge. :)

I am not a expert in electronics, more of a advanced hobbyist.

As the title say, I burned 2 Teensy yesterday while working on a project.

For the first Teensy, I uploaded a big code I got to run leds via artnet using FastLED and a bunch of other libraries. The thing is, that it burned after several upload, during the day (and several other during the lifetime of this Teensy). The last thing I change was added a Serial.print somewhere, nothing major. Some people might ask for a link to the code but I am not able to share it because of a NDA, anyway I am 99% sure it is not the problem because the second Teensy 4.1 that I burned (fresh one out of the box) got the blink example from Arduino. For each TeensyI used a different cable, and a different USB port on my laptop. The "fresh out of the box" Teensy was running smoothly with the blink code that comes with it as is while powered by my laptop via the USB cable.

The "fresh out of the box" Teensy was naked, no header, no nothing solder on it, just the Teensy.

The picture here show the first burned Teensy 4.1 on a custom board I have, the only thing that look weird is the U2 chip, next to the Ethernet pin + USB connector. The U2 chip is the MKL02Z32VFG4. The chip have a rubbish ish look, like something that burned?

334792889_794125942077629_1347579096216239699_n.jpg

I got some other close up

329823850_956849078683137_1752061831079183674_n.jpg

Here is an other chip that have the same finish, but I am not sure if it is affected in anyway by the "burn". Its the U3 (W25Q64JVXGIM)
This Teensy is the "fresh out of the box" one.

334790200_529012699357770_5514433442947654867_n.jpg

Both Teensy now blink 9 times before "shutting down". The error on the website is (https://www.pjrc.com/store/ic_mkl02_t4.html):
9 Blinks = ARM JTAG DAP Init Error
The ARM JTAG DAP was detected (4 blinks) but could not be initialized. This error is rather unlikely!

My very mostly kind of wrong guest is that the boot loader have a weird problem.

I am running on Windows 11, Teensy Loader 1.57, I am also using PlatformIO for all of my projects 3.0.0

Also my laptop was plugged all the time with is power supply, its a ThinkPad P15v Gen 2 Intel

Any help or hint as of what happen and how I can never do it again will be appreciated.

A friendly french guy.
 
Last edited:
There is a large amount of flux showing on the pin tops on the soldered Teensy.

That rough surface texture on that chip looks familiar - but looking at a few T_4.1's here I don't see it now.
> any chance it is residue that wipes clean with damp alcohol cloth?

Something odd not seen here on the new unit not soldered going to the same 9 blink state.
Only hope for 'remote' feedback would be:
Unplug all Teensys
Teensy.exe Loader open select the Help / Verbose Info window
Clear that window
Plug in the New Teensy and see what shows up.
Then press and release the Button and look for added messages.

Select/Copy all of any posted information into a post for Paul's review. Clear the Verbose window again.

This may not work if the RED LED stays on, but if it goes out holding the Button:
Press and hold the Button for 13+ seconds watching for the RED LED to FLASH and release the button when it flashes and look for the Restore to rewrite the flash and then resume with factory blink.

Observe the Verbose window and copy and paste anything presented there for review.
 
Hi defragster,

Thanks for the response.

After posting my initial thread, I went and did some research and more testing without any real clue of what I was searching for.

So I uninstall Arduino, Teensyduino, PlatformIO and VScode and reinstall all of them. I did a first test with a Teensy LC because it cost less. Everything was fine.

Did the same test with a Teensy 4.1 out of the box and everything was working, I push a blink code, all is good, and after that I pushed the code for my projet and it was working as expected. I dont really know where the problem was or what it was.

To response to your question here is the info from the Teensyloader log :

After plugging the Teensy 4.1 burned, without any header : Nothing is printed in the log.

After pushing the button :

16:40:09.064 (loader): secure mode can not be locked: this is Standard Teensy
16:40:09.067 (loader): encryption is possible on this Teensy, but not yet configured
16:40:09.069 (loader): but without secure mode locked, encryption will NOT be secure!
16:40:09.072 (loader): Device came online, code_size = 8126464
16:40:09.075 (loader): Board is: Teensy 4.1 (IMXRT1062), version 1.08
16:40:09.095 (loader): File "C:\Users\vince\AppData\Local\Temp\arduino\sketches\EF87C9685B1A94D2A0A2CA74EC45F90F\Blink.ino.hex", 5800 bytes
16:40:09.098 (loader): File "Blink.ino.hex". 5800 bytes, 0% used
16:40:09.158 (loader): set background IMG_ONLINE
16:40:09.293 (loader): HID/win32: HidD_GetPreparsedData ok, device still online :)

After pressing the button, the RED LED stays on, and after pressing the button for 13sec+ , the same verbose is in the log.

This is what show in the log after unplugging the Teensy 4.1 :

16:46:21.208 (loader): Device went offline
16:46:21.471 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.479 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.488 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.495 (loader): HID/win32: vid:06CB pid:000F ver:0101
16:46:21.509 (loader): HID/win32: vid:045E pid:0000 ver:0000
16:46:21.517 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.526 (loader): HID/win32: vid:045E pid:0000 ver:0000
16:46:21.543 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.553 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.559 (loader): HID/win32: vid:06CB pid:000F ver:0101
16:46:21.564 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.564 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.574 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.583 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.593 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.598 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.607 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.613 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.618 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.622 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.624 (loader): HID/win32: vid:8087 pid:0A1E ver:0200
16:46:21.633 (loader): HID/win32: vid:046D pid:C52F ver:2200 usb:0/140000/0/7/8
16:46:21.637 (loader): HID/win32: vid:046D pid:C52F ver:2200 usb:0/140000/0/7/8
16:46:21.643 (loader): HID/win32: vid:046D pid:C52F ver:2200 usb:0/140000/0/7/8


Dont know if there is any information for you out there. But still I wonder what really happen...
 
At least one 9 blink came back to working after reinstall of the IDE and build software? Did they both come back or just the unsoldered one - or is there a third " Teensy 4.1 out of the box "?

The base blink doesn't include any Serial USB that would connect to the PC so the first log may be correct? Though with the loader online it should have reprogrammed it and not seeing what would be expected for the upload in the first log.

As far as the second log on unplugging a T_4.1 - looks like a series of other logged events that would be other devices.

Is this programming with PlatformIO or the Arduino IDE?

What was in use when the '9 blinks' started - before this software re-install?
 
No, sadly both burned Teensy 4.1 are still dead, I did my test after the reinstall on a new Teensy 4.1 and a new Teensy LC.

I was programming with the Arduino IDE when I pushed the basic blink example. But when the first Teensy 4.1 burned, I was using PlatformIO.

Before the 9 blinks started, I was using a Wiznet ethernet port (RB1-125BAG1A from mouser) to communicated Artnet and OSC, I am using MaxMSP to send a package of Artnet to control 7 LEDs and I am sending the new press state of a button via OSC.
 
Hmmm so my reinstall did not solve my problem, I just burn a new Teensy 4.1. I'm starting to panic a little .....

This time I was pushing from PlatformIO . This is the verbose from the Teensyloader :

13:54:04.250 (post_compile 4): Begin, version=1.57, high-res time
13:54:04.250 (loader): remote connection 1548 opened
13:54:04.250 (loader): remote cmd from 1548: "comment: Teensyduino 1.57 - WINDOWS (teensy_post_compile)"
13:54:04.250 (loader): remote cmd from 1548: "status"
13:54:04.251 (post_compile 4): Sending command: comment: Teensyduino 1.57 - WINDOWS (teensy_post_compile)
13:54:04.252 (loader): file changed
13:54:04.320 (loader): File "C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\firmware.hex", 702462 bytes
13:54:04.320 (loader): File "firmware.hex". 702462 bytes
13:54:04.323 (post_compile 4): Status: 1, 1, 0, 1, 0, 0, C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\, firmware.hex
13:54:04.323 (post_compile 4): Sending command: dir:C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\
13:54:04.329 (loader): remote cmd from 1548: "dir:C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\"
13:54:04.329 (post_compile 4): Sending command: file:firmware.hex
13:54:04.330 (loader): remote cmd from 1548: "file:firmware.hex"
13:54:04.398 (loader): File "C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\firmware.hex", 702462 bytes
13:54:04.398 (loader): File "firmware.hex". 702462 bytes
13:54:04.401 (loader): remote cmd from 1548: "status"
13:54:04.404 (post_compile 4): Status: 1, 1, 0, 1, 0, 0, C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\, firmware.hex
13:54:04.404 (post_compile 4): Disconnect
13:54:04.427 (loader): remote connection 1548 closed
13:54:04.427 (loader): remote connection 1552 opened
13:54:04.427 (post_compile 5): Running teensy_reboot: "C:\Users\vince\.platformio\packages\tool-teensy\teensy_reboot.exe" teensy_reboot.exe "-board=TEENSY41"
13:54:04.440 (reboot 6): Begin, version=1.57, high-res time
13:54:04.440 (reboot 6): LoadLibrary cfgmgr32 ok
13:54:04.440 (reboot 6): LoadLibrary ntdll ok
13:54:04.442 (reboot 6): nothing new, skipping HID & Ports enum
13:54:04.442 (reboot 6): usb scan found 0 devices
13:54:04.443 (loader): remote connection 1556 opened
13:54:04.443 (reboot 6): Disconnect
13:54:04.458 (loader): remote connection 1556 closed
13:54:04.459 (loader): remote connection 1552 closed
13:54:17.434 (post_compile 7): Begin, version=1.57, high-res time
13:54:17.435 (loader): remote connection 1576 opened
13:54:17.435 (loader): remote cmd from 1576: "comment: Teensyduino 1.57 - WINDOWS (teensy_post_compile)"
13:54:17.435 (loader): remote cmd from 1576: "status"
13:54:17.435 (loader): file changed
13:54:17.435 (post_compile 7): Sending command: comment: Teensyduino 1.57 - WINDOWS (teensy_post_compile)
13:54:17.502 (loader): File "C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\firmware.hex", 702462 bytes
13:54:17.502 (loader): File "firmware.hex". 702462 bytes
13:54:17.506 (post_compile 7): Status: 1, 1, 0, 1, 0, 0, C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\, firmware.hex
13:54:17.506 (post_compile 7): Sending command: dir:C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\
13:54:17.508 (loader): remote cmd from 1576: "dir:C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\"
13:54:17.508 (loader): remote cmd from 1576: "file:firmware.hex"
13:54:17.509 (post_compile 7): Sending command: file:firmware.hex
13:54:17.577 (loader): File "C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\firmware.hex", 702462 bytes
13:54:17.577 (loader): File "firmware.hex". 702462 bytes
13:54:17.581 (loader): remote cmd from 1576: "status"
13:54:17.583 (post_compile 7): Status: 1, 1, 0, 1, 0, 0, C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\, firmware.hex
13:54:17.583 (post_compile 7): Disconnect
13:54:17.603 (loader): remote connection 1576 closed
13:54:17.603 (loader): remote connection 1616 opened
13:54:17.604 (post_compile 8): Running teensy_reboot: "C:\Users\vince\.platformio\packages\tool-teensy\teensy_reboot.exe" teensy_reboot.exe "-board=TEENSY41"
13:54:17.618 (reboot 9): Begin, version=1.57, high-res time
13:54:17.618 (reboot 9): LoadLibrary cfgmgr32 ok
13:54:17.618 (reboot 9): LoadLibrary ntdll ok
13:54:17.620 (reboot 9): nothing new, skipping HID & Ports enum
13:54:17.620 (reboot 9): usb scan found 0 devices
13:54:17.620 (loader): remote connection 1396 opened
13:54:17.621 (reboot 9): Disconnect
13:54:17.635 (loader): remote connection 1396 closed
13:54:17.636 (loader): remote connection 1616 closed
13:54:30.345 (post_compile 10): Begin, version=1.57, high-res time
13:54:30.345 (loader): remote connection 1396 opened
13:54:30.345 (loader): remote cmd from 1396: "comment: Teensyduino 1.57 - WINDOWS (teensy_post_compile)"
13:54:30.345 (loader): remote cmd from 1396: "status"
13:54:30.345 (loader): file changed
13:54:30.347 (post_compile 10): Sending command: comment: Teensyduino 1.57 - WINDOWS (teensy_post_compile)
13:54:30.411 (loader): File "C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\firmware.hex", 702462 bytes
13:54:30.411 (loader): File "firmware.hex". 702462 bytes
13:54:30.415 (post_compile 10): Status: 1, 1, 0, 1, 0, 0, C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\, firmware.hex
13:54:30.415 (post_compile 10): Sending command: dir:C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\
13:54:30.417 (loader): remote cmd from 1396: "dir:C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\"
13:54:30.418 (post_compile 10): Sending command: file:firmware.hex
13:54:30.418 (loader): remote cmd from 1396: "file:firmware.hex"
13:54:30.483 (loader): File "C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\firmware.hex", 702462 bytes
13:54:30.483 (loader): File "firmware.hex". 702462 bytes
13:54:30.486 (loader): remote cmd from 1396: "status"
13:54:30.488 (post_compile 10): Status: 1, 1, 0, 1, 0, 0, C:\Users\vince\Documents\1_Robocut\1_Prjts\_L_Kinzo\Prototype_Code\Kinzo_Protoype\.pio\build\teensy41\, firmware.hex
13:54:30.488 (post_compile 10): Disconnect
13:54:30.499 (loader): remote connection 1396 closed
13:54:30.499 (loader): remote connection 1556 opened
13:54:30.499 (post_compile 11): Running teensy_reboot: "C:\Users\vince\.platformio\packages\tool-teensy\teensy_reboot.exe" teensy_reboot.exe "-board=TEENSY41"
13:54:30.512 (reboot 12): Begin, version=1.57, high-res time
13:54:30.512 (reboot 12): LoadLibrary cfgmgr32 ok
13:54:30.512 (reboot 12): LoadLibrary ntdll ok
13:54:30.514 (reboot 12): nothing new, skipping HID & Ports enum
13:54:30.514 (reboot 12): usb scan found 0 devices
13:54:30.514 (loader): remote connection 1596 opened
13:54:30.515 (reboot 12): Disconnect
13:54:30.529 (loader): remote connection 1596 closed
13:54:30.530 (loader): remote connection 1556 closed
14:03:05.555 (loader): Verbose Info event
 
That makes 3 going 9 blinks? All after using PIO to build the upload sketch?

Nothing should brick a Teensy - Dev environment or the sketch - but something there is.

Are ALL wires touching the Teensy (except needed 5V VIN/VUSB) at 3.3V level?

<edit>: Though the bare unsoldered T_4.1 would have 5V not a problem if never wired to anything.
 
Hey, sorry for the late respond. I was out for the weekend

Yup that's make 3 going 9 blinks, all using PIO. Yeah kind of weird that the one that was not solder to anything had the same reaction as the one hook on the custom PCB.

I'll do more research today and more testing, I'll try to keep this thread up to date
 
First, the same question I always ask with PlatformIO issues.... can you check whether the problem also happens using Arduino IDE?

Using either software, does the problem happen if you load the code onto a Teensy 4.1 with no connection to other hardware, only connected by a USB cable to your PC? (kinda sounds that way from your latest message)

If no extra hardware is needed, could you share the firmware.hex file (and firmware.elf file and/or source code)? I could at least try loading that .hex file onto a Teensy 4.1 here to see the problem. If I can reproduce the problem, of course the .elf file and source code would allow actually investigating why it happens.
 
I did some test using the blink example with Arduino IDE, and did my push on a Teensy LC and a Teensy 4.1 and both push were fine. I also used the same code inside PIO, because I was scared that PIO was the problem. Both teensy (LC and 4.1) survivre the blink push with PIO.

I did not try to use Arduino IDE with my full projet, might be the test of the day.

For your question about using a Teensy 4.1 without any connection, yes I did the test once on a Teensy 4.1 with the full code and its dead.

For the code, is there any way for me to share to you privatly? Kind of under NDA for this projet and I'm not sure what I can and cannot share.
 
While the hardware doing 9 blink error, does the 15 sec restore get the board back to a usable state?

If you're not familiar with this, just press and hold the pushbutton for 13 to 17 seconds. At 13 seconds, you should see a quick blink of the red LED to indicate release within the next 4 seconds will trigger the full flash erase and restore. When you release the button, the red LED is supposed to turn on bright. The erase is slow, about 1 minute, so just let it run even if is seems to be stuck or taking forever. It's just slow. When completed, the flash is re-written with the original LED blink program which appears to your PC as a RawHID (not serial) device, so you should see the red LED turn off and the orange LED blinks again as it did when Teensy was brand new.

Please remember, Teensy will NOT be a serial device. In Arduino IDE Tools > Ports menu you will see it appear as RawHID. Windows Device Manager will see it has Human Interface Device (likely shown undistinguished from several others - not so helpful from Microsoft). In software like PlatformIO which only understands serial, it may not appear. But pressing the button (quickly, not for 15 seconds) should make Teensy Loader detect it and allow you to load code.

This slow restore process is done using JTAG boundary scan. The slowness is because boundary scan requires shifting hundreds of bits just to change any pin, and controlling serial flash requires a lot of pin changes! So even if things have gone so wrong that ARM JTAG DAP can't be accessed, putting the chip into JTAG boundary scan fully bypasses ARM debug and gives the bootloader direct (but slow) control over all the pins at a hardware level which completely bypasses everything about the ARM CPU. This restore process is supposed to always be able to fully erase the flash and restore to a known-good state.

With lockable Teensy, 15 sec restore only works in unlocked mode. Once security is locked, no JTAG access is possible due to security measures, not even boundary scan. Standard Teensy is permanently configured to always allow JTAG, so 15 sec restore should always work if the hardware hasn't been physically damaged.

(presumably you'll be using lockable Teensy if your firmware is so sensitive to be protected under a NDA)
 
Last edited:
I must say Paul that you are truly a hero. I was doing the reset but I was not waiting long enough for the full restore to happen.

All 3 Teensy 4.1 are working with the factory blink, I did a push a blink code with a serial print for the state of the led with PIO and everything is working for now. I'm starting to believe that the problem was my code and not the bootloader.

Thanks a lot for the information about how the full reset work, really interesting process and I love to learn more about the hardware you have create.

(It's not that sensitive, it's only because the projet is in early stage and I don't want to make my client angry with anything yet ;) )
 
Back
Top