Forum Rule: Always post complete source code & details to reproduce any issue!
-
Debug and sketch upload over serial# UART?
I am facing a situation where I need the on-board micro-USB of the Teensy for other purposes, but don't want to lose the ability to connect to PC, including for dev/debug over COM.
Is there an example of anybody using any of the non-USB serial
https://www.pjrc.com/teensy/td_uart.html
for debug including sketch upload?
Say, with an off-the-shelf USB-to-serial adapter: USB attached to the PC, serial attached to Teensy?
Is it just a matter of making the Teensy Serial# show up as COM on the PC, or are there other constraints e.g. on sketch upload?
-
Senior Member
Teensy uploading is done using USB HID protocol. USB serial isn't used at all for uploading.
Teensy only acts as a USB serial device while running your program, and only if Tools > USB Type is set to one of the options with Serial.
-
-

Originally Posted by
PaulStoffregen
Teensy uploading is done using USB HID protocol. USB serial isn't used at all for uploading.
So that means whenever I want to change the sketch, I have to physically unplug the target host and plug the dev PC into the on-board micro-USB?
I could run the uploader on the target, as part of a test app.
Start here?
https://github.com/PaulStoffregen/teensy_loader_cli

Originally Posted by
PaulStoffregen
Teensy only acts as a USB serial device while running your program, and only if Tools > USB Type is set to one of the options with Serial.
I found this
https://forum.pjrc.com/threads/26024...a-new-USB-type
so I could try to tailor a custom type to whatever the target hosts support/permit. As you mentioned in the original threat - thanks!
Last edited by b2020; 05-16-2020 at 07:17 PM.
-
From
"Teensy can only be programmed through the USB Micro connector - or {for T_3.2} the equivalent USB pins connected on the underside. There is no mapping through UART Serial or other way to program a Teensy through the bootloader chip."
https://forum.pjrc.com/threads/57963...Serial-adapter
-
For debug printf to PC over a non-USB Serial, I'll try something like this
https://www.amazon.com/CP2102-Module...dp/B009T2ZR6W/
from https://openwrt.org/docs/techref/har....serial.cables
If somebody has used something like this with a Teensy 3.x or 4.x and has a recommendation, links appreciated.
-
I use the CP2104, more compatible with Windows 10:
https://www.amazon.com/WINGONEER-CP2...9657667&sr=8-9
and yes, I often use Hardware Serial1 as a debug port to the PC.
I have my own Serial Terminal, but any will do, for example the notorious PUTTY.
-
Senior Member+
Yes if set to 3.3V and connected to Teensy UART that should work. Or it can be done with another Teensy with a simple ECHO program.
@XFer linked item seems better as noted.
TyCommander in use here works with Multiple Teensy's and should connect to the CP2104 as terminal too.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules