Skip to content

Run PDM clock at 2.08MHz #261

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

Merged
merged 1 commit into from
Jun 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/PDM/src/rp2040/PDM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ uint8_t rawBuffer1[RAW_BUFFER_SIZE];
uint8_t* rawBuffer[2] = {rawBuffer0, rawBuffer1};
volatile int rawBufferIndex = 0;

int decimation = 64;
int decimation = 128;

// final buffer is the one to be filled with PCM data
int16_t* volatile finalBuffer;
Expand Down Expand Up @@ -178,7 +178,7 @@ void PDMClass::IrqHandler(bool halftranfer)
}

// fill final buffer with PCM samples
Open_PDM_Filter_64(rawBuffer[rawBufferIndex], finalBuffer, 1, &filter);
Open_PDM_Filter_128(rawBuffer[rawBufferIndex], finalBuffer, 1, &filter);

if (cutSamples) {
memset(finalBuffer, 0, cutSamples);
Expand Down