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.
10 years, 5 months ago.
Changing mbed USB Serial Speed When Using RTOS?
Since the mbed RTOS causes problems with using the Serial class, declaring the usual "Serial pc(USBTX, USBRX);" doesn't work. Is it possible to speed up the mbed USB serial connection targeted by stdio's "print" commands? 9600 baud is rather slow for an RTOS and I would like to use 115200. I would prefer not to have to play around with the mbed-rtos source, if possible...
Question relating to:
2 Answers
10 years, 5 months ago.
Hello Thomas,
the object is defined as serial_t stdio_uart. The method which allows you to change the baudrate is
void serial_baud(serial_t *obj, int baudrate);
It should allow you to change a baudrate, using mbed HAL (be aware that mbed HAL is subject to change :-) ). Does this what you want to achieve?
How come Serial pc(..) does not work with RTOS?
Regards,
0xc0170
It seems that having a declaration of a Serial pc(tx,rx) in a RTOS application causes something to stall. Using the TCPEchoClient from https://mbed.org/handbook/Socket fails to communicate over serial or ethernet when I create a Serial object either at initialization or after initializing the ethernet.
posted by 03 Jun 2014