cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-AUDIO-F4 SMR Library

Daniel Moberg
Associate II

Hi,

I would like to have some help understanding what the measurements that i can get from the

SoundMesauRments library provided in cube actually are. What does the calculated dB's actually relate to? What is 0dB in the scale?

My setup is a mems mic connected through i2s which are sampled an feed into the SMR library.

Kind Regards

Daniel Moberg

4 REPLIES 4
Amel NASRI
ST Employee

Hi @Daniel Moberg​ ,

Did you checked the UM2031 (Sound meter library software expansion for STM32Cube) to look for answers to your questions?

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Daniel Moberg
Associate II

Hi, Yes i have checked the UM2031.

Some more details:

I am using V1.0.5 version of the SMR library, (Version taken from the smr_glo.h)

My target is the STM32F411RET

I have dumped the PCM data from the Microphone and played it on my computer and the mic data seems fine.

When i disable the prefilter using filter none I get more reasonable output. Leading me to suspect the pre-filter.

I have tested all the pre-filters, And they do no seam to react much compared to a handhold db meter.

My setup looks like below:

smr_static_param_t params;

params.sampling_rate = 48000;

err = smr_setParam(&params, &m_smr.memory);

smr_dynamic_param_t dynamic_params;

dynamic_params.averaging_time = 1000; // ms

dynamic_params.enable = 1;

//dynamic_params.filter_type = SMR_PREFILTER_NONE;

//dynamic_params.filter_type = SMR_PREFILTER_DCREMOVE;

dynamic_params.filter_type = SMR_PREFILTER_AWEIGHTING;

//dynamic_params.filter_type = SMR_PREFILTER_CWEIGHTING;

err = smr_setConfig(&dynamic_params, &m_smr.memory);

Can you provide some code that can verify the the library?

Kind Regards

Daniel Moberg

See answer below. (Posted answer instead of reply)

Kind Regards

Daniel Moberg

yes, but why I can find the library ?