cancel
Showing results for 
Search instead for 
Did you mean: 

MDF Output Incorrect

James613
Associate II

Hi,

I am programming my STM32U5 that using MDF to filter the ADC value and transfer to memory with GPDMA.

My problem is the output of the MDF is very different from the ADC output, and the MDF output keep fluctuating, but my adc value should be stable. Is it anything wrong with my ADC/MDF setting?

My code:

HAL_ADC_Start(&hadc1);
MdfDMAConfig.Address = data;
MdfDMAConfig.DataLength = 6;
MdfDMAConfig.MsbOnly = DISABLE;
HAL_MDF_AcqStart_DMA(&MdfHandle0, &MdfFilterConfig0, &MdfDMAConfig);

 

My ADC Setting:

Screenshot 2024-10-21 at 16.02.28.png

Screenshot 2024-10-21 at 16.02.37.png

Screenshot 2024-10-21 at 16.02.41.png

  
My MDF Setting:

Screenshot 2024-10-21 at 16.01.49.png

My GPDMA Setting:

Screenshot 2024-10-21 at 16.02.56.png

Screenshot 2024-10-21 at 16.03.01.png

  

My ADC Reading:

Screenshot 2024-10-21 at 16.08.43.png

 

My MDF Reading:

Screenshot 2024-10-21 at 16.00.42.png


Thank you so much!!!!

1 REPLY 1
James613
Associate II

Or do anyone has experience with MDF?

 

Is it if the original data is 7000±10, I should expect the output of MDF should an around this value but more stable? Why my MDF output is so off?

 

Thanks