cancel
Showing results for 
Search instead for 
Did you mean: 

getting BSP_ERROR_CLOCK_FAILURE from BSP_AUDIO_IN_Init().

IChoi.2
Associate

Hi All,

I have a B-U585I-IOT02A board and the freeRTOS is flashed

https://github.com/FreeRTOS/iot-reference-stm32u5

It has 2 digital microphones, but /iot-reference-stm32u5 does not include the BSP for audio.

So I merged the audio BSP from STM32CubeU5 MCU Firmware Package.

https://github.com/STMicroelectronics/STM32CubeU5/blob/main/Drivers/BSP/B-U585I-IOT02A/b_u585i_iot02a_audio.c

https://github.com/STMicroelectronics/STM32CubeU5/blob/main/Drivers/BSP/B-U585I-IOT02A/b_u585i_iot02a_audio.h

The building is done but I'm getting an error (BSP_ERROR_CLOCK_FAILURE) from BSP_AUDIO_IN_Init().

/**

BSP_AUDIO_Init_t AudioInit;

 gAudio.Instance = 0;

AudioInit.Device = AUDIO_IN_DEVICE_DIGITAL_MIC1;

AudioInit.SampleRate = AUDIO_FREQUENCY_11K;

AudioInit.BitsPerSample = AUDIO_RESOLUTION_16B;

AudioInit.ChannelsNbr = 1;

AudioInit.Volume = 100;

status = BSP_AUDIO_IN_Init(gAudio.Instance, &AudioInit);

**/

Finally, RCCEx_PLL3_Config9) returned "HAL_TIMEOUT"

/**

static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3)

{

......

 /* Wait till PLL3 is ready */

 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) == 0U)

 {

  if ((HAL_GetTick() - tickstart) > PLL3_TIMEOUT_VALUE)

  {

   return HAL_TIMEOUT;

  }

 }

 return HAL_OK;

}

**/

How to resolve it?

1 REPLY 1
CMYL
ST Employee

Hello,

Could you refer to the setting of the following project ~\Projects\B-U585I-IOT02A\Examples\BSP from the STM32CubeU5 FW.

The RCC_FLAG_PLL3RDY is set by HW when the PLL3 is ready, so try to compare your setting versus the one in project provided by STM32U5Cube.

Be sure also that the MDF/ADF peripherals filters are properly activated.

Best regards,

Younes