Skip to main content
NZhar
Visitor II
August 21, 2019
Question

BUG in stm32f4xx_hal_rcc_ex.h

  • August 21, 2019
  • 1 reply
  • 655 views

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:

...

This topic has been closed for replies.

1 reply

KDJEM.1
ST Technical Moderator
November 24, 2022

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 "Best answer" on the reply which solved your issue or answered your question.