Boot and reset buttons

bigpilot

Well-known member
Why don't Teensys have seperate "boot" and "reset" buttons like newer ESP32 products?

I find that much more convenient than having to reset the device by the Teensy Loader.
 
Why don't Teensys have seperate "boot" and "reset" buttons like newer ESP32 products?

I find that much more convenient than having to reset the device by the Teensy Loader.
You could always tie this code to an i/o pin.

Code:
void doReboot() {
  SCB_AIRCR = 0x05FA0004;
}
 
The question could be put another way, do the ESP32 products _need_ a reset button? Resetting can be done programmatically, or with a watchdog timer. Why would one _have_ to reset a board anyway? Power-cycling can be used to reset for instance.

One datapoint is that its a known phenomenon that in electrically noisy environments reset lines can trigger spuriously - especially with internal pull-ups only.

Another example is the RPi Pico - doesn't have a reset button either, just BOOTSEL.
 
Why would one _have_ to reset a board anyway? Power-cycling can be used to reset for instance.

I've got a project that is externally USB powered AND has the USB cable from the Teensy to the development machine. I have to unplug two cables to power it off. During debugging it's a PITA to do that.

I've built a computer with emulated CPU that is a "black box" computer, and it is possible to hose the emulated-target code (within the emulation) in such a way that backing out multiple levels of (host) calls to recover/continue (files open on emulated devices; CPU executes a HALT or JMP $) is complex, and serves no great end. And user experience "expects" RESET switch.

The SCB_AIRCR = 0x05FA0004; solution works great for this!
 
Last edited:
The question could be put another way, do the ESP32 products _need_ a reset button? Resetting can be done programmatically, or with a watchdog timer. Why would one _have_ to reset a board anyway? Power-cycling can be used to reset for instance.

One datapoint is that its a known phenomenon that in electrically noisy environments reset lines can trigger spuriously - especially with internal pull-ups only.

Another example is the RPi Pico - doesn't have a reset button either, just BOOTSEL.

It's a little off topic but there are OK reasons to have a reset button. I have ESP32 (original) projects where I use the reset button to quickly look at the start up behavior. An ESP32 has no USB port so you always have a USB to serial converter. Thus, a reset pin on the ESP32 resets it but not the serial converter and you can easily capture all the start up text. Otherwise, it can be tougher to capture this stuff. On something like a Teensy you have to either delay a lot or make the sketch wait for USB to connect. That second option is completely hit or miss for me.

So, reset buttons do have a purpose. But, do you need them in the final product? Perhaps not.
 
The main 2 reasons are size and history.

Since Teensy 1.0 in 2008 only a single pushbutton has been used, dedicated to the purpose of entering programming mode no matter what has gone wrong in the software.

The most popular non-Teensy boards on the market at key moments of Teensy's history also used a single pushbutton: Arduino Diecimila & Duemilanove (later replaced by Arduino Uno) when Teensy 2.0 was designed 2009, and Mbed (later acquired by ARM and turned into a software-only business) when Teensy 3.0 was designed in 2012.

1761011546519.png


This isn't a great direct technical comparison, especially with Arduino which used a dedicated USB chip and the pushbutton does reset the microcontroller. But the point is simplicity ultimately won in the market, at least in those times. Please keep in mind ESP8266 came later, with usable open source software appearing in 2015. As I recall, no pushbuttons on any ESP2866 boards back then, just 2 chips, antenna PCB trace, a few parts and 8 pin header. ESP32 sometime well after ESP8266.

The other main reason is Teensy's physically small size. Perhaps 2 tiny pushbuttons could be crammed in somehow? But during Teensy 1.0 and early Teensy 2.0 we heard consistent feedback that the pushbutton was too small and difficult to press. Some people even damaged them. Compare with the 2 photos above, which use 6mm pushbuttons. When Teensy 3.0 was designed in 2012 we switched to the only slightly larger pushbutton and later Teensy 2.0 was updated to use it.
 
2 tiny pushbuttons could be crammed in
These are awful to use. ESP32 doesn't have PJRC clean bootloader and needs two in combo to get it usable at times (forgot CDC on boot) - depending on which of the many MCU variants.
Which button is which when you can't see them and when do they get used in what combination when needed.
And the TINY things are below the height of the USB connector - about impossible to negotiate.
1761016469445.png
 
I think the current Teensy design is great. The funny port write resolves my weird corner cases.

One of the major complaints from computer folk at the time (I was probably one of them; I just don't remember) about the IBM PC's and workalikes was the lack of a reset button on the front panel. "Its supposed to be there" but mainly it was habit and unreliable software and hardware that required it.

I only get in trouble doing foolish things during development, and I could probably count the times I said "I wish I had reset" on one hand. And everything has a cost...
 
Back
Top