Reset and program pins

Status
Not open for further replies.

hpgmiskin

Member
I have a Teensy connected to a Raspberry Pi which communicates over serial.

On occasion the Teensy crashes or gets stuck in an infinite loop, no doubt through an error in my code. In order to ensure that the Teensy can always be recovered I have connected the reset pin to the GPIO pins so that I can drive it high when the Teensy needs to be reset. This is working correctly in isolation.

Subsequently I have added the ability to update the Teensy remotely, therefore connected the program pin to the GPIO which by default is held high. Then shortly after running the Teensy command line tool I set the pin low for a short period of time. This again works correctly in isolation using the following command.

Code:
teensy_loader_cli -mmcu=mk20dx256 -w -v firmware.hex

However I have not been able to get the program pin to work when the reset pin is connected to the GPIO headers. Whether the reset pin is held high, low or not configured at all I cannot make the program pin put the Teensy into a state where it can be updated. Please can anyone advise what I might do in order to make this work? Perhaps there is an elaborate sequence of pin states that I can perform, or maybe I am just missing something very obvious?

Thanks in advance
 
Reset is also connected to the bootloader IC
https://www.pjrc.com/teensy/schematic.html
If you are controlling that from the PI, that may be changing the reset process if the Pi pin is not a true high impeadance. A multimeter measurement or better yet a scope shot of the reset pin voltages during a program cycle with and without the PI connected may be informative.
 
Thanks for your response, I have had a look high impedance pins and the definition of tri state as these concepts were new to me. For anyone reading who has as limited electronics knowledge as me, a true high impedance is a floating state where a pin is neither held high or low (thanks wikipedia).

I am going to attempt an automated program cycle but configure the reset pin as an input. This will place the pin into the desired floating state and hopefully not affect the program pin functionality. I will report back on if this is successful and if not provide some more data on voltage current profile during the program cycle.
 
I can confirm that with the reset pin connected and configured as a input pin on the Raspberry Pi GPIO the program pin functions correctly. Thank you @GremlinWrangler for your support
 
Glad to hear that you could persuade the Pi GPIO to do what you wanted, since it is always interesting getting multi purpose pins to behave electrically.
 
Status
Not open for further replies.
Back
Top