i2c.master: this port has not been initialized, please initialize it first #494
-
Hello all. Didn't want to create an issue, as I'm not sure if this error is due to me doing something wrong. I'm getting
error when I call Wanted to check here if this message can be ignored, or if I am doing something wrong? It seems like this is coming from the i2c_master code, but I assume the issue is coming from i2c_bus. I did search for issues, discussions, etc. however did not find anyone else mentioning this error. Should I file an issue to get this fixed? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi, @OzerOzdemir . You can ignore this error. This design is intended to handle the scenario where the I2C bus is first initialized by the application, and then sensors using the I2C_BUS component attempt to initialize the bus again. If the I2C_BUS component detects that the I2C bus has already been initialized, it will only initialize the resources required by the I2C_BUS component, rather than reinitializing the I2C bus. Devices created by the I2C_BUS component afterward will be attached to the already-initialized bus. |
Beta Was this translation helpful? Give feedback.
-
Thanks @YanKE01 for the explanation. I'd suggest that this error message be avoided in future versions. Maybe the I2C driver could make the |
Beta Was this translation helpful? Give feedback.
Hi, @OzerOzdemir . You can ignore this error. This design is intended to handle the scenario where the I2C bus is first initialized by the application, and then sensors using the I2C_BUS component attempt to initialize the bus again. If the I2C_BUS component detects that the I2C bus has already been initialized, it will only initialize the resources required by the I2C_BUS component, rather than reinitializing the I2C bus. Devices created by the I2C_BUS component afterward will be attached to the already-initialized bus.