PDA

View Full Version : Teensy++ 2: rebooting instead of uploading code



el_supremo
03-17-2013, 10:46 PM
Someone might find this useful.
I needed to be able to reboot my Teensy++2 without uploading the code.
In order to have the T++2 just reboot, you have to hold the ALE pin high.
I noticed that the +5V pin on the bottom edge of the board (I consider the USB jack to be at the top) is nicely in line with the ALE pin. In order to connect them together I made a jumper from a female 6-pin header by connecting two of the pins together and cutting the rest of them off. Then I soldered a male jumper pin on the top of the board to both ALE and +5V.
When I'm uploading code using the USB port, I put the jumper in one of the two positions which doesn't short the pins. In this position one of the unused pins will have +5V on it which is why I cut all the spare ones off so that I don't have +5V hanging in the air waiting for me to be careless and short it to ground.
When I just need a reboot, I put the jumper in position to short ALE to +5V and then push the reset button.
Here's two photos of it. One shows the jumper beside the T++2 and the other shows the jumper in position for a reboot. Ignore the black wire on the left - that's for a different part of the project. Also ignore my less than stellar soldering job :o
http://members.shaw.ca/el.supremo/Tpp2_ALE_jumper_1090x.jpg
http://members.shaw.ca/el.supremo/Tpp2_ALE_jumper_1091x.jpg

Pete

Qumefox
03-18-2013, 05:08 AM
Dumb question, but would cycling power to the teensy not accomplish the same thing?

el_supremo
03-18-2013, 03:07 PM
Not dumb at all. The problem I have been having is that if I recycle the power by removing the USB cable and then plug it back in, I get into trouble with the COM port disappearing. Last night the jumper/reboot seemed to have fixed it. But now in the cold light of morning it is still not rebooting properly.
Back to the breadboard.

Pete

el_supremo
03-18-2013, 04:39 PM
There are actually two problems. One is that cycling the power by removing and reinserting the USB plug somehow causes the device I'm trying to drive (a DDS-60) to come up in an undetermined state and so far the only way I've found to clear it is to then remove that device from the circuit altogether and then plug it back in while the USB power is on. The reboot jumper allows me to run a test several times over without having to remove the DDS-60 to restore it to sanity.
The other problem is the COM port disappearing on me. I haven't nailed that one down yet.

Pete