Upload Arduino Sketch to Teensy 4.0 using Another Teensy via SPI/I2C?

Svarun123

Member
Is it possible to upload an Arduino "INO" code file to a Teensy 4.0 microcontroller via another Teensy (or any Arduino microcontroller), using SPI or I2C and the Arduino IDE v2.3.3?

So:
1728545123651.png


I'm aware that it's possible to do using regular Arduinos, as described in several other posts, however the vast majority of those usually do it via one of the serial lines present on the microcontrollers. I was wondering whether it would be possible to do it using the SPI or I2C pins instead.

Thanks for reading my post, any guidance is appreciated.
 
If "possible" means any software exists to do so, then the answer is no. Or at least as far as I know, nobody has written such software. I definitely have not.

Maybe it could theoretically be done with a lot of programming work, using the USB host port to connect another Teensy while the PC talks to the USB device port. But USB protocol is much more complicated than ordinary serial used by regular Arduino, so this wouldn't be as simple to create as with serial.

If someone did write this software, using Teensy 4.0 for the hardware between the PC and other Teensy 4.0 would be difficult. Teensy 4.0 does have the USB host port, but it is only the 2 data pins on bottom side pads. Teensy 4.0 lacks the USB host current limit switch which is on Teensy 4.1. To make this work using only Teensy 4.0 would probably require external 5 volt power.
 
If "possible" means any software exists to do so, then the answer is no. Or at least as far as I know, nobody has written such software. I definitely have not.

Maybe it could theoretically be done with a lot of programming work, using the USB host port to connect another Teensy while the PC talks to the USB device port. But USB protocol is much more complicated than ordinary serial used by regular Arduino, so this wouldn't be as simple to create as with serial.

If someone did write this software, using Teensy 4.0 for the hardware between the PC and other Teensy 4.0 would be difficult. Teensy 4.0 does have the USB host port, but it is only the 2 data pins on bottom side pads. Teensy 4.0 lacks the USB host current limit switch which is on Teensy 4.1. To make this work using only Teensy 4.0 would probably require external 5 volt power.
Thanks for your reply;

Would it be possible to do it using another Arduino-based microcontroller as the intermediary in my example? An ESP32 for instance? What I'm really only looking for is whether it's possible to upload code to a Teensy 4.0 via SPI or I2C from *any* microcontroller.
 
Back
Top