How to record audio with CCA02M1 microphones using DFSDM on a NUCLEO-L476RG
Hi !
I am trying to do what I feel is a rather simple thing, which is doing the exact same thing as the demo firmware provided as an STM32CubeExpansion for testing the CCA02M1 MEMS microphones on a Nucleo L476RG.
So far, I have gotten to the point where the USB descriptor are properly initialized and I can the board as a microphone as Audacity. There is absolutely no sound coming out of it when I hit the record button however.
I have checked that the microphone works with the demo binary, so I know by solder bridge configuration is good.
I am trying to use a 48kHz sampling rate, with USB driven acquisition being disabled. I also noticed a few oddities alongside the "no sound in Audacity" bit:
- The record speed in Audacity is a bit slower than with the demo firmware. Meaning a recording a second of "audio" in Audacity actually takes more than a second.
- When examining the USB frames with an USB analyzer I noticed approximately half of the DATA IN request from Linux are unanswered. So Linux may be too fast for the board. (Which again, does not happen with the demo firmware)
- I noticed a some "*** callbacks suppressed" messages in dmesg on the host side.
- If I enable USB driven acquisition, I notice there is some data copied with DMA to the DFSDM output buffer (that would be PCM_Buff) after the board is started. However, as soon as I hit the record button, it is zero-filled and this does not seem to change even though there are DMA transfers and interrupts with DFSDM.
- Even though, the USB descriptor is initialized and looks using lsusb -vd, I do "device descriptor read/64, error -32" messages in dmesg.
Thanks in advance ! :)
