2022-04-03 10:02 AM
I am trying to add PDM2PCM for STM32G4 in CubeMX/IDE, but I cannot add it.
Why is that so?
Solved! Go to Solution.
2022-04-03 07:51 PM
I have added manually the library in G474 so far it is working.
It is almost the same as what I have done here https://github.com/VictorTagayun/STM32_PDM-to-PCM-Processing
You also need to enable CRC like what is needed in F4/F7/H7 series.
hcrc.Instance = CRC;
hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_ENABLE;
hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE;
hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE;
hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE;
hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES;
if (HAL_CRC_Init(&hcrc) != HAL_OK)
{
Error_Handler();
}
2022-04-03 10:33 AM
PDM2PCM appears to be written for the F4/F7/H7 series, per the manual.
STM32Cube PDM2PCM software library for the STM32F4/F7/H7 Series
2022-04-03 04:36 PM
Thank you for the answer.
I was wondering why it is only available for F4/F7/H7 series.
2022-04-03 07:51 PM
I have added manually the library in G474 so far it is working.
It is almost the same as what I have done here https://github.com/VictorTagayun/STM32_PDM-to-PCM-Processing
You also need to enable CRC like what is needed in F4/F7/H7 series.
hcrc.Instance = CRC;
hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_ENABLE;
hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE;
hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE;
hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE;
hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES;
if (HAL_CRC_Init(&hcrc) != HAL_OK)
{
Error_Handler();
}
2022-12-27 01:24 AM
I've done the same on L432KC and seems working. Why not enabling PDM2PCM library on other MCUs with same core (M4F) and required capabilities (CRC)? Is there a place where to ask to do this (e.g. Github repo of L4 and G4 fw?).
Thanks