I2C Core Registers

Table 1. I2C Core Registers
Bit Name Description
7:0 MIDR
Data byte from command_byte and din ports are written into this data register and transferred out through the I2C bus.
When num_bytes is more than 2, the subsequent byte of din is written to MIDR after one byte of data transfer completed.
7:0 MODR
Data received from the I2C transfer is written to this register. This register value is assigned to the data_out port.
When there are more than 1 byte of data received, the previous data byte is right-shifted to the least significant bit (LSB) and concatenate with the current received byte to form data_out.
7:0 MADR
This is an I2C slave specific register. Parameter SLAVE_ADDR is assigned to this register.
This register value is compared with the I2C header byte send by the I2C master. If these values match, the I2C slave sends ACK the I2C master. Otherwise, it sends NACK to the 2C master.
The least significant bit is ignored. Only MADR [7:1] are compared with the header byte.