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

DMA Example #4

Open
fredsco opened this issue Oct 15, 2024 · 1 comment
Open

DMA Example #4

fredsco opened this issue Oct 15, 2024 · 1 comment

Comments

@fredsco
Copy link

fredsco commented Oct 15, 2024

in machine_i2s.c I can see that DMA is used which is great!

I am trying to figure out wether DMA is enabled by default (Which seems like it)

Are there any other functions I would need to call to ensure DMA is being used?

For now I have

machine_i2s_obj_t* i2s0 = machine_i2s_make_new(0, SCK, WS, SD, RX, BPS, MONO, /*ringbuf_len*/ SIZEOF_DMA_BUFFER_IN_BYTES, RATE);

And I am unsure if I should call

machine_i2s_stream_read(i2s0, (void*)&buffer[0], I2S_RX_FRAME_SIZE_IN_BYTES)

Since this is blocking CPU intensive right?

@biemster
Copy link
Owner

That's a good question. That code is not mine, so you will have better luck asking in the repo where it is from. I'll keep this open for a while in case someone else wants to shed some light on this.

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

2 participants