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.
7 years, 7 months ago.
Does mbed-os have something default assigned to usb serial?
I have the following code that just passes through serial data from computer to a modem. Works fine with mbed as the library but not with mbed-os. Code:
- include "mbed.h" Serial pc(USBTX, USBRX); Serial skywire(PA_9, PA_10);
char c;
int main() { skywire.baud(115200); pc.baud(115200); pc.printf("Hello World !\n"); while(1) { if(skywire.readable()) { c = skywire.getc(); pc.putc(c); } if(pc.readable()) { c = pc.getc(); skywire.putc(c); } } }
Output with mbed library. (mbed2)
at
OK at
OK at^sica?
^SICA: 1,1 ^SICA: 2,0 ^SICA: 3,1 ^SICA: 4,0 ^SICA: 8,0
OK
Output with mbed-os
Hello World ! a I actually typed at here.
RR I assume this is supposed to be error which leads me to believe that the AT that I typed never made it to the modem.
It seems to me that there is something else listening to the serial communications and snarking them from my pc serial device.
Any thoughts?