Skip to main content
Visitor II
April 1, 2019
Question

X-CUBE-AUDIO-F4 SMR Library

  • April 1, 2019
  • 2 replies
  • 1665 views

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

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    April 5, 2019

    Hi @Daniel Moberg​ ,

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

    -Amel

    Visitor II
    April 9, 2019

    See answer below. (Posted answer instead of reply)

    Kind Regards

    Daniel Moberg

    Visitor II
    April 8, 2019

    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