Why is the Reset button sometimes needed but sometimes not?

Status
Not open for further replies.

dlchambers

Well-known member
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
 
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:
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
 
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.
 
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.
 
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.
 
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-Windows-7-%2864bit%29-standlone-teensy-loader-stalls-during-upload-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
 
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. :(
 
Status
Not open for further replies.
Back
Top