Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8037

General • Re: How to output bits to GPIO from the interpolator without use of cores...

$
0
0
This means that the strategy for a fast PDM must be pointed differently. One of the cores should make up a 32 bits value consisting of a piece of the sequence for 32 cycles, and this must be generated before 32 cycles has passed so the CPU can put that value to the PIO in order to serialize it.
That's an OK strategy if you have a CPU core to spare, or if your audio processing consumes almost all of a core anyhow. But going direct from CPU to PIO with only the small FIFO inbetween means that the CPU is in lock-step with the PIO.

I have a fairly similar setup on one of my systems where I'm using the interpolators for audio samples (one to do interpolation to upscale the sample rate, one to do what I call sigma-delta, but you might call PDM). Since I want to use the CPU for other things, I have the software loop using the interpolators to generate a buffer full of output values and then use DMA to shift that to the PIO. My processing loop with the interpolators therefore runs in a DMA completion IRQ, and leaves the CPU free to do other things meanwhile.

However, I am only doing voice-quality audio on this system; I can imagine that if you were wanting to achieve higher quality then you might be approaching 100% CPU usage anyhow and dedicating it would make sense.

Statistics: Posted by arg001 — Sat Feb 08, 2025 10:49 am



Viewing all articles
Browse latest Browse all 8037

Trending Articles