Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I downloaded the driver to connect to mbed via USB. I flashed a serial communications example program on the mbed board.

I've connected to it via Tera Term, at 9600 baud, 1 stop bit, no parity, and 8 data bits. I've also selected LF for Receive under terminal setup.

mbed is hooked via its standard program loading USB. Can I not use this one? I made it printf to both USBSerial serial, and Serial pc(USBTX, USBRX).

Is my mbed device dead? Or am I missing something?

USBSerial serial;
Serial pc(USBTX, USBRX);

int main(void) {
   uint8_t buf[128];
   pc.baud(9600);
   while(1)
   {
       serial.scanf("%s", buf);
       serial.printf("recv: %s", buf);
       pc.printf("recv: %s\r\n", buf);
   }

}

share|improve this question

1 Answer 1

up vote 2 down vote accepted

After looking at the mbed example code, it appears that you cannot use both USBSerial serial; and Serial pc(USBTX, USBRX);. What would be the point of that anyway? Just use Serial pc(USBTX, USBRX);.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.