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

Thread: Software reset of Teensy 3.1

  1. #1
    Junior Member
    Join Date
    Feb 2014

    Software reset of Teensy 3.1

    This is probably a newbie question. I want to software reset the board. I found out that the way to do it properly is by using _restart_Teensyduino() or _reboot_Teensyduino() functions.
    I found out that both are defined in core_pins.h. Including this allowed me to compile the code, but it fails with "undefined reference to `_restart_Teensyduino_'" during the linkage.
    Any ideas?

    Thank you,

  2. #2
    Senior Member PaulS's Avatar
    Join Date
    Apr 2015
    Hi Ed,

    Today I was looking for exactly the same function and found out that the _restart_Teensyduino() and _reboot_Teensyduino() functions did not work for me.
    What did work was the following (Paul posted it somewhere on this forum):
    SCB_AIRCR = 0x05FA0004; // software reset
    Just add this line where you want it to be executed in your code and the Teensy 3.1 will reset.
    It will disconnect from the USB port, then re-connect and execute your code as if you powered the Teensy 3.1 up.


Tags for this Thread

Posting Permissions

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