Teensy 4.1 Button

Status
Not open for further replies.

jerryk

Member
Hello,

Working on my project, the Teensy *always* requires me to push the button to program it. Here's what it says:

----------- snip -------------------------
Unable to open COM8 for reboot request
Windows Error Info: Access is denied.
more ideas... https://forum.pjrc.com/threads/40632?p=126667&viewfull=1#post126667
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
Unable to open COM8

---------------- endsnip ---------------

Then I push the button, the upload happens, and I continue developing.

------------ snip ---------------------
Now able to open COM8 (Windows said this port was ready before it was actually ready...)Disconnect COM8
------------ endsnip -----------------

I seem to remember reading that this is so because the USB port is not paying attention. What exactly do I need to do in my code to make it pay proper attention? The serial monitor *does* work.

The button is a big deal because the Teensy is mounted upside down, and the button is between
the two circuit boards. I am able to push it with a toothpick marked to show exactly how far in to stick it. The button will be an even bigger deal once the Teensy goes into the equipment cabinet.
I suppose I *could* rig up some sort of little bellcrank with some string :).
 
Whups, seems like I fixed it. loop() was not running. I guess the code that services uploads is invisibly inserted in there.
 
The USB code runs in the background using software for native USB hardware - but if loop() isn't running the processor may be crashed so that isn't working either.

Luckily the Program Button is there to halt the processor and get it online for programming when no USB programmed - or when it fails to be functioning.
 
Yeah, it was crashed. This is code I'm porting from a Arduino nano - and there are various strangenesses coming
from that architecture.
 
If you still have the code which crashed, maybe save a copy.

This MyFault library is an attempt to collect code samples for all the ways to crash Teensy 4.x. Starting with 1.54, many of these have automatic reboot after 8 seconds, and CrashReport can give details about what went wrong.

If you've found a new way to crash, maybe we can whittle the code down to just a minimum and add it to the list.
 
Status
Not open for further replies.
Back
Top