cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7xx: PLL3 as clock for I2C kills USB

Posted on June 21, 2018 at 06:58

Another issue found, potentially in HAL drivers (HAL_RCCEx_PeriphCLKConfig):

I try to use PLL3R for I2C clock:

PeriphClkInitStruct.I2c123ClockSelection = RCC_I2C123CLKSOURCE_PLL3;            //USB will FAIL!!!

If I do this - my

USB is dead

(using also PLL3, PLL3Q):

PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_PLL3;

It works just with:

PeriphClkInitStruct.I2c123ClockSelection = RCC_I2C123CLKSOURCE_D2PCLK1;

Conclusion:

it looks like a bug in HAL driver functions:

if a PLL output is used as clock source, even they have 3 clock outputs for peripherals (P, Q, R):

 

==> JUST

ONE

PLL clock output can be used for peripherals!

or: if more then one 'or-ed' macros for same PLL are not zero - just one config seems to win (or they kill each other).

So, you CANNOT use a PLL with

MORE THEN ONE

clock output for peripheral clocks!

(similar to the same issue with SDMMC1: it cannot use PLL2 - if PLL2 is already used for SPI clocks, the HAL driver code (or chip ?) seems to make it exclusive to 'just one PLL clock output is usable').

4 REPLIES 4
Posted on June 21, 2018 at 16:54

So if you program the RCC registers and avoid the Cube/HAL contraptions, does it work as expected?

JW

Amel NASRI
ST Employee
Posted on June 21, 2018 at 18:31

Hi

Jaekel.Torsten

‌,

I confirm that there is an issue with RCC driver in the STM32CubeH7 package.

It is a similar issue to the one you have already reported in

https://community.st.com/0D50X00009XkhUQSAZ

.

A patch is provided in

https://community.st.com/0D50X00009XkZJxSAN

.

Could you please apply it at your end, waiting for the official fix in the next STM32CubeH7 version?

-Amel

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.

Posted on June 21, 2018 at 20:26

Thank you, Amel, I appreciate.

I found and will take the errata. Great.

Many regards, Torsten

Amel NASRI
ST Employee

Fix deployed in STM32CubeH7 v1.3.0 currently available on the web.

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.