Go Down

Topic: SerialUSB.begin(0) -- really impressed f measued native USB speed (Read 2140 times) previous topic - next topic


Although I have several DUEs I was never able to use the native USB port :-(

Today I tried with a laptop where I installed Arduino IDE recently, and there the native USB port showed up! I was really impressed about the sketch upload speed, no comparison to speed of USB programming port.

I read somewhere that SerialUSB.begin() speed for native USB port has no meaning and even 0 can be used. I used this simple sketch to determine USB write speed to laptop (old Thinkpad T42 with 32bit Linux):
Code: [Select]
int i=0;
long t;

void setup() {

void loop() {
   SerialUSB.print(" ");
   SerialUSB.println(" ==========================================================");

Instead of Arduino IDE Serial Monitor (which is slow) I used Linux "screen" command:
Code: [Select]
screen /dev/ttyACMO

I was really surprised on the speed I saw, these are typical lines of output:
Code: [Select]
1234567 42 ==========================================================
1234568 42 ==========================================================

This means that 42us elapse for each line of 70 bytes output sent to T42, which translates to 1.666MB/s!
Code: [Select]
$ bc -lq


Go Up