This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Decimation on STM32 Eval board

I am trying to decimate my ADC values which are stored in a DMA buffer.


The functions I am using are:
1. HAL_ADC_Start_DMA();
2. arm_fir_decimate_init_f32();
3. arm_fir_decimate_f32();

I understand that the information from the 12 bit ADC are stored in a uin32_t type buffer in the DMA. However, to decimate these values, which are in the range of 0-4096, it requires me to convert the uint32_t DMA values to a float32_t data type.
I have tried casting the uint32_t values to a q31_t format and convert them to float32_t via the CMSIS lib: arm_q31_float, but to no avail. The output array of the decimation is always 0.
May I have some help pertaining to either the conversion from uint32_t to q31_t format, or an alternative way to decimate uint32_t values.

Thank you.