rudiratlos
Posts: 160
Joined: Tue May 01, 2012 8:47 am

rpi3 I2C baudrate is only 250kHz, but should 400kHz???

Tue Nov 14, 2017 5:54 pm

Hi,
I just wanted to test my new logic analyzer on my rpi3 model B V1.2.
raspian 4.9.57-v7+ #1045 SMP Fri Oct 20 11:44:49 BST 2017 armv7l GNU/Linux
Connected SDA1 and SCL1 and ground (Pins 3,5,6).
in /boot/config.txt I have dtparam=i2c_baudrate=400000
just did a i2cdetect -y 1 and get some clock data on SCL1 with only 250kHz.
in this article, https://periph.io/platform/raspberrypi/ I found that for getting a clock close to 400kHz clock I have to set dtparam=i2c_baudrate=600000
Why is the parameter setting broken?
ok, I can set dtparam to 600000 for my application, but what will happen if newer OS versions will implement this parameter in the right way?
Is there a sysfs function to retrieve the real i2c clock speed?

Thanks,
SF

rudiratlos
Posts: 160
Joined: Tue May 01, 2012 8:47 am

Re: rpi3 I2C baudrate is only 250kHz, but should 400kHz???

Wed Nov 15, 2017 4:19 pm

setting dtparam=i2c_baudrate=640000 on a RPI3B will result in a 400kHz I2C ClockFreq.

Also found a more detailed german article, which describes this problem also.

We have different dtparam setting for different RPI boards (Pi3/PI3/PiZeroW):

http://forum.weihenstephan.org/forum/ph ... .php?t=684

Return to “Interfacing (DSI, CSI, I2C, etc.)”