2020-02-25 02:40 PM
I am a novice in firmware development so please forgive my lack of knowledge and experience with this system.
I am trying to obtain audio data at a lower frequency. Right now I can create wav files with a sampling frequency of 8k, but I want to go lower to 4k. It does not seem as straight forward as changing the AudioFreq to 4000 in the function Init_MEMS_Mics(AudioFreq, AudioVolume).
In the SensorTile_audio.c file of this example, there is this:
#define DFSDM_OVER_SAMPLING(__FREQUENCY__) \
((__FREQUENCY__) == (AUDIO_FREQUENCY_8K)) ? (128U) \
: ((__FREQUENCY__) == (AUDIO_FREQUENCY_11K)) ? (256U) \
: ((__FREQUENCY__) == (AUDIO_FREQUENCY_16K)) ? (128U) \
: ((__FREQUENCY__) == (AUDIO_FREQUENCY_22K)) ? (128U) \
: ((__FREQUENCY__) == (AUDIO_FREQUENCY_32K)) ? (64U) \
: ((__FREQUENCY__) == (AUDIO_FREQUENCY_44K)) ? (64U) \
: ((__FREQUENCY__) == (AUDIO_FREQUENCY_48K)) ? (64U) \
: ((__FREQUENCY__) == (AUDIO_FREQUENCY_96K)) ? (32U) : (32U)
How could I go about trying to lower the sampling frequency?
2020-03-10 10:16 AM
Hi @Community member , if a constant like "AUDIO_FREQUENCY_4K" is not defined, or if you cannot reduce by a factor of 2 the MIC CLK, I suggest you to directly ask for support on the STM32 MCUs community. Regards