Skip to content

Commit 5110528

Browse files
authored
Merge pull request #261 from arduino/nanoconnect_PDM_at_2MHz
Run PDM clock at 2.08MHz
2 parents 31f68e4 + c97ec7e commit 5110528

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/PDM/src/rp2040/PDM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ uint8_t rawBuffer1[RAW_BUFFER_SIZE];
2424
uint8_t* rawBuffer[2] = {rawBuffer0, rawBuffer1};
2525
volatile int rawBufferIndex = 0;
2626

27-
int decimation = 64;
27+
int decimation = 128;
2828

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

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

183183
if (cutSamples) {
184184
memset(finalBuffer, 0, cutSamples);

0 commit comments

Comments
 (0)