-
Notifications
You must be signed in to change notification settings - Fork 4
Fixes and updates. #36
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
Conversation
iabdalkader
commented
Apr 4, 2023
- Fix DMA buffer Queue memory issues.
- Misc improvements to make DAC more robust.
- Update Waveform_Generator.ino example.
- Fixes Programming >2M Samples/sec on DAC seems to cause Giga board to hang #32
- Fixes DMA DAC intialization is unstable #35
* The current underlying DMA buffer Queue is not thread-safe and in some cases it can corrupt the memory. Replace the underlying DMA buffer container with a thread-safe implementation.
* Detect DAC underrun in available() and reset if needed. If DAC stops for any reason, no buffers will become free again. We need to detect this and abort. * Flush all pending buffers when DAC is stopped. This releases back all the buffers to the ready queue, and fixes an edge case where DAC stops while holding all of the ready buffers. * Check for NULL descriptor pointers in every function. * Increase DMA stream priority to highest.
* Add new command to stop DAC ("k"). * Print memory usage. * Increase max frequency to 128KHz. * Use a smaller DMA buffer size and rework the wave generators to support it.
Memory usage change @ e21c57b
Click for full report table
Click for full report CSV
|
Hi @aentinger can you please review this and if it looks good, merge and do another release ? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inhowfar is the new buffer implementation "threadsafe"? I'm asking because I'm not seeing any locking 🤔 .
Yes it should be very safe, the old one shared the variables between push/pop producer/consumer sides, this one even if the tail/head is moved during push/pop it should still be safe and there's no shared |
Check, thanks for the clarification 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