Software reset of Teensy 3.1

Status
Not open for further replies.

erudyk

New member
Hey,
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,
Ed
 
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):
Code:
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.

Regards,
Paul
 
Status
Not open for further replies.
Back
Top