Teensy 3.2 serial hello world

10 Mar 2018

Hi,

Tried using the MBED OS Serial example

https://os.mbed.com/teams/mbed_example/code/Serial_HelloWorld/file/e540d7769e69/main.cpp

On my teensy 3.2 - but alas it doesn't bring up a serial connection on the USB interface. I dug into the code the reason is in:

https://github.com/ARMmbed/mbed-os/blob/master/targets/TARGET_Freescale/TARGET_K20XX/TARGET_TEENSY3_1/PinNames.h

which defines:

USB Pins USBTX = PTB17, USBRX = PTB16,

Now PTB16 and PTB17 from the teensy schematic are pins 0 and 1 on the teensy - its a uart output, and doesn't connect to the USB.

Now on reflection I can see why its been coded like this, the teensy usb d+ and d- are wired directly to the target arm chip. So no uart output can go over the usb connection.

Checking in the mbed OS - and I can't find a USB library. So has anyone set up a USB library for the teensy. Reading the K20 reference manual - and setting up USB properly is quite some effort.

Otherwise I'll be left reading the teensy output via the uart pins ....