You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I'm rewriting the whole DMA thing. As you rightly point out it doesn't really work.
The new DMARingBuffer will be a ping pong buffer and the RingBuffer will be a software-only circular buffer.
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: