Recent changes
Order
tag order
CMSIS RTOS
RTOS
mbed Website Releases
Help
mbed NXP LPC1768
Firmware
Homepage
From the mbed microcontroller Handbook.  

No USB serial FAQ

Question :

I am trying to commumicate with the mbed Microcontroller over the USB serial port, and it is not working. How do I fix the problem?

Answer :

If the instructions on PC serial do not help, the first step is to diagnose the problem:

1) Check the driver

For windows, the windows driver needs to be installed as described in Windows serial configuration.

Even if you have already installed it, read the above page carefully, as you need to reinstall the driver for each new mbed Microcontroller.

2) Is the serial port visible?

You should be able to see the mbed serial port. See the start of PC serial for instructions on how to check it

3) Is the Microcontroller transmitting?

See if the Microcontroller thinks it's transmitting ok by building a simple program to test the serial port.

Code

#include "mbed.h"

DigitalOut led1(LED1);
Serial pc(USBTX, USBRX);

int main() {
    while(1) {
        pc.printf("Hello World!\n");
        if(pc.readable()) {
            pc.putc(pc.getc() + 1);
            led1 = !led1;
        }
        wait(0.1);
    }
}

When running, you should see the Status LED flickering as it is sending characters. On Vista, Mac and Linux, you may need to open the USB serial port before it opens the connection and starts flashing e.g. by connecting with screen.

4) Check the PC Terminal

If the Status LED is flickering, then data is being sent so the problem is the PC end.

The main problem we've seen here is that when you unplug the usb cable whilst connected, then replug, you will need to "disconnect" and "connect" to the serial port again.

5) Use a different USB port

Trying a different USB port might work, and may allow you to reinstall drivers etc to go through the whole flow again.

6) It's still not working...

If you got this far, it is something we've not seen before. Please contact support@mbed.co.uk, with a full dump of the PC/OS specs and any other diagnosis info and we can take it from there.




calendar Page history
Last modified 22 Jul 2010, by   user Dan Ros   tag No tags | 0 comments  

Please login to post comments.