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

Thread: Teensy Refuses to Program

  1. #1
    Junior Member
    Join Date
    Dec 2016
    Posts
    12

    Teensy Refuses to Program

    Hey guys,
    I have a bunch of teensy 3.6s and one of them is acting up for no apparent reason. It completely refuses to take a new program. I have tried 4 different USB cables, different USB ports to no avail. All of the other teensys have no problem taking new code. This one I can see still sort of works because the led blinks in a specific pattern that is from the last code that ran on it. Is there any way to recover this/reflash it?

    Errors:
    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.
    Attempting to put your teensy in program mode.

    Attempts:
    Genuine Teensy 3.6
    4 USB cables
    3 different USB ports
    plugged in normally as well as held button while plugging in


    Thanks for any help!

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,827
    Assuming nothing in this post is new or untried and none of it works?

    Is everything unplugged that can be?

    T_3.6 has a built in reset -Power up then Press and hold the Program button for a timed 15 seconds - THEN RELEASE the button. That will wipe the current sketch and restore some critical settings per PJRC findings.
    Last edited by defragster; 04-20-2018 at 07:02 AM.

  3. #3
    Junior Member
    Join Date
    Dec 2016
    Posts
    12
    The linked thread does not help.

    I tried plugging in the teensy and then holding the reset button for 15 seconds. That makes the LED blink slowly. That had no effect on my ability to upload code. I also tried holding the program button and then plugging it in and waiting 15 seconds. That shut off the led completely and still had no effect. No matter what I do, I constantly see the led blink the way my previously loaded program makes it blink. I don't think it is resetting/wiping the sketch.

    If i hold the program button for 15 sec and then try to upload a sketch, the verbose output hangs on
    Code:
    remote cmd sent
    Then if i press the button again, it starts looping
    Code:
    23:26:44.228: remote cmd: "status"
    23:26:44.240: status data sent

    Here is my whole verbose log:
    Code:
    23:26:36.980: Teensy Loader 1.41, begin program
    23:26:37.123: File "ABCM.ino.hex". 23696 bytes, 2% used
    23:26:37.158: Listening for remote control on port 3149
    23:26:37.159: initialized, showing main window
    23:26:37.396: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.397: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.400: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.401: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.402: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.403: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.404: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.406: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.407: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.408: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.409: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.411: HID/win32:  vid:04F3 pid:3083 ver:0001
    23:26:37.412: HID/win32:  vid:045E pid:0000 ver:0000
    23:26:37.412: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.414: HID/win32:  vid:04F3 pid:3083 ver:0001
    23:26:37.418: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.420: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.421: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.422: HID/win32:  vid:045E pid:0000 ver:0000
    23:26:37.424: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.425: HID/win32:  vid:8087 pid:0A1E ver:0200
    23:26:37.426: remote connection opened
    23:26:37.428: remote cmd: "comment: Teensyduino 1.41 - WINDOWS (teensy_post_compile)"
    23:26:37.433: remote cmd: "status"
    23:26:37.438: status data sent
    23:26:37.439: remote cmd: "dir:C:\Users\XXXXXXXX\AppData\Local\Temp\arduino_build_217701\"
    23:26:37.441: remote cmd: "file:Blink.ino.hex"
    23:26:37.451: File "Blink.ino.hex". 9984 bytes, 1% used
    23:26:37.468: remote cmd: "status"
    23:26:37.474: status data sent
    23:26:37.475: remote cmd: "auto:on"
    23:26:37.491: remote connection closed
    23:26:37.750: remote connection opened
    23:26:37.751: remote cmd: "comment: Teensyduino 1.41 - WINDOWS (teensy_post_compile)"
    23:26:37.753: remote cmd: "status"
    23:26:37.756: status data sent
    23:26:37.760: remote cmd: "dir:C:\Users\XXXXXXX\AppData\Local\Temp\arduino_build_217701\"
    23:26:37.760: remote cmd: "file:Blink.ino.hex"
    23:26:37.767: File "Blink.ino.hex". 9984 bytes, 1% used
    23:26:37.774: remote cmd: "status"
    23:26:37.778: status data sent
    23:26:37.789: remote connection closed
    23:26:37.822: remote connection opened
    23:26:37.824: remote cmd: "show:arduino_attempt_reboot"
    23:26:37.825: got request to show arduino rebooting message
    23:26:37.833: remote cmd: "comment: Teensyduino 1.41 - WINDOWS (teensy_reboot)"
    23:26:37.836: remote cmd: "status"
    23:26:37.849: status data sent
    23:26:37.865: remote cmd: "status"
    23:26:37.876: status data sent
    23:26:37.978: remote cmd: "status"
    23:26:37.984: status data sent
    23:26:38.085: remote cmd: "status"
    23:26:38.096: status data sent
    23:26:38.197: remote cmd: "status"
    23:26:38.203: status data sent
    23:26:38.309: remote cmd: "status"
    23:26:38.316: status data sent
    23:26:38.419: remote cmd: "status"
    23:26:38.425: status data sent
    23:26:38.526: remote cmd: "status"
    23:26:38.535: status data sent
    23:26:38.635: remote cmd: "status"
    23:26:38.646: status data sent
    23:26:38.746: remote cmd: "status"
    23:26:38.748: status data sent
    23:26:38.849: remote cmd: "status"
    23:26:38.856: status data sent
    23:26:38.956: remote cmd: "status"
    23:26:38.964: status data sent
    23:26:39.065: remote cmd: "status"
    23:26:39.071: status data sent
    23:26:40.021: remote cmd: "status"
    23:26:40.030: status data sent
    23:26:40.031: Verbose Info event
    23:26:40.131: remote cmd: "status"
    23:26:40.154: status data sent
    23:26:40.255: remote cmd: "status"
    23:26:40.275: status data sent
    23:26:40.377: remote cmd: "status"
    23:26:40.394: status data sent
    23:26:40.497: remote cmd: "status"
    23:26:40.512: status data sent
    23:26:40.613: remote cmd: "status"
    23:26:40.629: status data sent
    23:26:40.734: remote cmd: "status"
    23:26:40.760: status data sent
    23:26:40.861: remote cmd: "status"
    23:26:40.883: status data sent
    23:26:40.985: remote cmd: "status"
    23:26:41.000: status data sent
    23:26:41.102: remote cmd: "status"
    23:26:41.117: status data sent
    23:26:41.218: remote cmd: "status"
    23:26:41.229: status data sent
    23:26:41.330: remote cmd: "status"
    23:26:41.348: status data sent
    23:26:41.448: remote cmd: "status"
    23:26:41.466: status data sent
    23:26:41.568: remote cmd: "status"
    23:26:41.584: status data sent
    23:26:41.686: remote cmd: "status"
    23:26:41.700: status data sent
    23:26:41.801: remote cmd: "status"
    23:26:41.821: status data sent
    23:26:41.924: remote cmd: "status"
    23:26:41.941: status data sent
    23:26:42.043: remote cmd: "status"
    23:26:42.049: status data sent
    23:26:42.150: remote cmd: "status"
    23:26:42.161: status data sent
    23:26:42.264: remote cmd: "status"
    23:26:42.278: status data sent
    23:26:42.379: remote cmd: "status"
    23:26:42.389: status data sent
    23:26:42.489: remote cmd: "status"
    23:26:42.499: status data sent
    23:26:42.602: remote cmd: "status"
    23:26:42.616: status data sent
    23:26:42.718: remote cmd: "status"
    23:26:42.730: status data sent
    23:26:42.831: remote cmd: "status"
    23:26:42.847: status data sent
    23:26:42.947: remote cmd: "status"
    23:26:42.965: status data sent
    23:26:43.067: remote cmd: "status"
    23:26:43.083: status data sent
    23:26:43.184: remote cmd: "status"
    23:26:43.197: status data sent
    23:26:43.299: remote cmd: "status"
    23:26:43.316: status data sent
    23:26:43.418: remote cmd: "status"
    23:26:43.430: status data sent
    23:26:43.531: remote cmd: "status"
    23:26:43.547: status data sent
    23:26:43.650: remote cmd: "status"
    23:26:43.662: status data sent
    23:26:43.763: remote cmd: "status"
    23:26:43.778: status data sent
    23:26:43.881: remote cmd: "status"
    23:26:43.896: status data sent
    23:26:43.997: remote cmd: "status"
    23:26:44.009: status data sent
    23:26:44.111: remote cmd: "status"
    23:26:44.127: status data sent
    23:26:44.228: remote cmd: "status"
    23:26:44.240: status data sent
    23:26:44.341: remote cmd: "status"
    23:26:44.354: status data sent
    23:26:44.465: remote connection closed

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,827
    Just updated the posted text :: T_3.6 has a built in reset -Power up then Press and hold the Program button for a timed 15 seconds - THEN RELEASE the button.

    The release was implied by 'timed' - was the 15 second press of the 'Program' button given a prompt release at 15 seconds?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,173
    Quote Originally Posted by yandreev3 View Post
    I tried plugging in the teensy and then holding the reset button for 15 seconds. That makes the LED blink slowly.
    That is absolutely the wrong result!

    First, before you try anything else, do these 2 things on your PC.

    1: Keep Teensy Loader open and on top of other windows where you can see it, but turn off "Auto" mode (the far right button on the toolbar).

    2: Quit Arduino.

    This is important, because you don't want to make troubleshooting even more confusing with Arduino and Teensy Loader auto-rebooting your Teensy.


    Now, about that button. Maybe the physical button is damaged? If you have a voltmeter, try measure the voltage on the Program signal (red lead to the Program pin, black lead to GND).

    Normally the Program pin should be approx 3.3V. When you hold the button, the Program pin should go to 0 volts (several millivolts is ok). The Program button directly shorts the Program pin to GND, so if this isn't working it's almost certainly a physical failure in the button.

    If that works, next try measuring the Reset pin. It should also be 3.3V normally, at least when running any program from Arduino. If you've successfully done a full erase (the 15 sec press), Reset should measure approx 0.1 to 0.4 volts. It's actually a fast pulsing waveform, so the exact voltage you'll see can vary depending on the multimeter you use. Either way, when you hold the Program button, the MLK02 chip on your Teensy is supposed to notice Program low and drive Reset low. So you should see nearly 0 volts on Reset when holding the button.

    Hopefully these hardware tests should shine some light on what's gone so wrong with your board.


    Now, with all that in mind, I need to tell you several of the things you've concluded make no sense. I know it's difficult to troubleshoot electronics. This isn't easy to hear, but I need you to understand some of the conclusions you've written, about what causes what, just can't be right. I'm tell you this because to have any hope of helping you, we really need you to tell us what you see, what *actually* happens, rather than your conclusion about what you think caused something to happen.

    I mention the LED blinking slow is a wrong result. When you hold the Program button, the Reset line is supposed to be held low, so nothing can run at all while holding the button. When you release the button, Teensy is supposed to enter programming mode. It should be running the bootloader, which *NEVER* blinks the LED. Holding for exactly 15 seconds (actually, a time between ~13 to ~17 seconds) causes a full erase. You should *NEVER* see the LED blink after a full erase, unless Teensy Loader uploads new code. The bootloader never turns on the LED, and if the chip is completely blank, there isn't any program which could turn on the LED.

    That's why I said to make sure Teensy Loader is not in "auto" mode, and Arduino isn't running, and to keep Teensy Loader on your screen where you can see it. If you're getting blinking after full erase, it means either the erase isn't happening at all, or Teensy Loader is successfully uploading a slow LED blink program.

  6. #6
    Junior Member
    Join Date
    Dec 2016
    Posts
    12
    Quote Originally Posted by defragster View Post
    The release was implied by 'timed' - was the 15 second press of the 'Program' button given a prompt release at 15 seconds?
    Yeah of course haha I released the button.

    I mention the LED blinking slow is a wrong result. When you hold the Program button, the Reset line is supposed to be held low, so nothing can run at all while holding the button. When you release the button, Teensy is supposed to enter programming mode.
    That may be what needs to happen, but is not. For example, I have my sketch running which is blinking the LED in a certain pattern. Pressing/holding the program button does nothing visible. I can see my sketch continuing to blink the pattern. It only does something when I release the button.

    You should *NEVER* see the LED blink after a full erase, unless Teensy Loader uploads new code. The bootloader never turns on the LED, and if the chip is completely blank, there isn't any program which could turn on the LED.
    I understand that. Which is why i found it weird that the LED kept blinking no matter what i tried. I figured that I was not successful in performing the erase procedure even after trying it multiple ways, multiple times.



    The reset button pulls the line to ground and my fluke has a datalogging function which shows the line stays low so the button is not faulty. Teensy loader is not in auto, arduino is closed, and I have the verbose window pulled up.


    Let me try to clarify what happens with a bit of a longer example.
    I plug in the teensy and my previous sketch starts running based on the LED activity. I am not able to upload to it. Then if i press the program button, nothing seems to occur until i release it. The teensy then does not light up or blink the LED. I am not able to upload to it. If i press and hold the button and plug in the teensy, it turns on the LED for 1s and off for ~5s and then repeats. I am not able to upload to it. If I have the teensy plugged in and press and hold the program button for 15s, the LED Lights up and stays on constant. I am not able to upload to it. After all of this, pressing the program button while the teensy is in one of those previously mentioned states returns it back to my previous sketch (which has not been erased)



    Now, with all that in mind, I need to tell you several of the things you've concluded make no sense. I know it's difficult to troubleshoot electronics. This isn't easy to hear, but I need you to understand some of the conclusions you've written, about what causes what, just can't be right. I'm tell you this because to have any hope of helping you, we really need you to tell us what you see, what *actually* happens, rather than your conclusion about what you think caused something to happen.
    I am sorry if it seems I am uncooperative or am coming to conclusions. I do not mean for my post to come off that way. I merely meant it in a thinking-out-loud sort of way.

    Thank you both for your prompt replies and your help!

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,827
    I figured it was released - but as Paul noted the other parts didn't seem right and I figured that was the first step in getting that sorted out.

    This sounds not unlike like the T_3.6 I swapped with PJRC. My unit had not been soldered or connected except to USB - just unpacked and some basic test blink uploads. Yours? Is this a prior or new purchase?

    As Paul notes the Button should halt the LED - or the press is not registering electrically. I was finding I could press it a couple times - feeling the tactile click - without it being recognized. It took some firmer over-pressure beyond that - but that post was like 1 of 3 reported in the first batch of T_3.6's with this being the first similar report I've read since then.

Posting Permissions

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