Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 6 months ago.
Teensy 3.1 Teensy 3.2 USBSerial not Showing Anything + Its Fix
Dear all, I encountered problems with USBSerial using Teensy 3.1. I have been working with Teensy 3.1 with Arduino Teensyduino plugin for a long time. There was no problem with Arduino plugin. When mbed updated Teensy 3.1 as a supported platform + export to offline toolchains, I tried following code, but no printf appear on serial terminal. LED blinked properly
#include "mbed.h" #include "USBSerial.h" DigitalOut OnBoardLed (D13); USBSerial hPC; int main () { while (1) { OnBoardLed = 1; wait (0.5); hPC.printf ("ON\r\n"); OnBoardLed = 0; wait (0.5); hPC.printf ("OFF\r\n"); } }
The problem is that I am not seeing the printf message via terminal. I use YAT terminal. I can connect to the terminal via YAT, but nothing appear. LED is blinking OK. Why?
These are the procedure to reproduce the problem 1. Windows 8.1 PC, download and install driver from this link https://developer.mbed.org/handbook/USBSerial 2. The driver is not signed, but installed it any way 3. Teensy appear in Windows as Mbed Virtual Serial Port COM20, baud rate = 9600? 4. Export mbed project to EmBlock 5. Build the project using EmBlock installed ARM GCC EmBlock installed bare-metal compiler 6. Use TeensyLoader to load the HEX file to Teensy 3.1 7. Try terminal program YAT. It cannot open the port COM20 8. Try PuTTY. It cannot open the port COM20 9. Also tried mbed online compiler. LED worked, printf never worked
Fixes 1. Install Arduino + Teensyduino plugin + Teensy 3.1 driver as usual 2. There is no need to install driver from this link https://developer.mbed.org/handbook/USBSerial 3. The driver is NOT signed, cannot install unless turn off driver signature requirement 4. You must use Windows XP PC OR Windows 7 PC, no Windows 8 PC, no Windows 8.1 PC 5. Serial terminal show printf without problem
1 Answer
8 years, 6 months ago.
I have a Teensy 3.1; a similar test program produces a print output when I choose the correct port ( I use a Gtkterm linux terminal)
Did you check https://developer.mbed.org/handbook/USBSerial and install the driver ?
This was tested :
1)with a offline compiler GCC-ARM and a library around november 2015
2) now with the online compiler
I am pretty sure the problem is around Windows .
If you are familiar with the Arduino way , add Teensyduino and you can do the same test within the Arduino/ TeensyDuino. Look at http://www.pjrc.com/teensy/teensyduino.html and http://www.pjrc.com/teensy/tutorial.html
Good luck
Yes, I have been using Teensy 3.1 via Arduino way. But I would like to switch to mbed way. But no luck in getting USBSerial to work. My PC is Windows8.1 Was your PC Windows7?
posted by 11 Feb 2016My PC is Linux (Ubuntu 14.04)...no driver needed
If you run a similar test on mbed and on Teensyduino, do you receive the printf output with the Arduino software?
You are connecting to the mbed com port? And did you update mbed library and USBDevice library to the latest version?
posted by Erik - 11 Feb 2016I made update to my initial question. Please look again. Thank u
posted by WAI YUNG 11 Feb 2016Can you try it with the online compiler? Just to rule that issue out. And COM20 is the Teensy? So if you unplug it, it is gone?
posted by Erik - 11 Feb 2016Yes. I also tried mbed online compiler. LED worked. Printf did not work. If I unplug Teensy 3.1, COM20 disappear. I can open COM20 in PuTTY, but nothing come out.
posted by WAI YUNG 11 Feb 2016I have updated the my initial post with a fix. It is a Windows 8 problem after all. Thank u
posted by WAI YUNG 14 Feb 2016Good to read you got it semi-solved. But it should work also on W8.1 (Worked for me, and now on W10 too). Only indeed the whole unsigned driver thing is a pain to go through the process.
posted by Erik - 14 Feb 2016