The following considerations apply when using I2C with BSL-based protocol:
- The host always starts a transfer (R or W).
- The packet must contain the address of the slave device. All other addresses will be ignored.
- If the slave device is not ready to process the data or send a response, it will hold the clock low (known in I2C as "stretching the clock")
- Note that different commands have different processing times
- Example: Host reads version from the MCU
S | 0x40 | W | A | 0x80 | A | 0x01 | A | 0x19 | A | 0xE8 | A | 0x62 | A | P |
| Addr | | | Header | | Length | | TX_ VERSION | | Checksum _L | | Checksum _H | | |
S | 0x40 | R | A | 0xA0 | /A | P |
| Addr | | | Version | | |
- Example: Host writes 16 bytes to address 0xC000.
S | 0x40 | W | A | 0x80 | A | 0x14 | A | 0x10 | A | 0x00 | A | 0xC0 | A | 0x00 | A | 0x03 | A | 0xEE | A |
| Addr | | | Header | | Length | | RX_DATA_ BLOCK | | AddrL | | AddrM | | AddrH | | Data0 | | Data1 | |
0x47 | A | 0xFF | A | 0xB2 | A | 0x40 | A | 0x80 | A | 0x5A | A | 0x20 | A | 0x01 | A | 0xD2 | A |
Data2 | | Data3 | | Data4 | | Data5 | | Data6 | | Data7 | | Data8 | | Data9 | | Data10 | |
0xD3 | A | 0x22 | A | 0x00 | A | 0xD2 | A | 0xD3 | A | 0x15 | A | 0xE4 | A | P |
Data11 | | Data12 | | Data13 | | Data14 | | Data15 | | Checksum _L | | Checksum _H | | |