Hello,
We have a Realtek-based PCB whose i2c access follows a general command set. We want to attach an SPI device using SC18IS602B as a bridge. I want to access the bridge to display information, such as the vendor product code or any other verification that confirms my device can connect to the bridge. The command set for my board follows this syntax:- i2c set <bus> <dev> <reg> <data>; i2c get <bus> <dev> <reg>. I read the manual of SC18IS602B, but it does not show any memory that I can read. Furthermore, I am unsure what to write in the 'reg' field of my I2C command. The hardware team told us that the A2A1A0 pins are set to 0, which, I think means the dev address is 0x28. Please help me read any information from the SC18IS602B device.
Hello,
If A2, A1 and A0 pins are all set to 0, the 7-bit slave address is indeed 0x28 resulting in complete address byte of 0x50 for a write and 0x51 for a read.
As for the I2C message/data format, please refer to the datasheet, chapters 7.1.1 and 7.1.2.
Thanks for the reply.
I see that part of the manual. However, I am unable to use it for my specific use case. The following log is what I have tried on board.
RTK.0> i2c set write-buffer pos 0 data 5100010203 // My PCB's buffer 0x51, 0x01, 02, 03, 04> I am trying to read 4 Bytes of data from the buffer.
RTK.0>
i2c show write-buffer // For verification..
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
0000 51 00 01 02 03 00 00 00 00 00 00 00 00 00 00 00
0001 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0002 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0003 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0004 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0005 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0006 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0007 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0008 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0009 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0011 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0012 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0013 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0014 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0015 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0017 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0018 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0019 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
001a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
001b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
001c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
001d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
001e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
001f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
RTK.0>
RTK.0>
i2c set port 0 dev 0x28 reg 0 write-buffer count 5 // Send to SC18IS602B device
RTK.0>
i2c get port 0 dev 0x28 reg 0 count 10 // trying to read SC18IS602B buffer
start with dev: 0x28, reg: 0x0
0000 -----------------------------------------------------------------------
00000000 00000001 00000002 00000003 00000004 00000005 00000006 00000007
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
-----------------------------------------------------------------------
00000008 00000009 0000000a 0000000b 0000000c 0000000d 0000000e 0000000f
00000000 00000000
Am I on right path?