2016-12-29 06:42 AM
I'm trying to connect SPH0641LU4H-1 microphone to STM32F411RE Nucleo board.
According to the Wikipedia
https://en.wikipedia.org/wiki/Pulse-density_modulation
format should represent lowest and highest amplitude as 0b0000...(all 0) and 0b1111...(all 1) accordingly.When I connect microphone pin to the ground -> 0b0000... PDM data is transferred to PDM_Filter_XX_XX and output sound is silence. But when I connect it to 3.3v source to emulate PDM 0b1111... -> the output I get is 1KHz noise. (mailto:16bit@16KHz
PCM). PDM_Filter_128_LSB function outputs big(depends on micGain) int16_t values with + or - sign.But I expect that 0b0000... and 0b1111... represents maximum and minimum diffuser deflection. Am I wrong?In general, I receive strange binary from PDM_Filter which doest'n looks like a wave and sounds like very noisy 1KHz square wave oscillator.
Some ideas where I went wrong? I can provide details for every step I did.
Thanks!(configuration: I2S: MasterClock: ON PLLI2SN: 192PLLI2SM: 16
PLLI2SR: 2 AudioFreq: 64000 PDM_Buffer size: 128 * uint16_t PCM_Buffer size: 16 * uint16_t)
#nucleo #microphone #i2s #stm32f4-i2s2016-12-29 07:08 AM
Dear
Kukhar.Volodymyr
,This application Note
,in
'5.2 PDM_Filter_xx_xx' section, may help you with more details and clarification aboutthis topic. Also, there is anAudioexample under STM32CubeF4 firmware package, so you can get inspiredto develop your application and
update it according to your needs:
STM32Cube_FW_F4_V1.0\Projects\STM32F4-Discovery\Applications\Audio\Audio_playback_and_record
You shouldfollow the instructions on the
readme.txt file describing how to usethe example.
Hope this helps you.
Best Regards
Imen
2016-12-30 05:56 AM
Yes, I have read
/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fcontent%2Fccc%2Fresource%2Ftechnical%2Fdocument%2Fapplication_note%2Fca%2F18%2Fbe%2Fbb%2Ff8%2F53%2F47%2Fa5%2FDM000408pdf%2Ffiles%2FDM000408pdf%2Fjcr%3Acontent%2Ftranslations%2Fen.DM000408pdf
m
any times, and my application done similar
to
and
http://www.st.com/en/embedded-software/x-cube-memsmic1.html
examples with some differences:
1. External microphone connected to i2s2, 2. Icollect 0.5sec of sound and transmit it via UART to pc. My question is more narrow about PDM_Filter_xx_xx function, and the way it works.