hard reset

Status
Not open for further replies.
Hi,

I am new to Teensy. I want to know if there's a way to simulate a physical unplug of the device from the USB port? perhaps I am trying to ask is how to make a hard reset within the user program?

If I have two Teensy(one 3.0 and one 2.0), by using "Rebootor" will I able to achieve the physical unplug? like using the Teensy 3 to control the hard reset of Teensy 2. but how to do the wiring part?

Thanks in advance,

Tako
 
the classic way is to force a watchdog timer timeout/reset. Not identical to power-on reset, but close.
On the Teensy's there's a way to invoke the bootloader from an user program.
The Teensy3 has a different consideration... the co-processor's reset.

this topic has been discussed here.. some clever searching will turn it up for you
 
Last edited:
Thanks for your reply, I did search the forum and came out with the following post:

http://forum.pjrc.com/threads/791-Embedding-Teensy-3-in-project-Reset-and-PGM-pins?highlight=reset

So to reboot to user program instead of loader, all I need to do is jump a wire from the reset directly to button connector?

what I need to accomplish is to have the Teensy 2.0 doing hard reset(simulate physical unplug) at a constant interval.

will it be easier if I use two Teensy? if so how's the wiring diagram going to look like?

Thanks,
 
hm.. hard reset and software initiated restart are not the same?

The watchdog method you've mentioned I wasn't able to find a post related to it, mind if share how it does to simulate a physical unplug?

Thanks,
 
The watchdog timer reset code that I use on the Teensy 3.0 is here

Not to hijack the thread here, which is a little old and I do have a question... jimmayhugh... your code is brilliant! It works great for me too! And I can initiate a reset from remote (from my RPi) by sending a command that when the Teensy interprets it, it does a nointerrupts() and then goes into a while(1) loop. I have tested it several times and it is flawless!!

So my question. What is the significance of the values you used in the "kick the dog" code? And if I want to change the count-down delay, what should I look for?

Thank you!

EDIT: I found it. The hard way! Your code clearly states where the watchdog duration is set. I went to the manual for the processor and there it was. Neat stuff!!
 
Last edited:
Status
Not open for further replies.
Back
Top