2025-09-30 7:22 AM - last edited on 2025-09-30 8:12 AM by Andrew Neil
For a project based on the STM32U585 I use the MDF in a specific configuration.
So three filters are used and only two serial input streams. Serial input stream 1 is not needed and I cannot configure it since the pin of this serial input is used for another function.
It appears that when for a filter a serial input is disabled, the code generation is wrong.
The configuration for filter 1 is shown below:
As said, for filter 1 the serial interface is disabled since this filter is configured to receive its data from serial input stream 3, this is ok.
However, the code generated for MX_MDF1_Init does not specify the configuration setting to tell filter 1 to use stream 3. The generated code for filter 1 is shown below:
/**
MdfHandle1 structure initialization and HAL_MDF_Init function call
*/
MdfHandle1.Instance = MDF1_Filter1;
MdfHandle1.Init.CommonParam.InterleavedFilters = 1;
MdfHandle1.Init.CommonParam.ProcClockDivider = 2;
MdfHandle1.Init.CommonParam.OutputClock.Activation = DISABLE;
MdfHandle1.Init.SerialInterface.Activation = DISABLE;
if (HAL_MDF_Init(&MdfHandle1) != HAL_OK)
{
Error_Handler();
}
What is missing is the following line:
MdfHandle1.Init.FilterBistream = MDF_BITSTREAM3_RISING;
So the assumption made by the code generator is that if for a filter its related serial input is disabled, the code for letting it use another input (stream 3 in the code above) is not generated.
2025-09-30 8:09 AM
Hello @Leon3
I'm currently checking this issue. Could you share an ioc in order to further investigate the problem.
KR
Souhaib
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-09-30 8:18 AM