在使用dfsdm单个麦克风录音出现录音重复(同一个数据包会出现两次,丢掉的数据报就是那个重复的。),可以使用一个麦克风吗,帮忙看下配置是不是正确。 //回调函数如下 void HAL_DFSDM_FilterRegConvHalfCpltCallback(DFSDM_Filter_HandleTypeDef hdfsdm_filter)
void HAL_DFSDM_FilterRegConvCpltCallback(DFSDM_Filter_HandleTypeDef *hdfsdm_filter) { uint16_t i=0; for(i = (PCM_LEN/2); i > 8), -32768, 32767); f_write(file,(uint8_t)PlayBuff,(PCM_LEN),(UINT)&bw);//写入文件 sumer=sumer+(PCM_LEN); led_toggle(LED_B); } //这是的DFSDM单声道设置 __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE(&DfsdmLeftChannelHandle); DfsdmLeftChannelHandle.Instance = DFSDM1_Channel1; DfsdmLeftChannelHandle.Init.OutputClock.Activation = ENABLE; DfsdmLeftChannelHandle.Init.OutputClock.Selection = DFSDM_CHANNEL_OUTPUT_CLOCK_AUDIO; DfsdmLeftChannelHandle.Init.OutputClock.Divider = 11; / 11.294MHz/11 = 1.026MHz / DfsdmLeftChannelHandle.Init.Input.Multiplexer = DFSDM_CHANNEL_EXTERNAL_INPUTS; DfsdmLeftChannelHandle.Init.Input.DataPacking = DFSDM_CHANNEL_STANDARD_MODE; / N.U. / DfsdmLeftChannelHandle.Init.Input.Pins = DFSDM_CHANNEL_SAME_CHANNEL_PINS; DfsdmLeftChannelHandle.Init.SerialInterface.Type = DFSDM_CHANNEL_SPI_RISING; DfsdmLeftChannelHandle.Init.SerialInterface.SpiClock = DFSDM_CHANNEL_SPI_CLOCK_INTERNAL; DfsdmLeftChannelHandle.Init.Awd.FilterOrder = DFSDM_CHANNEL_FASTSINC_ORDER; / N.U. / DfsdmLeftChannelHandle.Init.Awd.Oversampling = 10; / N.U. / DfsdmLeftChannelHandle.Init.Offset = 0; DfsdmLeftChannelHandle.Init.RightBitShift = 2; if(HAL_OK != HAL_DFSDM_ChannelInit(&DfsdmLeftChannelHandle)) { Error_Handler(); } / Initialize filter 0 (left channel) / __HAL_DFSDM_FILTER_RESET_HANDLE_STATE(&DfsdmLeftFilterHandle); DfsdmLeftFilterHandle.Instance = DFSDM1_Filter0; DfsdmLeftFilterHandle.Init.RegularParam.Trigger = DFSDM_FILTER_SW_TRIGGER; DfsdmLeftFilterHandle.Init.RegularParam.FastMode = ENABLE; DfsdmLeftFilterHandle.Init.RegularParam.DmaMode = ENABLE; DfsdmLeftFilterHandle.Init.InjectedParam.Trigger = DFSDM_FILTER_SW_TRIGGER; / N.U. / DfsdmLeftFilterHandle.Init.InjectedParam.ScanMode = ENABLE; / N.U. / DfsdmLeftFilterHandle.Init.InjectedParam.DmaMode = DISABLE; / N.U. / DfsdmLeftFilterHandle.Init.InjectedParam.ExtTrigger = DFSDM_FILTER_EXT_TRIG_TIM1_TRGO; / N.U. / DfsdmLeftFilterHandle.Init.InjectedParam.ExtTriggerEdge = DFSDM_FILTER_EXT_TRIG_RISING_EDGE; / N.U. / DfsdmLeftFilterHandle.Init.FilterParam.SincOrder = DFSDM_FILTER_SINC3_ORDER; DfsdmLeftFilterHandle.Init.FilterParam.Oversampling = 128; / 11.294MHz/(1164) = 8KHz */ DfsdmLeftFilterHandle.Init.FilterParam.IntOversampling = 1; if(HAL_OK != HAL_DFSDM_FilterInit(&DfsdmLeftFilterHandle)) { Error_Handler(); } |
stm32l4p5zg 串口1低温-40度tx无法正常输出高
哪一个型号的stm32支持DMA直接从SPI将数据搬运到FMC
STM32L431RCT6 关机模式使用Wakeup唤醒
STM32L431RCT6 怎么将PB3(JTDO-TRACESWO)引脚配置成GPIO输出使用
STM32L451ADC读数有问题
STLINK-V3MODS多路桥接
解决一个又一个问题后还有问题,进入待机模式后短时间能唤醒,稍微长一点时间就没有反应了(约2分钟)
STM32L431RCT6 的待机模式异常问题,进入待机模式后一段时间,蜂鸣器会自动响,不知道什么原因
STM32L4P5G-DK 写了代码点灯但是点不亮是为什么?
DMA传输的ADC采样数据总是上一次的数据,具体情况如下