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

Change frame buffer content for I2S Output #28

Open
tfcroft4 opened this issue Jul 16, 2023 · 0 comments
Open

Change frame buffer content for I2S Output #28

tfcroft4 opened this issue Jul 16, 2023 · 0 comments

Comments

@tfcroft4
Copy link

I am trying to port code from a M0 based system to ESP32 which includes an I2S buzzer output. The total project is fairly complex and I2S in the background is ideal. Your code using the dma event queue seems a good way to help achieve this. I have found getting to grips with esp32 I2s a lot harder than on the M0 platform!
I have added a simple square wave constructor to I2S Output and can change the tone and volume by re compiling code. I would like to be able to change the content of the frames buffer on the fly so that I can call something like:
buzz ( tone, duration_in_ms , volume) to re load the frames buffer and restart the i2s output for the given duration.
I have tried doing this by stopping / starting i2s and /or suspending the Output task. These tests don't give a clean restart to the output as any stop start may be at any point in the write cycle. A change in the frame buffer gives noise or no output and crashes from time to time. :-(
I would welcome any suggestions on how this might be achieved.
Thanks
Ted
ted at kitst dot co dot uk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant