cancel
Showing results for 
Search instead for 
Did you mean: 

How to set values for the timing Register in STM32F303RE in I2C

AOmar.2
Associate

I try to write the driver for I2C and I open the reference I face a problem in setting values for SCLDEL SDADEL SCLH SCLL and I don't know how to set theses values. I kept searching and I saw there is an Excel sheet you can enter the Pclk and I2C speed frequent,rise time ,fall time, and choose filters then you will get the value I try to apply the example which is provided in the below picture but the result is not the same as the photo

So to summarize What do I need to help me in it?

Why the result is different?

How to set values of ( SCLDEL SDADEL SCLH SCLL )? It will be great if you give a formula to understand instead of reference which I can't understand it.

0693W00000Un9XbQAJ.png0693W00000Un9XlQAJ.png

1 ACCEPTED SOLUTION

Accepted Solutions
Foued_KH
ST Employee

Hello @AOmar.2​ and welcome to the Community :D

I suggest you look to the Reference manual (RM0316) in Sections for more details:

  • I2C timings
  • 28.4.9 I2C_TIMINGR register configuration examples
  • 28.7.5 Timing register (I2C_TIMINGR)
  • 28.7.6 Timeout register (I2C_TIMEOUTR)

STM32F303xB/C/D/E, STM32F303x6/8, STM32F328x8, STM32F358xC, STM32F398xE advanced ARM®-based MCUs

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.

View solution in original post

1 REPLY 1
Foued_KH
ST Employee

Hello @AOmar.2​ and welcome to the Community :D

I suggest you look to the Reference manual (RM0316) in Sections for more details:

  • I2C timings
  • 28.4.9 I2C_TIMINGR register configuration examples
  • 28.7.5 Timing register (I2C_TIMINGR)
  • 28.7.6 Timeout register (I2C_TIMEOUTR)

STM32F303xB/C/D/E, STM32F303x6/8, STM32F328x8, STM32F358xC, STM32F398xE advanced ARM®-based MCUs

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.