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

Thread: Teensy 4.1 Button

  1. #1
    Junior Member
    Join Date
    May 2014

    Teensy 4.1 Button


    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...
    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 .

  2. #2
    Junior Member
    Join Date
    May 2014
    Whups, seems like I fixed it. loop() was not running. I guess the code that services uploads is invisibly inserted in there.

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    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.

  4. #4
    Junior Member
    Join Date
    May 2014
    Yeah, it was crashed. This is code I'm porting from a Arduino nano - and there are various strangenesses coming
    from that architecture.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    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.

Posting Permissions

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