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

Thread: Teensy3 reset button won't. .. unless plugged into PC usb port

  1. #1

    Teensy3 reset button won't. .. unless plugged into PC usb port

    Pressing the reset button causes the current program to stop executing, but it does not restart. It stays in some weird hung state. This happens when powered by phone charger through USB connector on Teensy 3, on external 3.3v power with trace cut, but it does not occur(that is, it resets as expected) when connected to a PC USB port.

    I've removed all peripheral hardware and the problem is reproducible with the blink sketch.

    Grounding the reset pin does work as it should, allowing the program to restart. Power cycling also restarts the program.

    While it does reset when connected to PC, there are other anomalies/inconsistencies. Connect/Disconnect sounds can happen in less than 1 sec to over 20 seconds. Almost always says that reset button must be pushed when loading program, Serial port selection is greyed out, Serial monitor does not work.

    Using Teensy 3, Arduino 1.0.5, Teensyduino 1.14, Teensy Loader 1.07, LD33V regulator, http://www.robot-electronics.co.uk/d...AM-DS-rev4.pdf, http://www.adafruit.com/products/746, http://www.adafruit.com/products/438, SD Adapter http://www.pjrc.com/store/sd_adaptor.html
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	teensy3wDisplayAndReg.jpg 
Views:	321 
Size:	252.9 KB 
ID:	631  

  2. #2
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    measured and/or looked with a 'scope, and the 5v from the PC USB port while things aren't right?
    I have had some PC ports stop providing power correctly after years of use. Hard to know if it's a bad connector or USB chip power management issue. The one I recall is a 4 port USB gizmo that goes in a disk bay slot in the front of the PC.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,166
    Quote Originally Posted by slomobile View Post
    Pressing the reset button causes the current program to stop executing, but it does not restart.
    The button is connected to the "program" signal, not "reset". It causes the board to run the bootloader and wait for new code to be uploaded.

  4. #4
    Well, that would explain it.
    When the Arduino IDE says "Please press the RESET BUTTON on your Teensy to upload your sketch. Auto-reboot only works if the Teensy is running a previous sketch."
    Does it mean the PROGRAM BUTTON or is it expecting a LOW on the reset line?

  5. #5
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,106
    As far as I can see it just calls it a "button". The loader graphic says "Press Button To Activate":
    Name:  tdupload.png
