Updating Teensy in an Embedded System

Status
Not open for further replies.

Dropshot

New member
Good morning,

First off, I must say that designing a product based on the Teensy 3x and 4x boards has been wonderful. I'm coming from an ESP32 background, but this particular project benefits from Teensy's raw power and its DMAChannel abstraction. This application actually has a host system on board (raspberry pi zero) connected via traces to the serial pins on both ends. My question is mostly around field upgrades to the firmware. In ESP32 land, I'd also the boot/enable pins to be able to get the device into flash mode, then use a command line tool to blast the new image via serial. Is there not a similar process for Teensy? I recall there being key differences in the way the bootloader handles things. It'd be nice to be able to package updates on a single source (like a USB stick) and then the system could handle updates on both the pi and the Teensy. I'm thinking teensy_loader_cli with a hex file can/should be used in this case?

Just confirming my approach with people more knowledgeable!

Right now, I've designed things on Teensy 3.6, but will also be testing out Teensy LC with our current workload.

Thanks!
James
 
The only official way to upload code is via the Teensy USB port. If you have the Teensy USB plugged into the Raspberry Pi, that seems like it would be the most straightforward approach, use the hex file and the teensy_loader_cli running on the Pi to issue the update. Otherwise, search the site for "over the air updates" for a lot of homebrewed options.
 
Seconding brtaylor's comment. Since you have the R-Pi in the system, much better to use it, especially if you plan to go from Teensy 3.6 to Teensy LC.
 
Bummer.

So I guess I'll either have to:
1. Design some alternate OTA process that uses the upper half of flash and some bootstrap code with sanity checking, etc.
2. Include a USB cable with the kit to have the user connect between the boards, or leave it connected from the factory.
3. Migrate away from the stock Teensy 3/LC boards and either back to the ESP32 (port the code) or do my own spin based on the MKL02.

Oh well, is what it is I guess. Perhaps this is one of the things that the MKL02/DIY teensy things were meant to address.
 
For custom boards, the MKL02 needs to be purchased from PJRC. Same limitation of the USB based firmware upload. The nice thing is that if you spin your own Teensy board and use a Raspberry Pi compute module, then the USB trace between the Teensy and Raspberry Pi can be completely implemented on the PCB - no cable needed and you can end up with a very compact integration of the two.
 
Status
Not open for further replies.
Back
Top