Reset button & reset pin

Status
Not open for further replies.

ZTiK.nl

Well-known member
I made an error in my code and needed to reset my Teensy 3.0 using the button, but when I did, the black button popped out along with a piece of silver foil and what appears to be glue.
I haven't been able to find the black button itself yet, since it managed to get quite a bit of 'airtime' :)

Any suggestions on how to reset the Teensy should I need to in the future
To clarify: I don't mean auto-reset on prog, but an alternative for pressing the button.

There is a reset pin on the Teensy, but if I understand this page and this post correct, this only reboots the user program on the Teensy, it doesn't trigger the reprogramming of the Teensy.

Here's a picture of what the Teensy looks like without the button
reset button.jpg

Since I am running making use of a screen, a software solution would suit me fine too.
I could make a button on the options page that emulates the black reset button, if I knew how :x
 
Last edited:
A second question related to the reset pin:

In the Adafruit TFT library it states:
Code:
#define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin

Am I right in saying that I can use the reset pin on the Teensy for this?
 
You can temporarily get around your problem by just adding another button on your breadboard that connects the program pin to ground. This is the same thing the button on the teensy3 does.
 
Qumefox is right, the best workaround is soldering a pushbutton between the PROG and GND pins. Of if auto-reset is working nearly all the time, just tap those 2 pins with tweezers, wire, or a paperclip if you need to manually force a reboot.

There's no point using the A4 hack for Arduino Uno on a Teensy 3.0. The auto-reset for Teensy 3.0 works pretty well. In the cases where a program locks up or crashes in a way where auto-reset can't work, that hack would also be very unlikely to work.

We recently changed to a new pushbutton with a softer spring. A few people have experienced this same problem, where pushing on the button from an angle pops the cap out of the body of the button. Hopefully with less tension from the spring, the newer buttons will be more durable.

Regarding screen and auto-reset, when Teensy is implementing Serial (from the Tools > USB Type), you can cause the board to reboot by setting the baud rate to 134. The actual reboot happens after a 15 ms delay, which is intended to give you time to close the port.

Actually, the delay is also intended to avoid a nasty bug in Microsoft's driver which leaves junk in the registry if the device reboots in the middle of a baud rate change sequence, which in turn triggers another bug in their driver where it doesn't properly detect the device when it reappears! The Linux driver is much more robust, but it's still a good idea to close the port quickly, so if the board reprograms fast and reappears, the number previously assigned will be available to the kernel again when it creates the new device. I'm not familiar with exactly what screen does... but if you want to implement this auto-reboot stuff, the trick is setting to 134 baud.
 
I have followed your advice and connected a button between GND and PROG, this works like a charm :)
The baud rate change is a 'creative' way to force a reboot, would never have thought of that.

Thank you both for the informative replies!
 
Status
Not open for further replies.
Back
Top