External RESET button - Teensy 3.2

Hi all,

This seems to be a really easy one, but couldn't find a very distinctive answer online yet.

I'm using a Teensy 3.2 in some hardware applications and would be able to do a reboot/reset from a button. Now I'm just deconnecting the power and connect it again but this isn't really what I'd prefer.

How is it possible to this from a button? Does the teensy even have a reset port?


Also, I'm feeding the Teensy from external power, but also do some 'online' programming sometimes, so when the teensy is connected to the external power.

Should I cut the trace between the Vin and Vusb pads?


Thanks in advance!
A.
 
the pin hole is right next to the Program button, you just need to ground it to do a reset, attach a wire there for your button

teensy30_front_pinout.png

regarding the trace, yeah cut it if you plan on using 2 sources at once. Me, I didn’t cut the trace, instead I modified a usb cable (cut the red wire), that way the USB cable never supplies power to teensy and I can retain the trace for future use

the trace cut/modified usb cable only apply if you want both plugged in at same time
 
Yes, there is an RESET accessable, but unfurtunatly just as SMD-pad.
See https://www.pjrc.com/teensy/pinout.html

As long you can manage not to connect external power and USB power at same time, you don't need to cut trace between Vin and Vusb.
To be sure cut the trace, but then you always need external power to reprogramm the teensy from the IDE.
 
Looking at the card that came with the T_3.2 - on as shown on the PJRC.com website - or the back of the T_3.2 itself you'll see a pad labelled "RST".

Switching that to Ground will reset the Teensy.

Using the TyCommander GUI application also provides a GUI button to reset a connected Teensy.

When a Teensy is externally powered cutting the VUSB trace will prevent contention or problems with two supplies powering the same lines. USB can still be connected to program the Teensy - but only when it is under external power when that trace is cut.

On the Teensy's where I've cut that trace I apply some eye catching color indication on the top of the USB hood - like a red nail polish. Otherwise you can suffer some amount of concern for the failure of the Teensy to appear when connected :(
 
the pin hole is right next to the Program button, you just need to ground it to do a reset, attach a wire there for your button

View attachment 13904

regarding the trace, yeah cut it if you plan on using 2 sources at once. Me, I didn’t cut the trace, instead I modified a usb cable (cut the red wire), that way the USB cable never supplies power to teensy and I can retain the trace for future use

the trace cut/modified usb cable only apply if you want both plugged in at same time

Sorry mate,

you gave the wrong graphic, this is for teensy 3.0 not for 3.2 as asked.
 
yup your right, i went after a google 3.2 result picture, shame on them! :)

well no choice must use pad
 
well, not really, you can make a reset via a normally closed button, attached to VIN or GND of teensy... pressing it will cut power, letting go restores power..
 
Normally closed to VIN would float when pressed - like it does when not connected … i.e. no reset? NC to GND would only run while pressed.
 
So, my only option with a Teensy 3.2 would be to disconnect and reconnect power through a switch?

No other options to think of?
Would be great to have some 'dedicated' reset button.

Thanks in advance.
 
So, my only option with a Teensy 3.2 would be to disconnect and reconnect power through a switch?

No other options to think of?
Would be great to have some 'dedicated' reset button.

Thanks in advance.
Sure, and the Teensy 3.5/3.6 now have a reset pin that is broken out in the row of pins next to the micro SD card reader.

In the Teensy 3.2, you would need to solder a wire underneath the Teensy to the pad that says 'RST', and connect that wire to a button that is connected to ground (as defragster said earlier). Or have something that interrupts the power.

 
You could add an interrupt on a pin, on FALLING edge (attachInterrupt), and have it trigger this code:

Code:
SCB_AIRCR = 0x05FA0004;

This should reset whenever the pin you chosen is grounded.
 
Here, I wrote you working code that uses any pin for a reset, in this case, I'm using pin 12...

This will reset Teensy whenever pin 12 is grounded, Enjoy :)

Code:
void setup() {
  pinMode(13, OUTPUT);
  attachInterrupt([COLOR="#FF0000"]12[/COLOR], pin_reset, FALLING);
}

void pin_reset() {
  SCB_AIRCR = 0x05FA0004;
}

void loop() {
  delay(100);
  digitalWrite(13, !digitalRead(13));
}

Tony
 
Last edited:
tonton81´s SW solution triggers the question: does the RST pad also resets the CPU when program is crashed, where typical SW solutions do not work?
 
The 'Reset' pad is wired direct to processor hardware reset on the schematics I see. So that would allow processor restart when ungrounded … bad code could take it away again ...
 
watchdog backup is solution for bad code.., the code i posted reboots the processor and USBSerial inclusively based on any pin a user chooses. This should be a solution for those people who don’t like soldering to reset pad on T3.2 and have a spare pin to use :)
 
Last edited:
So, my only option with a Teensy 3.2 would be to disconnect and reconnect power through a switch?

No other options to think of?
Would be great to have some 'dedicated' reset button.

Thanks in advance.

I realize this is a somewhat old thread, but in case others stumble in here:

You might understandably find it inconvenient to have a floating wire connected to the Reset pad under the Teensy 3.2, when the rest of the connections to the Teensy are by header pins, allowing the Teensy to be mounted in a socket, and removed as needed.

One alternative is to run a short jumper from that Reset pad to one of the header pins that's normally used for some I/O function that you don't intend to use. For example, you could run it to D23/A9/Touch. I/O pins normally power up and reset to "high-impedance", so as long as you don't accidentally program that pin, this should work fine.

Regardless of whether you use a solution like this, or just put up with a separate wire, you'll probably want to debounce the reset switch with at least a resistor and capacitor.

https://electronics.stackexchange.com/questions/218540/purpose-of-capacitor-for-mcu-reset-pin
 
Back
Top