Looking to read and write data to the BQ40z50 using MCP2221-based system /SMBus command manipulation; tried the below with no joy.
-smbw=1 -slave8=0x0B -register=0x1f -pec=on-speed= 100000 |
-smbw=1 -slave8=17 -register=44,1f -pec=on-speed= 100000 |
Derived from the following configuration rules.
smbR=<bytes to read> slave<8|7>=<slave address> register=<value> [pec=<on|off>] [speed=<communication speed] [f=<file path>]
SMBus read operation. Will read the desired number of bytes from an SMBus slave connected to the MCP2221.
Options:
-> slave<8|7> - 8bit or 7 bit slave address from which the data will be read
-> register - 8 bit hexadecimal value of the register we'll read from
-> pec=<on|off> - enable/disable the Packet Error Checking. If this option isn't configured, the default value is "off"
-> speed - communication speed (decimal). 48000 to 400000. If this option isn't present 100000 bps will be used.
-> f - save the read data to a file. If this option isn't present the data will be printed to the command line.
Ex: -smbR=5 -slave8=a0 -register=0 -pec=on -speed=400000 -f="C:\read.txt"
Read 5 bytes from the slave with address A0, starting at register index 0 using a 400000bps speed.
Packet error checking is enabled for this operation and the read data will be saved in the "read.txt" file.
I2C/SMBus error codes
-----------------------------------------------------------------------------------
-4 MCP2221 write failed
-5 MCP2221 read failed
-8 Command failed
-11 SMBus slave data NACK received
-12 Wrong PEC (SMBus only)
-17 Error copying memory
-18 Timeout
-19 I2C/SMBus send Error
-21 Error setting I2C/SMBus speed
-22 Invalid I2C status
-23 Address NACK received
-24 Transfer wasn't possible
-25 Command failed
-26 Could not read data
-27 Received more data bytes than requested
All combinations we have tried return Error 18 Timeout, can anyone support?