cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f334 i2c slave speed

tri.1
Associate

Stm32f334 i2c works in slave mode , select i2c kernel clock 72mhz.

datasheet says it's i2c fast-mode+ support up to 1mhz, but I found that it can be accessed stably by a master with scl at 2.5mhz. Is it ok to use a master scl speed faster than 1mhz to communicate with the mcu, what's the mcu's i2c scl speed limitation as a slave ?

and how "I2C timing configuration tool " can help to set the timing reg in this situation, now i set the timing reg to 0x0.

1 ACCEPTED SOLUTION

Accepted Solutions
Foued_KH
ST Employee

Hello @tri.1​ ,

The maximum frequency for the I2C communication is 1MHz.

"The interface is connected to the I2C bus by a data pin (SDA) and by a clock pin (SCL). It can be connected with a standard (up to 100 kHz), Fast-mode (up to 400 kHz) or Fast-mode Plus (up to 1 MHz) I2C bus." RM0364 section 27.4 I2C functional description.

>how "I2C timing configuration tool " can help to set the timing reg in this situation ?

you can use STM32CubeMX for the configuration :


_legacyfs_online_stmicro_images_0693W00000bkxInQAI.pngyou can set 72MHz as a clock :


_legacyfs_online_stmicro_images_0693W00000bkxIxQAI.png 

Hope 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.

View solution in original post

1 REPLY 1
Foued_KH
ST Employee

Hello @tri.1​ ,

The maximum frequency for the I2C communication is 1MHz.

"The interface is connected to the I2C bus by a data pin (SDA) and by a clock pin (SCL). It can be connected with a standard (up to 100 kHz), Fast-mode (up to 400 kHz) or Fast-mode Plus (up to 1 MHz) I2C bus." RM0364 section 27.4 I2C functional description.

>how "I2C timing configuration tool " can help to set the timing reg in this situation ?

you can use STM32CubeMX for the configuration :


_legacyfs_online_stmicro_images_0693W00000bkxInQAI.pngyou can set 72MHz as a clock :


_legacyfs_online_stmicro_images_0693W00000bkxIxQAI.png 

Hope 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.