完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,
我有一个带有集成MP45DT02 MEMS麦克风的STM32F4-Discovery板,我还买了一个麦克风(MP34DT01),我想同时从2个麦克风录制。 到现在为止,我已经从集成麦克风中捕获了音频,并使用RAM存储的pdm比特流模拟了其他麦克风...现在我想同时从2个麦克风中捕获音频...为此我做了两个都在上升时捕获,同时在馈送到麦克风的时钟的下降沿,但我不知道该怎么做......到目前为止,我只是在一个边缘从集成麦克风中捕获了一些使用I2S ...... 这是我的I2S配置: static void WaveRecorder_SPI_Init(uint32_t Freq) { I2S_InitTypeDef I2S_InitStructure; / *启用SPI时钟* / RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2,ENABLE); / * SPI配置* / SPI_I2S_DeInit(SPI2); I2S_InitStructure.I2S_AudioFreq = 32000; I2S_InitStructure.I2S_Standard = I2S_Standard_LSB; I2S_InitStructure.I2S_DataFormat = I2S_DataFormat_16b; I2S_InitStructure.I2S_CPOL = I2S_CPOL_High; I2S_InitStructure.I2S_Mode = I2S_Mode_MasterRx; I2S_InitStructure.I2S_MCLKOutput = I2S_MCLKOutput_Disable; / *使用上面的结构初始化I2S外设* / I2S_Init(SPI2,& I2S_InitStructure); RCC_I2SCLKConfig(RCC_I2S2CLKSource_PLLI2S); RCC_PLLI2SCmd(ENABLE); // con questo da solo va con rumore while(RCC_GetFlagStatus(RCC_FLAG_PLLI2SRDY)== RESET); / *启用Rx缓冲区而不是空中断* / SPI_I2S_ITConfig(SPI2,SPI_I2S_IT_RXNE,ENABLE); } 有什么建议么? 非常感谢你! #STM32F4-MEMS立体声-REC-PDM-I2S 以上来自于谷歌翻译 以下为原文 Hello everyone, I have a STM32F4-Discovery board with an integrated MP45DT02 MEMS mic, and I've bought also anothere mic (an MP34DT01), I would like to record at the same time from the 2 mics. By now I've captured audio from the integrated mic, and simulated the other mic with a RAM-stored pdm bitstream... Now I want to capture audio from the 2 mics at the same time... To do so I've to capture a bit both on the rising, both on the falling edge of the clock fed to the mics, but I don't know how to do... Up to now I've captured bits from the integrated mic just on one edge using the I2S... This is my I2S configuration: static void WaveRecorder_SPI_Init(uint32_t Freq) { I2S_InitTypeDef I2S_InitStructure; /* Enable the SPI clock */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2,ENABLE); /* SPI configuration */ SPI_I2S_DeInit(SPI2); I2S_InitStructure.I2S_AudioFreq = 32000; I2S_InitStructure.I2S_Standard = I2S_Standard_LSB; I2S_InitStructure.I2S_DataFormat = I2S_DataFormat_16b; I2S_InitStructure.I2S_CPOL = I2S_CPOL_High; I2S_InitStructure.I2S_Mode = I2S_Mode_MasterRx; I2S_InitStructure.I2S_MCLKOutput = I2S_MCLKOutput_Disable; /* Initialize the I2S peripheral with the structure above */ I2S_Init(SPI2, &I2S_InitStructure); RCC_I2SCLKConfig(RCC_I2S2CLKSource_PLLI2S); RCC_PLLI2SCmd(ENABLE);//con questo da solo va con rumore while (RCC_GetFlagStatus(RCC_FLAG_PLLI2SRDY) == RESET); /* Enable the Rx buffer not empty interrupt */ SPI_I2S_ITConfig(SPI2, SPI_I2S_IT_RXNE, ENABLE); } Any suggestions? Thank you very much! #stm32f4-mems-stereo-rec-pdm-i2s |
|
相关推荐
2个回答
|
|
...在此页面中
http://stackoverflow.com/questions/32942756/stm32f4-stereo-mems-mic ,用户建议选择I2S时钟速度,这是麦克风时钟速度的两倍......这是有意义的...... 但是我应该使用什么时钟来喂麦克风? 那么我认为快速和慢速时钟必须同步(例如第一个上升沿必须同时到达)......如何实现该结果??? ''有没有人在那里''? 以上来自于谷歌翻译 以下为原文 ...In this page http://stackoverflow.com/questions/32942756/stm32f4-stereo-mems-mic , a user suggest to choose an I2S clock speed that is double the speed of the mics' clock... That make sense... But wich clock source should I use to feed the mics? Then I think the fast and the slow clock must be synchronized (for example the first rising edge must arrive at the same time) ...How to achieve that result??? ''Is there anybody out there''? |
|
|
|
你好,
在立体声配置中,I2S外设必须以麦克风频率的两倍运行,以便能够在麦克风时钟的上升沿和下降沿读取数据,从而读取两个麦克风的位。在您的情况下,从一个边缘的集成数字mems麦克风和另一个边缘的模拟麦克风读取数据。集成式麦克风不应再从I2S外设计时。 I2S外设将为嵌入式定时器(在从机模式下具有外部触发)提供时钟来对其进行分频。定时器输出将为数字麦克风提供时钟信号。 有关立体声模式下的定时器和I2S配置的更多详细信息,您可以在STM32496I-Discovery中查看音频播放和录制应用程序。 http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html 包。 以上来自于谷歌翻译 以下为原文 Hello, In stereo configuration, the I2S peripheral must operate at twice the microphone frequency to be able to read the data on both the rising and falling edges of the microphone clock, thus reading the bits of two microphones. In your case, reading data from the integrated digital mems microphone on one edge, and from the simulated microphone in the other edge. The integrated microphone shouldn't be clocked from the I2S peripheral anymore. The I2S epripheral will provide the clock to an embedded timer (with an external trigger in slave mode) to divide it. The timer output will provide the clock signal to the digital microphone. For more details on the timer and the I2S configuration in stereo mode, you can check the Audio playback and record application on the STM32496I-Discovery in the http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef4.html package. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
1932 浏览 1 评论
2649 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1547 浏览 1 评论
3095 浏览 6 评论
5532 浏览 21 评论
516浏览 4评论
929浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
338浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
895浏览 3评论
851浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-6-24 20:00 , Processed in 0.978169 second(s), Total 79, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号