Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE 1.6 hampers serial speed on Due (SAM3X8E) #5577

Closed
cjbaar opened this issue Nov 7, 2016 · 5 comments
Closed

IDE 1.6 hampers serial speed on Due (SAM3X8E) #5577

cjbaar opened this issue Nov 7, 2016 · 5 comments
Labels
Architecture: SAM Applies only to the SAM microcontrollers (Due)

Comments

@cjbaar
Copy link

cjbaar commented Nov 7, 2016

I have been using several Arduino Due boards under the beta IDE (1.5.8). Previously, I was able to successfully maintain a continuous serial connection between two boards (using native Serial ports) at 5,000,000bps. Using the exact same boards and code, but being programmed using a current IDE (1.6.11), I am not able to get above roughly 500,000. This is only 10% of the previous speed. I am not sure what may have changed in the Serial libraries from beta, but I would like request it be reverted to allow higher speeds.

@dlabun
Copy link

dlabun commented Nov 7, 2016

There's a pretty big jump between 1.5.8 and 1.6.11... Did you try another 1.6 releases?

@cjbaar
Copy link
Author

cjbaar commented Nov 7, 2016

No; this is the first version of 1.6 that I have tried using for programming SAM.

@facchinm
Copy link
Member

facchinm commented Nov 8, 2016

The issue you are encountering looks like a side effect of some irq-related patch. This one 2fedb00 may be relevant. Anyway, if the previous code was not IRQ driven, it was probably faster due to the lack of context switch but less user friendly (since you have to poll continuously the registers to check if some data has arrived). Moving to DMA based transfer would solve both the issue but it's a huge task

@facchinm facchinm added the Architecture: SAM Applies only to the SAM microcontrollers (Due) label Nov 8, 2016
@cjbaar
Copy link
Author

cjbaar commented Nov 15, 2016

Thanks, facchinm. I've written a few low-level libraries, but your comments are bit beyond my level of experience. :) Also, thanks for adding the SAM label; I couldn't figure out how to do that.

In this particular case, I am using one Due simply as a repeater, relaying data from the first Due, refactoring it, and sending back out via some custom bit-banging. I am sending "frames" of 480 bytes, and averaging about 70-80 frames/second, so the Serial ports are fairly active. I am not sure how the interrupts come into play, but I guess for now I will be keeping the 1.5.8 beta version around. Also, if it makes a difference, I am running the IDE on OSX.

@agdl
Copy link
Member

agdl commented Feb 8, 2017

This issue was moved to arduino/ArduinoCore-sam#9

@agdl agdl closed this as completed Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture: SAM Applies only to the SAM microcontrollers (Due)
Projects
None yet
Development

No branches or pull requests

4 participants