Skip to main content
Associate II
February 23, 2023
Solved

Setting peripheral clock same as the APB1 bus clock following the data sheet which is 42MHZ .It's from bit 0 to 5 on I2C control register 2.To what bit do I set it to?

  • February 23, 2023
  • 1 reply
  • 2137 views

..

This topic has been closed for replies.
Best answer by Foued_KH

Hello @Marrkinho​ ,

To set the peripheral clock frequency for I2C as APB1 frequency (for 42 MHz ) , you need to program the bits 0-5 (FREQ[5:0]) of the I2C control register 2 (I2C_CR2) as 0x2A. (following the RM)

0693W00000aHaphQAC.pngHope I helped you!

Foued

1 reply

Foued_KH
Foued_KHBest answer
ST Employee
February 24, 2023

Hello @Marrkinho​ ,

To set the peripheral clock frequency for I2C as APB1 frequency (for 42 MHz ) , you need to program the bits 0-5 (FREQ[5:0]) of the I2C control register 2 (I2C_CR2) as 0x2A. (following the RM)

0693W00000aHaphQAC.pngHope I helped you!

Foued

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.