SMBus startup time, is there a way to check it?

Sep 06, 2025 Last reply: 10 months ago 2 Replies

I use I2C extensively on a Pi 4B on our little boat. To do all the I2C stuff I use the smbus package (the standard python3-smbus that is).



Currently I have a 120 second delay after booting the system before actually using the I2C bus, I can't quite remember when I did this or quite why it's so long. It's likely much longer than necessary as this was originally implemented on a much older Pi than the current 4B.



So, the best way to reduce the delay would be to have some definite way of telling if the SMBus/I2C is up and running. Does anyone know how one might do this? Alternatively does anyone here use smbus on a Pi 4B with a much shorter delay?



There is nothing on I2C/SMBUS that needs "starting up". As soon as power is up, the pullup resistors pull the bus lines to idle state, and the bus is ready for transactions.

Slave devices may need some time after power-up to initialize, but this is typically milliseconds unless specified otherwise.

I have used I2C on a Pi 1 for INA219 and I2V-connected LCD/OLED displays, and I did not need any delays after start - my guess is that you are looking at driver/library problems.

cu Michael

I2C should work immediately after boot.

I'm thinking you may have delayed starting until the clock has been synchronised to avoid incorrect logging timestamps. You can reduce this delay by enabling systemd-time-wait-sync.service and making the After of your service set to

After=After=time-sync.target

Alternatively get a RTC for the Pi.

---druck

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required