Pages: [1]   Go Down
Author Topic: SerialUSB RX Buff Size  (Read 981 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can anyone point me to the definition of the SerialUSB receive buffer in the DUE libraries? Thanks.
Logged

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

I found a definition in the HardwareSerial.cpp file, but it is located in hardware\arduino\avr\cores\arduino. I did not see a separate .cpp for the SAM folder, so I am assuming the header HardwareSerial.h for the SAM is referencing the same source? Thoughts?
Logged

Forum Administrator
Milano, Italy
Offline Offline
Sr. Member
*****
Karma: 23
Posts: 292
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

CDC_SERIAL_BUFFER_SIZE here:

https://github.com/arduino/Arduino/blob/ide-1.5.x/hardware/arduino/sam/cores/arduino/USB/CDC.cpp#L23

the file hardware/arduino/sam/cores/arduino/USB/CDC.cpp distributed in 1.5.1 has some incorrect constants SERIAL_BUFFER_SIZE where CDC_SERIAL_BUFFER_SIZE must be used.
The patch is already in github and will be released in 1.5.2, I suggest you to download the file from the link above and replace it in your installation.

Logged

C.

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 266
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I could be wrong but personally feel what ever different issues happened with USB.serial are not only related to buffer sizing.

As I've explained on some the threads a few weeks ago, the test i'm using is quite wide since it consists to have a Java GUI dialog with arduino mega via USB using SerPro protocol open sourced by Alvaro Lopes. In fact, this SerPro protocol is a RX/TX using an HDLC with 16 bits CRC, it has been running on different projects wether on PC or Macintosh for a few years, able to transfer one way or the other way many variables, single, frames... re-transmit if errors and so until the packets get through the link.

A while ago, i did try the protocol to my arduino DUE, in fact the way it has programmed in C and C++ is NOT dependent wether arduino DUE or arduino MEGA or arduino UNO but it never worked with DUE under IDE 1.5.1

I'm eager to have access soon to the new IDE to benchmark test if all the USB issues have been resolved.

Thank you, Albert
Logged

France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 266
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does this thread and issue concerns Native USB port or Programming USB Port ?
Thank you for clarifying, Albert
Logged

Forum Administrator
Milano, Italy
Offline Offline
Sr. Member
*****
Karma: 23
Posts: 292
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

selfonlypath,

yes it is!
Logged

C.

Pages: [1]   Go Up
Jump to: