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

Thread: Why is the Reset button sometimes needed but sometimes not?

  1. #1
    Member dlchambers's Avatar
    Join Date
    Nov 2012
    Location
    Elkins, NH
    Posts
    45

    Why is the Reset button sometimes needed but sometimes not?

    I've found that when programming a Teensy that sometimes it'll program w/o needing to press the reset button, but sometimes it won't program until you press the button.

    Two questions:
    a) Why is this?
    b) Is there any way to ALWAYS allow programming without pressing the reset button? I want to put the Teensy in a case aqnd expose it's USB connector to the outside, and want to be able to ALWAYS be able to reprogram it w/o needing to open the case to press the button.


    Thanks!
    -Dave

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,257
    Well, you could bring the program (not reset as I wrote originally) pin and ground out of the case, and connect them via a momentary button.
    Last edited by MichaelMeissner; 05-27-2016 at 10:28 PM.

  3. #3
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,534
    That button is NOT a reset button, it's a button which puts the teensy in programming mode, allowing the upload of a new hex file. It is normally not needed, because the Teensyloader triggers that programming mode over USB. But in some cases (depending on the USB implementation of the host computer), that trigger does not always work and that's why you have to use that program button from time to time

  4. #4
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Or, if your code goes berzerk (wild jump, stack corruption, etc., or uses a library such that the library goes berzerk, the Teensy can get into a state where it cannot respond to a software-invoked download. So the PROGRAM Button forces the download to start and preempts the berzerk program running on the ARM.

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,730
    All the above is true - when the Teensy is properly programmed and running.
    TYQT offers what I find a better interface to Teensy. You can selective upload when more than one is active, reset it, and take it offline to bootloader mode all from the GUI without the button. If it won't power up running properly in a known state as HID or USB - then you still have to push the button.

  6. #6
    Member dlchambers's Avatar
    Join Date
    Nov 2012
    Location
    Elkins, NH
    Posts
    45
    Thanks to all for the good info. I meant to say "program" button/pin, not "reset". I am prepared to bring that pin out to my case, but of course would prefer to not have to. However, if there's even a slight chance (and there seems to be) that there are situations where the teensy can't be reprogrammed w/o pressing that button, I'll need to expose it.

  7. #7
    Quote Originally Posted by dlchambers View Post
    Thanks to all for the good info. I meant to say "program" button/pin, not "reset". I am prepared to bring that pin out to my case, but of course would prefer to not have to. However, if there's even a slight chance (and there seems to be) that there are situations where the teensy can't be reprogrammed w/o pressing that button, I'll need to expose it.

    Yes, there are situations that arise where the teensy can't be reprogrammed without pressing the button... See my previous thread about windows: https://forum.pjrc.com/threads/31912...load-sometimes

    This situation was totally unanticipated, because I had used windows and macs 1000s of times to update my device during testing, but it seems to pop up only on the first time a user tries to update the teensy from windows using _reboot_Teensyduino_();

    I made the button available on my (custom) teensy device and it was the best decision I inadvertently made!

    JKIM

  8. #8
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,257
    If nothing else, Murply's law probably would kick in that after you make a sealed case, that you will need to hit the program button, when it is most inconvenient, even if hundreds of times during testing you never needed to use it.

  9. #9
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Murphy was an optimist.

Posting Permissions

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