Teensy 4.0 - Enter programming mode without hardware button

alcnonl42

Member
Hello friends. I have a Teensy 4.0 device and I've made significant progress on my project, nearing completion and about to release it. I have a problem and would appreciate your help. To be able to send updates to the device, I need to create a hex file and install this update to the device on my customer's computer, but the device is in an enclosure and there's no access to the programming button. There's also an interface that can communicate with the Arduino via HID. I'm wondering if I can add a button to this interface and use a command I'll run on the Arduino to put it into programming mode. I'm going to give my customer a loader, but I can't upload hex files without pressing the programming button, and I'm looking for an alternative way to enter programming mode other than the hardware button. Thank you in advance for your help.
 
I can't tell if you are willing to add a "PROGRAM" button to your enclosure or not. If this is an acceptable approach, the T4.0 pin diagram <here> shows that you can wire an external button between the "Program" pin & ground (at the end of the T4.0 opposite from the microUSB connector). Pressing this button will put your T4.0 immediately into programming mode.

Hope that helps . . .

Mark J Culross
KD5RXT
 
You most certainly can upload new firmware to a Teensy 4/4.1/MM without having to push any buttons. I do it all of the time. The excellent FlasherX code will let you do it from your existing program. Then you can write via serial/can/sdcard. Or, generally you can also just do a USB initiated reset. This also works fine and puts your board into programming mode.

I published a version of the teensy cli tool with a bunch of changes that other people had posted as pull requests to the main repo. My contribution was mostly just putting all the pieces together. But, it shows how to trigger programming mode from Windows and Linux. MacOS never worked right.

 
Back
Top