2021-05-11 02:19 AM
Hi, I'm developing my first project on an embedded system, more specifically I'm using the B-L475E-IOT01A board. My idea is to use the MP34DT01 built-in microphone but I'm having a number of problems:
I tried to follow a couple of guides but I had no success.
Should I use the BSP drivers or do I need to interface directly with the internal DFSDM device? I'm having trouble understanding how to interface with them on the software side of things. Could anyone point me to any guide or other resources?
2021-05-11 05:59 AM
Hi @FBarb.2 ,
are you starting from scratch with your project? especially with audio devices it is a hard task.
I would suggest to check out the FP-AI-SENSING1 function pack.
here, selecting the project for the B-L475E-IOT01A board, you can find the flow of audio signal from raw data to final processing.
moreover, audio drivers are present in the project, so you can use them directly if you like to.
Let me know if this helps
Niccolò
2021-05-19 01:06 PM
Thanks for the reply.
The FP-AI-SENSING1 function pack is very complex and supports many features, but from what I understand the idea is to:
Is this approach correct?
One last thing: is it also necessary to enable dfsdm from cubeMX or is the default configuration sufficient?
2021-05-21 01:57 AM
Hi @FBarb.2 ,
yes, the approach is correct.
you can find the callbacks you are looking for in the sensortile.box_audio.c in the FP-AI-SENSING1, they are
HAL_DFSDM_FilterRegConvHalfCpltCallback and HAL_DFSDM_FilterRegConvCpltCallback
in this pack these functions use a multibuffer approach, so that a part of a signal can be processed while the other part is being recorded.
and yes, the dfsdm filter should be turned on (I don't remember if the default configuration enables it)
let me know if you have any more questions
Niccolò