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

Thread: How to add a teensy 4.1 reset button?

  1. #1

    How to add a teensy 4.1 reset button?

    Any suggestion on how to add an external reset button that will always reset the Teensy 4.1 (e.g. even if I pressed the programming button, or if my firmware is faulty).

    I couldn't find any T4.1 reset button or pin and the reset input of the MCU (FOR_B) seems to be connected to the license chip.

    It seems to be a basic functionality but I couldn't figure out how to do that.

    EDIT: can the on/off pin be used to hard reset the Teensy 4.1?

  2. #2
    Senior Member blackketter's Avatar
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    339
    Alas, no, there is no reset pin available on the Teensy 4.0 or 4.1. It is possible to do a software reset, but that won't help in the case of a firmware fault.

  3. #3
    Thanks @blackketter. The best I found so far is a pad at the bottom of the T4.1 that is connected to pin 4 (EN) of the TLV75733P and the PMIC_ON_REQ pin of the MCU. Shorting it to ground with a button (I am using a series 2K resistor, just in case), seems to hard reset the Teensy by temporarily disabling the 3.3V supply.

    I wish that that pad would have a hole so I can easily connect it to the main board that carries the T4.1.

    Click image for larger version. 

Name:	Screenshot 2021-03-26 200304.png 
Views:	8 
Size:	16.7 KB 
ID:	24195
    Last edited by zapta; 03-27-2021 at 03:04 AM.

  4. #4
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,701
    you can use a watchdog to reset on faults and also you can reset the teensy as well with watchdog.reset()

  5. #5
    Thanks @tonton81. Can I use the watchdog timer and an external reset button to reset the T4.1 when in Program mode?

  6. #6
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,701
    Program mode? you mean reflashing teensy? You can always use an external pin to "feed" the watchdog, or even trigger the reset() call

  7. #7
    Senior Member manicksan's Avatar
    Join Date
    Jun 2020
    Location
    Sweden
    Posts
    278
    If you connect a nc switch between VIN and VUSB with the external voltage pad cut (the pads in your schematic cutout at the top left)
    You would get a complete power cycle reset.

  8. #8
    Quote Originally Posted by manicksan View Post
    If you connect a nc switch between VIN and VUSB with the external voltage pad cut (the pads in your schematic cutout at the top left)
    You would get a complete power cycle reset.
    Thanks manicksan. Looking at Digikey for NC tactile switches, they are limited to 100ma. Do you know of a small one that can be mounted on a PCB and carry the full current? (I also use the 3.3V output to power stuff on the main board).

  9. #9
    Quote Originally Posted by tonton81 View Post
    Program mode? you mean reflashing teensy? You can always use an external pin to "feed" the watchdog, or even trigger the reset() call
    Can you explain with more details how to do that? My understanding is that when in reflashing mode (that is, after pressing the T4.1 onboard button), none of my code is actually active.

  10. #10
    Senior Member blackketter's Avatar
    Join Date
    May 2015
    Location
    San Francisco
    Posts
    339
    Quote Originally Posted by zapta View Post
    Thanks manicksan. Looking at Digikey for NC tactile switches, they are limited to 100ma. Do you know of a small one that can be mounted on a PCB and carry the full current? (I also use the 3.3V output to power stuff on the main board).
    Might be better off using a FET and a NO tact switch. It would probably be cheaper too.

  11. #11
    Quote Originally Posted by blackketter View Post
    Might be better off using a FET and a NO tact switch. It would probably be cheaper too.
    That's a good idea. I presume that would be a P-CHAN with a pull down resistor and a switch from gate to +Vin.

    It seems that a dedicated IC such as this one can also do the job. In my case a pair of those can also replace the two diodes oring between VUSB and external 5V.

    https://www.ti.com/lit/ds/symlink/lm...=1616810326596

  12. #12
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,282
    The simplest is a USB cable from which you carefully remove the insulation, cut the 5 volts and insert an opening switch. If you put a 2-pin jumper in there, you can use that at the same time to measure the required current. Additionally, this does not change anything about the teensy, and you can use it for any project.

  13. #13
    Quote Originally Posted by Frank B View Post
    The simplest is a USB cable from which...
    Unless if your circuit is like mine and a battery kicks in when the USB power is lost. ;-)

    I used a diode OR between the VUSB and the regulated 5V from the battery.

Posting Permissions

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