I connected a PDM mic to the MIC ARRAY port of the XCORE AI Explorer board.
Then I compiled/ran the "USB Audio MUX" sample and the microphone showed up on my Win11 system.
I was able to record audio - so far so good.
Then I tried to increase the sampling rate from 16000 to 96000.
I generated a new TwoStageDecimator filter using the provided python script with the following parameter:
- PDM frequency of 3072000
- first stage decimation is 32
- second stage decimation is 1
- stage #1: number of moving average stages is 5
- stage #2: cutoff = 45000
- stage #2: transition bandwidth = 2000
- taps_2 = 64
- fir_window = ("kaiser", 8)
Unfortunately any configuration where I set the decimation to have 96kHz sampling output the program crashes.
Any filter configuration for 32khz or 48kHz does run and the Explorer board shows up as a microphone in Windows but when I attempt to make a recording a device error pops up.
Did I miss some USB setting that need to be made in order for this to work?.
Only filter configurations for 16kHz work as expected.
After some reading I noticed the following in the feature list of the mic array library:
48kHz, 24kHz, 16kHz, 12kHz and 8kHz output sample rate by default (3.072MHz PDM clock)
But also this statement in the Decimator Stages documentation:
The first stage filter is a decimating FIR filter with a fixed tap count (S1_TAP_COUNT) of 256 and a fixed decimation factor (S1_DEC_FACTOR) of 32.
The second stage decimator is a fully configurable FIR filter with tap count S2_TAP_COUNT and a decimation factor of S2_DEC_FACTOR (this can be 1).
So if stage 1 decimator is fixed to 32 and we are allowed to set stage 2 decimator to 1 then we should be able to get 96khz output, right?
Any help with this is much appreciated.
Thanks
Alex