Open Basseuph opened 2 years ago
The I2C master in XFCP should be fully capable of issuing repeated starts, you should just have to call write_read_i2c
instead of a write followed by a read. Also, if you need to do something more complex than what write_read_i2c
can do (single write, repeated start, single read), the packet format supports chaining arbitrary operations, maybe this can be exposed with some additional/improved APIs.
Yaeh, thank's a lot for the quick reply! I just realized there is more in the library than available through the simplified CLI _xfpctrl.py, I will further look into this, expand our own script and see whether this does work. I'll keep you posted.
Yeah, xfcp_ctrl.py
is really more of a simple example script than anything else. The intent is for you to import the xfcp python modules and control it directly from python, instead of calling xfcp_ctrl.py
multiple times with various arguments.
We implemented an xfcp based design to help bringing-up a custom PCB. While running various tests, we noticed that the I2C implementation is not compatible with the SMBUS spec, because we cannot issue the read command and receive the data after a repeated start, because the system always finalizes the write transaction issueing a stop condition on the bus.
Which parts of the xfcp system do we need to adapt to enhance the system to support this kind of behavior or more geneic add a way to concatenate partial transaction, that are not finalized by stop conditions.