Go Down

Topic: High speed USB communication using C/C++ (Read 890 times) previous topic - next topic

jiblets

Hi all,

I am currently trying to send data between MATLAB (2007b) and a DUE( Native port ). This is not a problem, but the maximum speed seems to be ~15kB/s, which is much slower than I would like. I was wondering if anyone has had any experience doing this? Are there are any C/C++ libraries that could be used to utilize the full USB 2.0 functionality available with the SAM chip?

Thanks

Collin80

How were you using the native port? With the SerialUSB object? I would assume that trying to use that object would be very slow. Remember, 115200 baud is 14.4kB/s which seems to be what you're seeing. Have you tried setting the baud rate really high, like 2 million? I haven't dig into the code for SerialUSB but it might accept that.

The SAM chip itself can certainly keep up better than 15kB/s. It should be able to maintain a rate of over 1 million bytes per second if you use DMA.

jiblets

Yes, I'm using the SerialUSB object. It doesn't matter which baud rate you give it as it will ignore it anyways. The real hold up is on the MATLAB side. I need a way of communicating with the native port outside of MATLAB that I can call inside matlab. I was hoping to use mex functions to accomplish this, but I don't know how to go about communicating with a USB port using C.

Go Up