Skip to content
esp-labsESP32-S3 bench guide
All blocks

Connectivity

I2C

Two-wire bus for sensors and small displays

Not yet

Loading the 3D view…

  • SDA
  • SCL

Key facts

In our labs

No lab uses this block yet.

Key registers

I2C_SCL_LOW_PERIOD_REGoffset 0x0000
I2C_SCL_LOW_PERIOD_REG
BitsFieldWhat it does
8:0I2C_SCL_LOW_PERIODHow long SCL stays low, in module clock cycles.

Technical reference §27.8

I2C_CTR_REGoffset 0x0004
I2C_CTR_REG
BitsFieldWhat it does
5I2C_TRANS_STARTStart running the queued commands.
4I2C_MS_MODE1 makes the controller a master.
0I2C_SDA_FORCE_OUT0 for open-drain SDA.

Technical reference §27.8

I2C_SR_REGoffset 0x0008
I2C_SR_REG
BitsFieldWhat it does
4I2C_BUS_BUSYThe bus is busy.
3I2C_ARB_LOSTAnother master won the bus.
0I2C_RESP_RECThe last ACK bit: 0 ACK, 1 NACK.

Technical reference §27.8

I2C_DATA_REGoffset 0x001C
I2C_DATA_REG
BitsFieldWhat it does
7:0I2C_FIFO_RDATARead from the RX FIFO, write to the TX FIFO.

Technical reference §27.8

I2C_COMD0_REGoffset 0x0058
I2C_COMD0_REG
BitsFieldWhat it does
31I2C_COMMAND0_DONESet when the command has run.
13:0I2C_COMMAND0First command: op code (1 WRITE, 2 STOP, 3 READ, 4 END, 6 RSTART) and byte count.

Technical reference §27.8

Read the full sectionTechnical reference §27