9 years, 5 months ago.

Is USBSerial working on mBed LPC11u24?

Hi all,

Is the USBSerial Hello World (see link below) still supported by mbed LPC11u24? Can you confirm that it works as it is? I am not receiving anything on the terminal.

Many thanks

Milan

http://developer.mbed.org/users/samux/code/USBSerial_HelloWorld/file/d88699a0905a/main.cpp

USBSerial Hello World Example

#include "mbed.h"
#include "USBSerial.h"
 
//Virtual serial port over USB
USBSerial serial;
 
int main(void) {
 
    while(1)
    {
        serial.printf("I am a virtual serial port\r\n");
        wait(1);
    }
}

1 Answer

9 years, 5 months ago.

It should work fine. Since it blocks on connect, you are using the D+ and D- pins to make the USB connection? Otherwise you should use PC Serial.

Hi Erik,yes simply connecting to USB connector (D+,D-) and running serial terminal. I know that PC Serial works fine but I need USBSerial. Some of my colleagues also never had USBSerial working on LPC11u24 so they are using PC Serial instead.

posted by Milan Stefko 19 Nov 2014

I can test it later myself, but I would be very surprised if it didn't work since there are a whole bunch of platforms based on the LPC11u24 and its brothers which only have USBSerial: If that didn't work there should have been comments regarding it.

posted by Erik - 19 Nov 2014

That would be very helpful. I also have a different platform based on LPC11u24 and USBSerial is working on it. I came across an issue there that I want to double check on original mBed but to start with I can't get the USBSerial to work on mBed. If you could confirm that you can run the above code on mBed LPC11u24 as it is then I would know that the problem is somewhere else. Many thanks

posted by Milan Stefko 19 Nov 2014

I verified it using my LPC11u24 on an mbed application board, sometimes serial port didn't show up after a reset, but in general it functioned fine.

So I would guess you got a problem with the wiring.

posted by Erik - 19 Nov 2014

Thank you for your time Erik I appreciate it. I am glad you can confirm that it runs fine on your mBed, just for clarity is it this unit that you were using? http://developer.mbed.org/platforms/mbed-LPC11U24/ We have at least three around and USBSerial doesn't work on either of them just straight out of the box. There is no wiring just plugging in USB cable compiling the above code and opening terminal to related COM port. Firmware has been updated, driver for terminal installed. I have another dev. board based on the same IC and the USBSerial works fine there. Really becoming an issue.

posted by Milan Stefko 23 Nov 2014

Well you would need to wire that USB cable to D+ and D-, you cannot plug it in the USB connector. And yes thats the board I got.

posted by Erik - 23 Nov 2014