Pages: [1]   Go Down
Author Topic: High speed USB communication using C/C++  (Read 826 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Earth
Offline Offline
Sr. Member
****
Karma: 14
Posts: 333
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: