What does a blinking LED on Teensy 4.1 mean when PROGRAM MODE button is pressed?

dlab

Active member
I am using a Teensy 4.1 in my project. When I plug the Teensy into my laptop (running Linux), no port named something like ttyACM0 is created in the /dev/ directory. When the Teensy is connected to my laptop and I press the PROGRAM MODE button, the red LED turns on (still no port in /dev/). But, when I plug the Teensy into an external supply like a charging brick and press the PROGRAM MODE button, the red LED blinks. Any idea what this could mean?
 
Slow and steady blinking means no USB communication. This is almost always caused by power-only cables that don't have wires for data. They're incredibly common in drawers of leftover cables, as so many consumer devices use USB connectors for power or charging. You should also get this slow blinking if press the button when you have external power to Teensy but no USB cable at all.

A pattern of quick blinks can mean a variety of technical problems. For example, 4 quick blinks in a row means a failure with the flash memory chip.

Red LED on steady (not blinking) means it is running in bootloader mode and your PC has detected the device (called "enumeration" in USB lingo). In this mode, Teensy uses HID protocol. It is NOT serial, so you should not see a /dev/ttyACM device on Linux (or /dev/cu.usbmodem on MacOS or COM port on Windows). The Teensy Loader program is supposed to automatically detect the presence of this HID device and load your code.

In bootloader mode, the red LED has 2 levels of intensity. It's normally a low intensity while idle and just waiting for your PC to transmit data. It's bright while actually erasing or writing to the flash memory.

If you are familiar with Arduino's "everything must be a serial port" model, it's easy to mistakenly think Teensy isn't working, when in fact it's just using HID protocol rather than Serial protocol.
 
Hey Paul I have an issue with a Teensy 4.1 , we had to change to 4.1 from 3.5 during covid ( lack of supply ) we recompiled the code for the 4.1 in VS with the Teensy extension , most times it is fine , I do have some that seem to be going into bootloader mode (LED bright, flashing low intensity ) , the program stops and hangs up , It has to be powered off to reset it , any idea what this could be ?? any help would be great.

Note the ones that seem to do it have the ethernet chip on them ( only stock we could find )

Buzz
 
Last edited:
I do have some that seem to be going into bootloader mode

Maybe the Program signal is picking up electrical noise? That's a long short guess unless you've connected a wire, since the signal is only about 1 inch of PCB trace routed on a 6 layer board with ground plane. Why it would pick up noise isn't easy to understand, but it is the thing which would be mistaken for pressing the pushbutton.

Try connecting a strong pullup resistor, like 100 ohms, between the Program pin and 3.3V. Or you could directly short Program to 3.3V, but that's not a great idea because then pressing the pushbutton will short 3.3V to GND. If you try that, be very careful not to press the button. Or physically remove the button.
 
Maybe the Program signal is picking up electrical noise? That's a long short guess unless you've connected a wire, since the signal is only about 1 inch of PCB trace routed on a 6 layer board with ground plane. Why it would pick up noise isn't easy to understand, but it is the thing which would be mistaken for pressing the pushbutton.

Try connecting a strong pullup resistor, like 100 ohms, between the Program pin and 3.3V. Or you could directly short Program to 3.3V, but that's not a great idea because then pressing the pushbutton will short 3.3V to GND. If you try that, be very careful not to press the button. Or physically remove the button.
so no reason it would do that because of having the ethernet chip on it ?? we could add/try the 100 ohm pullup, I have a 4.1 with no ethernet that Im going to try , this issue showed up right about the time we got units with ethernet , this 4.1 is near some noisy parts ( motor speed controller VFD , digital air pressure regulator , soleniod etc. ) I just installed a NON ethernet 4.1 in the unit and testing it .
 
After looking at the schematic there is NO pullup resistor on the switch ,in a high noise environment this can be an issue for sure ! I will add a 150 ohm res. to the program and 3.3v lines and test it out. ( I assume the chip has a 10k or so pullup in it ) ?

FYI the 4.1 with NO ethernet failed also
 
Last edited:
Ok we have a external program switch on our units the wires are 10 inches + so Noise can be a real issue , so far the 150 ohm pullup has worked ( still testing ) I had a 1k res to 3.3v , after going to 100 ohms the noise issue seems to have gone away
 
Last edited:
after running about 1.5 hrs it failed again . Im going to replace the wires with RG174 micro coax cable and see if that helps to control the noise
 
changed the resistor to 100 ohms pullup added .0.1uf cap across resistor and changed the lines to RG174 shielded cable , seems to be ok now except on really long runs like 5 hrs then I still get failures bit that could be something else, seems to be a noise problem
 
ok I hooked up a mini scope to the program pin with a low trigger , the Teensy went into prog=ram mode again after 45 min. with NO low on the program pin , Im running a timer and display in countdown mode , this happens with longer run times could this be a memory overflow ? at shorter times 2900 sec. it does not fail .

Link to teensy 4.1 error LED

20240120_161741.jpg
 
Just a wild guess but does the software you're running on them have some code hidden away somewhere that would execute a debug breakpoint instruction? For example something like FreeRTOS that would try to break into a debugger when a fault is detected?
 
Just a wild guess but does the software you're running on them have some code hidden away somewhere that would execute a debug breakpoint instruction? For example something like FreeRTOS that would try to break into a debugger when a fault is detected?
I would have to check with my software eng. I dont write code , it could be we did some stuff like that during testing .
This happens on long runs so Im thinking its an overload or ?
 
Without knowing the code it really could be anything, but it would mean the bootloader mode is just a symptom of a software bug that needs finding/fixing rather than a problem with the physical PROGRAM signal.
 
Hi Paul, is it possible to switch the orage status LED in the teensy 4.1 complete off with software ??
Problem is that the LED current generate a small impulse on the power rail. This we can hear in the audio engine.
Thanks
Andre'
 
The orange Led (pin 13) is turned on/off under your program control, it does NOT come on unless software requests it.
 
Back
Top