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.
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
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