-
Notifications
You must be signed in to change notification settings - Fork 69
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
DMA ringbuffer fills only half the buffer #12
Labels
Comments
I'm rewriting the whole DMA thing. As you rightly point out it doesn't really work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
If you try the DMA ringbuffer with the Teensy 3.1, it does not work as expected : only half the buffer is filled, I think that the correction needs to be done on line 85, you should have 2 * b_size for the second argument which I believe is in bytes, the comment is already pointing to that possible issue
dmaChannel->destinationCircular((uint16_t_)p_elems, 2 * b_size); // 2_b_size is necessary for some reason
There is a side effect if you set this to 2 * b_size, the IsFull function as written now detect the half-full condition .. I am not completely clear on how to use the IsEmpy and IsFull function, it would be more convenient to have a function telling you what is the present level of the buffer.
Anyway, the package is very interesting and usefull some comments could improve its usage
Yours
Vincent
The text was updated successfully, but these errors were encountered: