使用
STM32H750芯片,想使用DFSDM直接用DMA写通道寄存器的方式对数据进行滤波,滤波器使用sinc3、Oversampling为10,IntOversampling为1;我的预期是将800点的数据给滤波器,按设置,滤波器应该输出80点的数据,但通过DMA接收数据时,发现输出少于80点。请教各位大侠,原因何在?
配置代码:
void afsdm_init(DFSDM_Filter_HandleTypeDef* flt, DFSDM_Channel_HandleTypeDef* chn,...)
flt->Init.RegularParam.Trigger=DFSDM_FILTER_SW_TRIGGER;
flt->Init.RegularParam.FastMode=DISABLE;
flt->Init.RegularParam.DmaMode=ENABLE;
flt->Init.FilterParam.SincOrder=DFSDM_FILTER_SINC3_ORDER;
flt->Init.FilterParam.Oversampling=10;
flt->Init.FilterParam.IntOversampling=1;
HAL_DFSDM_FilterInit(flt);
chn->Init.OutputClock.Ac
tivation=DISABLE;
chn->Init.Input.Multiplexer=DFSDM_CHANNEL_INTERNAL_REGISTER;
chn->Init.Input.DataPacking=DFSDM_CHANNEL_STANDARD_MODE;
chn->Init.Input.Pins=DFSDM_CHANNEL_SAME_CHANNEL_PINS;
chn->Init.Offset=0x00;
chn->Init.RightBitShift=0x00;
chn->Init.OutputClock.Selection=DFSDM_CHANNEL_OUTPUT_CLOCK_SYSTEM;
chn->Init.OutputClock.Divider=2;
chn->Init.SerialInterface.Type=DFSDM_CHANNEL_SPI_RISING;
chn->Init.SerialInterface.SpiClock=DFSDM_CHANNEL_SPI_CLOCK_EXTERNAL;
chn->Init.Awd.FilterOrder=DFSDM_CHANNEL_FASTSINC_ORDER;
chn->Init.Awd.Oversampling=1;
HAL_DFSDM_ChannelInit(chn);
HAL_DFSDM_FilterConfigRegChannel(flt, DFSDM_CHANNEL_1,
DFSDM_CONTINUOUS_CONV_ON);
//DMA配置略
}
注:通道、滤波器、DMA实例在函数调用前已设置