Views: 2170
Size:  56.8 KB
    The introduction page calls it a "reboot button" and the first use page calls it "the tiny pushbutton". I'm not seeing it called a reset button in the IDE.

    Teensy 2.0 and 3.0, Arduino 1.0.5, Teensyduino 1.15, Teensy Loader 1.15, Windows 7 SP1.

  6. #6
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Reboot-button seems more applicable, as it triggers the co-processor to start the download process, but the button alone doesn't reset the ARM CPU.

  7. #7
    Quote Originally Posted by Nantonos View Post
    As far as I can see it just calls it a "button". The loader graphic says "Press Button To Activate":
    That message was a direct quote from the status window at the bottom of the Arduino IDE, not the loader. The same area that says how big your program is. Its possible that warning message may be supplied by Arduino and not the Teenyduino add on, but I've never seen it with a genuine Arduino, just all versions of Teensy.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,166
    Yes, that message is Teensy specific. It actually comes from a tiny helper program called "teensy_reboot", in hardware/tools.

    There's actually 2 of these helper program in play. The first one is "teensy_post_compile", which attempts to update the Teensy Loader with the name of the file you've just compiled with Arduino. It's basically the same as using File > Open in Teensy Loader, then turning on Auto mode. When the Teensy appears, it will be reprogrammed automatically with that file.

    Then the "teensy_reboot" program attempts to find a Teensy which is running any of the device types available in the Tools > USB Type menu. If it finds any, it sends a reboot request. Each device type implements some way to request rebooting, with the Serial types by setting the baud rate to 134 baud, with the HID types using a special HID feature report message. In the common case where a Teensy is connected and still running whatever sketch you're previously uploaded, it reboots and the Teensy Loader automatically reprograms it.

    If the Teensy isn't connected, or if it's running something other than one of the device types from Teensyduino, or if it's crashed or running code with interrupts permanently disabled (which rarely happens with normal Arduino coding), then it can't hear the reboot request. After 5 seconds, the teensy_reboot program gives up and prints that message, which is shown in Arduino's console panel.

    On Windows, sometimes there is a 10 second delay. It only happens on Windows and I still do not know why. I've looked into it with a protocol analyzer and it's all on the Windows side. Teensy responds rapidly and reboot quickly, but Windows waits longer than the 5 seconds before recognizing the Teensy again in some cases. Mac and Linux don't do this.

  9. #9
    Junior Member
    Join Date
    Sep 2013
    Posts
    2

    Question Teensy3 reset button does not work as expected when teensy3 has external power

    I also have the original problem - the blink sketch works fine out of the box. When the pads are cut (in the position shown on this page http://www.teensypi.com/building-a-teensypi-boards/ ) and 4.5V is applied externally (3xAA batteries) the blink sketch continues to work.

    When the same sketch is downloaded drom the PC, I get the same message in the helper IDE. When I press the (reset?/reprogram?) button I get a message from the teensy helper app that the teensy3 has rebooted. But the program does not run - the LED does not blink.

    Additionally, resoldering the pads did not get rid of the problem. Now I can see that the USB cable is powering the teensy3 (I have an indicator power LED across the breadboard rails, and my external battery pack is disconnected), I can connect and download, the teensy helper program gives a message "reboot OK", but the blink program does not run.

    I now have two teensy3's in this state ..

    How can I recover from this?
    Last edited by Irlandos; 09-23-2013 at 05:18 PM. Reason: new info

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,166
    The pushbuttons puts Teensy into programming mode. It does not reboot Teensy.

    If you're connected to a PC which is running Teensy Loader, and if Teensy Loader is in "auto" mode, then it automatically reprograms and reboots the board as soon as it's detected. That reboot behavior isn't part of the Teensy board itself, it's only because the Teensy Loader is running in auto mode.

  11. #11
    Junior Member
    Join Date
    Sep 2013
    Posts
    2
    Thanks Paul - Problem solved: USB cable was power-only, as suggested on the main website troubleshooting section.

  12. #12

    How to reprogram a Teensy 3.6, when it doesn't appear as USB device?

    Quote Originally Posted by PaulStoffregen View Post
    The pushbuttons puts Teensy into programming mode. It does not reboot Teensy.

    If you're connected to a PC which is running Teensy Loader, and if Teensy Loader is in "auto" mode, then it automatically reprograms and reboots the board as soon as it's detected. That reboot behavior isn't part of the Teensy board itself, it's only because the Teensy Loader is running in auto mode.
    I might have written a program, which causes the Teensy - when connected as USB device - no to be recognized: neither by Windows (error 43) nor Linux. The device is running (yellow LED is on and I can hear sound), but can't open the port. Program button doesn't help. Any other method to revive the thing or is it a bricked?

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,166
    Quote Originally Posted by DragonSF View Post
    Any other method to revive the thing or is it a bricked?
    First, unplug the cable and reboot your PC.

    Hold the button while plugging in the cable. Details here:

    https://www.pjrc.com/teensy/troubleshoot.html

  14. #14
    OK, I just did that and get the same message: USB device not recognized.
    My second Teensy 3.6 works just fine with the same setup.

  15. #15
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    4,852
    You might try the 15 second reset to see if that works:

    It was mentioned on the beta thread: https://forum.pjrc.com/threads/34808...l=1#post115336

  16. #16
    I tried that, but it seems, the USB info is corrupted: USB\VID_0000&PID_0002\5&e658374&0&2 (vendor and Product ID are wrong).
    a working one: Device USB\VID_16C0&PID_0489&MI_00\7&309bd284&0&0000.

    Is it possible to reprogram the USB controller?

  17. #17
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,166
    Turn off Auto mode in Teensy Loader, so it does not immediately reprogram and reboot your board.

    After pressing the button, you should see PID_0478, not PID_0489.

  18. #18
    Still getting:
    Last Device Instance Id: USB\VID_0000&PID_0003\5&e658374&0&2
    Class Guid: {36FC9E60-C465-11CF-8056-444553540000}
    Location Path:
    Migration Rank: 0xF000FFFFFFFFF100
    Present: false
    Status: 0xC0000719

    After deleting device and reconnected:
    Device USB\VID_0000&PID_0002\6&2d733988&0&7 had a problem starting.

    Driver Name: usb.inf
    Class Guid: {36FC9E60-C465-11CF-8056-444553540000}
    Service:
    Lower Filters:
    Upper Filters:
    Problem: 0x2B
    Problem Status: 0x0

    The working one:
    Driver Management concluded the process to install driver cdcacm.inf_amd64_78dfd35a1fb10151 for Device Instance ID USB\VID_16C0&PID_0489&MI_00\7&309BD284&0&0000 with the following status: 0x0.

    Still PID 489!?

  19. #19
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,166
    Quote Originally Posted by DragonSF View Post
    Still PID 489!?
    That's definitely not right. It's supposed to be 0478 after pressing the button, unless Teensy Loader is running in Auto mode, then it's only 0478 for a brief moment before it reboot again.

    Any chance the info you're querying is stale data from the Windows registry, rather than real live device info? Are you using the Windows Device Manager, or some other way?

  20. #20
    This is what I see in USBdevview for the faulty one:
    Click image for larger version. 

Name:	NG21.jpg 
Views:	43 
Size:	105.1 KB 
ID:	14080
    the correct one:
    Click image for larger version. 

Name:	OK2.jpg 
Views:	42 
Size:	112.8 KB 
ID:	14081

Tags for this Thread

Posting Permissions

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