cancel
Showing results for 
Search instead for 
Did you mean: 

BUG in stm32f4xx_hal_rcc_ex.h

NZhar
Associate

In function

uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)

string

     /* Get the current I2S source */

     srcclk = __HAL_RCC_GET_I2S_SOURCE();

must be

     /* Get the current I2S source */

     srcclk = __HAL_RCC_GET_I2S_SOURCE() ? RCC_I2SCLKSOURCE_EXT : RCC_I2SCLKSOURCE_PLLI2S;

because __HAL_RCC_GET_I2S_SOURCE() return RCC_CFGR_I2SSRC_Msk if bit RCC_CFGR_I2SSRC is set. But need RCC_I2SCLKSOURCE_EXT or RCC_I2SCLKSOURCE_PLLI2S in next

     switch (srcclk)

     {

     /* Check if I2S clock selection is External clock mapped on the I2S_CKIN pin used as I2S clock */

     case RCC_I2SCLKSOURCE_EXT:

...

     case RCC_I2SCLKSOURCE_PLLI2S:

...

1 REPLY 1
KDJEM.1
ST Employee

Hello @NZhar,

A similar question is already asked here.

​Internal ticket number: 139649 (This is an internal tracking number and is not accessible or usable by customers).

Kaouthar

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.