8 years, 3 months ago.

High speed serial Communication with PC

I am trying to send data gathered from MPU9250 motion sensors to my PC terminal via USB cable. I need to send data as much fast as possible.. at least 1000 data sets per sec. A data set is just 4 floating point numbers with comma separated.

How Can I send it..

Is there any other way using wifi or bluetooth or etthernet to achieve such a rate.

I am new to this mbed platform, please help me.

Thank You

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F401RET6 microcontroller.

1 Answer

8 years, 3 months ago.

This is achievable with the serial port over USB. Crank it up to 460800 or faster.

Accepted Answer

Thanks Bill,

Are you talking about baudrate, I am afraid whether my processing application will handle the rate..

posted by Gawsalyan Sivapalan 25 Jan 2016

If your application is on a windows PC then a baud rate of 460800 maybe used. On a Linux machine much higher baud rates can be used. If the application is on another uC 460800 and higher can be used.

posted by David Fletcher 25 Jan 2016

The application on the mbed or on the PC?

The mbed can handle it but you do have to structure the code well. Use something like MODSERIAL to buffer the serial port. Have the incoming data handled by an interrupt and put into a buffer with minimal processing and then the main loop of the code reads from the buffer, does any processing needed and sends it out on the serial.

If you are talking about the PC side then fire whoever wrote the PC application. If a 100MHz 32 bit CPU with no floating point unit can handle it then a 2GHz multicore CPU with all sorts of fancy hardware acceleration should be able to.

Sending as text a floating point will be about 8 characters plus a comma between values rate * number of values * size of data * symbols per byte = 1000 * 4 * 9 * 10 = 360kBaud needed.

So you do need to run the port at 460800 minimum. Most mbeds will happily handle twice that.

posted by Andy A 25 Jan 2016