STM32_AcousticEC_Library is not working with STM32F746 (build with IAR)
Hi,
I am working on STM32F746.
I am facing problem with Echo Cancellation lib, I refered fd-aud-smartmic1
uint32_t EC_Init(void)
{
EchoHandlerInstance.tail_length= 512;
EchoHandlerInstance.preprocess_init = ACOUSTIC_EC_PREPROCESS_ENABLE;
EchoHandlerInstance.ptr_primary_channels=1;
EchoHandlerInstance.ptr_reference_channels=1;
EchoHandlerInstance.ptr_output_channels=1;
AcousticEC_getMemorySize(&EchoHandlerInstance);
EchoHandlerInstance.pInternalMemory = (uint32_t *)malloc(EchoHandlerInstance.internal_memory_size);
if(EchoHandlerInstance.pInternalMemory == NULL)
{
while(1); /*Error Management*/
}
error_value = AcousticEC_Init((AcousticEC_Handler_t *)&EchoHandlerInstance);
if(error_value != 0)
{
while(1); /*Error Management*/
}
EchoConfigInstance.preprocess_state =ACOUSTIC_EC_PREPROCESS_ENABLE;
EchoConfigInstance.AGC_value =0;
EchoConfigInstance.noise_suppress_default = -15; /* Default: -15 */
EchoConfigInstance.echo_suppress_default = -40; /* Default: -40 */
EchoConfigInstance.echo_suppress_active = -15; /* Default: -15 */
EchoConfigInstance.residual_echo_remove = 1; /* Default: 1 */
error_value = AcousticEC_setConfig((AcousticEC_Handler_t *)&EchoHandlerInstance, (AcousticEC_Config_t *) &EchoConfigInstance);
if(error_value != 0)
{
while(1); /*Error Management*/
}
//Internals.AudioOutRdPtr = 0;
return error_value;
}
1> If I use __CRC_CLK_ENABLE() before EC_Init, sw is stucked here:
if(EchoHandlerInstance.pInternalMemory == NULL)
{
while(1); /*Error Management*/
}
I try to extand heap but not work
2> If I do not use __CRC_CLK_ENABLE() before EC_Init, sw is stucked after AcousticEC_Init : return value ACOUSTIC_LOCK_ERROR
Do you have any idea?
Thank You