Page 1 of 1

Error time out in i2c_master_cmd_begin()

Posted: Thu Dec 05, 2019 7:41 pm
by PeterR
I use the I2C controller to access GPIO extender and LED controller.
It is not entirely clear how the time out in i2c_master_cmd_begin() is intended to work.
On entry a semaphore is taken granting ownership of the bus.
It looks as if the time out is also used to detect completion.

The problem is that on one of my boards I was missing the GPIO extender. The i2c_master_cmd_begin() calls then ran to the full time out.
Why does the I2C wait for full time out when there is no device and/or bus error?