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

Thread: When do you need the teensy reset button?

  1. #1
    Junior Member
    Join Date
    Oct 2015
    Posts
    3

    When do you need the teensy reset button?

    I use a Teensy in a flight simulator instrument project. The device is built in an hard to get physical access to. I wonder when do you actually need to press the reset button?
    Before I close the instrument up - would it be good idea to connect a button (placed where I can reach it) to the reset line?
    I will probably need to upgrade the firmware at times.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,039
    With USB active in the Teensy and USB port handy you rarely need its 'program' button - if a single Teensy is on the host. With more than one Teensy online (unless you use TYQT - or other tool?) you need to tap the program button to pick the Teensy for upload to that selected device - when it isn't the first seen.

    Reset is a separate connection only needed I suppose if you can't power cycle it, or find that problematic. But TYQT GUI can do a reset too.

  3. #3
    Junior Member
    Join Date
    Oct 2015
    Posts
    3

    OK. Thanks for the info.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,314
    Every Teensy has the program button (which puts Teensy into programming mode, rather than "reset" to run your application) because it's possible for any program running on Teensy to disable the USB port, or otherwise prevent the USB interrupt from running.

    If your program "crashes" by entering an infinite loop, but the USB port is still active and interrupts are enabled, Teensy will still be able to respond to the reboot request. However, if your program disables interrupts, or enters an infinite loop within an interrupt which blocks the USB interrupt, Teensy will never respond to the reboot request. Pressing the button is necessary in those cases. That's why every Teensy has the button.

    So it really depends on the type of code you develop. If you do "normal Arduino stuff" where you use well tested libraries to access hardware, odds are very slim you'll get into such a situation. But if you do more advanced coding, where you disable interrupts (hopefully only briefly) or develop your own interrupt code, especially if you're developing low-level code to access sophisticated hardware, or if you use the low-power sleep modes (where USB is off), you'll almost certainly hit situations where you have to press the button.

    Code:
    would it be good idea to connect a button (placed where I can reach it)
    Well, yeah, that'd be a good idea. But if you only use the normal Arduino & Teensyduino functions and you never mess with interrupts and special low power modes, it may be more trouble than it's worth.

  5. #5
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,070
    In my setup (64-bit Linux Fedora 22 on a 4 core i5 ZAreason 3.2Mhz system), I seem to need to push the button the first time I run the Teensy arduino program and it brings up the installer program. As long as I don't stop the installer program (the arduino executable is fine), I won't need to press the reset button on subsequent downloads.

  6. #6
    Junior Member
    Join Date
    Oct 2015
    Posts
    3
    Got it. Thank you!

Posting Permissions

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