Understanding of MIPI I3C protocol and usage for sensor, other communication interface application

Introduction

As the usage of sensors in mobile devices increases day by day, it’s becoming complicated for designers to use existing methods (I2C and SPI).So the members of MIPI alliance introduced an Improved Inter Integrated Circuits. I3C is an evolution of I2C, low-speed peripherals and sensors in computer systems. I3C adds a significant number of system interface features while retaining backward compatibility with existing I2C slave devices while native I3C devices support higher data rates, similar to Serial peripheral interface (SPI). Both I2C and I3C are having SCL and SDA lines but, I2C supports only four speed modes (100KHz, 400KHz, 1MHz, 3MHz) I3C supports speed up to 12.5MHz in single data rate mode. I3C has high throughput bit rate up to12.5Mbps. The main purpose of MIPI I3C is,

  • To standardize sensor communication,
  • To reduce the number of physical pins used in sensor system integration,
  • To support low power, high speed and other critical features which are currently not covered by I2C and SPI.
i3c_bus_with_i3c_and_i2c_devices

Figure 1: I3C Bus with I3C and I2C devices

I3C Capabilities:

MIPI I3C has following capabilities which are not supported by I2C protocol,

  • Dynamic address assignment:

    In I3C address can be assigned dynamically unlike I2C which is having static address.

  • Hot-join feature:

    Hot join sensors can be connected on the same bus can be powered off until they are needed. I3C slaves can join after the bus configuration.

  • I2C slave:

    Legacy I2C devices present in an I3C bus; I3C master devices can conditionally communicate to such legacy devices; constraints on speed and capabilities are applicable.

  • Secondary master:

    Takes temporary control from main master and passes control back to the main master once control tasks are completed.

  • In band interrupt:

    I3C provides in-band interrupts within the 2-wire interface, which drastically reduces device pin count and signal paths, and enables integration of additional sensors in a device.

  • Standard CCC commands:

    Standard CCC commands to communicate with I3C slaves. Slaves recognize the command and responds back to master on I3C bus communication. These commands are global for all I3C devices unlike I2C.

i3c_capabilities

Figure 2: I3C capabilities

Basic Operations:

I3C is a two wire bidirectional serial bus, which is having SCL clock line and SDA data line. Speed grades with data transfer rate up to 12.5Mbps with 12.5 MHz clock frequency in SDR mode. I3C bus starts transaction with START condition (SCL should be held high and SDA should go from high to low), following that address of the slave device or broadcasted address with W/R bit should be sent. After initial start address arbitration may happen in I3C bus the device which has lowest value address would win. For broadcasted address, all the slave devices on I3C bus should send acknowledgment (except I2C slaves). For slave address, only particular slave sends acknowledgment. After ACK I3C bus continues with write, read or CCC command data. I3C master can choose to STOP (SCL should be held high and SDA should go from low to high) or can give repeated start after a transaction (by using host controller command).

i3c_bus_communication_format

Figure 3: I3C Bus Communication Format

Advantages of I3C over I2C:

  1. Speed:

    I²C supports a limited range of speeds. Hosts supporting the multi- megabit speeds are rare. Support for the Fm+ 1 Mbps speed is more widespread, since its electronics are simple variants of what is used at lower speeds. Many devices do not support the 400 kbps speed. I²C nodes implemented in software (instead of dedicated hardware) may not even support the 100 kbps speed. So, the whole range defined in the specification is rarely usable. I3C speed is 12.5MHz which is much faster compared to I2C speed modes. I3C provides raw bit rate of 12.5Mbps in the baseline SDR default mode. Since I3C is using strong pull up with push pull mode for transaction gives high speed rate with power efficiency.

    Example: EEPROM 24LC512

    speed_and_data_rate_for_i3cvs_i2c

    Figure 4: Speed and data rate for I3C vs. I2C

    Calculation details:

    Total no of data bits= 9 bit Slave address/ACK + 8 bit Register address + 512k Data bits + 64K ACK/Parity bits for data = 585Kb

    400 KHZ-->2500ns-->(2500*585K)ns= 1.4625 seconds

    1 MHz-->1000ns-->(1000*585K)ns= 0.585 seconds

    10 MHz-->100 ns -->(100*585K) ns= 0.058 seconds

    12.5MHz--> 80 ns -->(80*585K) ns= 0.047 seconds

  2. Dynamic addressing:

    Static address is an issue in I2C devices. A given address may be used by a number of different protocol-incompatible devices in various systems, and hardly any device types can be detected at runtime. For example, 0x51 may be used by a 24LC02 or 24C32 EEPROM, with incompatible addressing; or by a PCF8563 RTC, which cannot reliably be distinguished from either (without changing device state, which might not be allowed). The only reliable configuration mechanisms available to hosts involve out-of-band mechanisms such as tables provided by system firmware, which list the available devices. In I3C each device connected to the I3C bus needs to have a unique address which is used for subsequent transactions. This address is assigned by the I3C main master, either during the initialization of the bus or when a new device is connected to the already configured I3C bus. This process is called dynamic address assignment. This re¬duces static address and address confliction issues.

    dynamic_address_assignment_process

    Figure 5: Dynamic address assignment process

  3. Standard commands:

    I2C does not have any standardized command. The commands used for I2C are decided by different vendors. For example, Pressure sensor and temperature sensors are having different command formats. But I3C has standard CCC commands which are used to,

    • Enable and disable events on I3C bus.
    • To set/get maximum write and read lengths for data.
    • To assign the dynamic address or to reset/reassign the dynamic address.
    • To enable activity states
    • To enable test modes

    I3C contains two ways of CCC command transfer,

    • Broadcast CCC model(will be send to all I3C slave devices on bus)
    • Direct CCC model(will be send to particular I3C slave device on bus)
    broadcast_ccc_format

    Figure 6: Broadcast CCC format

    direct_ccc_format

    Figure 7: Direct CCC format

  4. In band Interrupt support:

    In I3C master allows the slave to give interrupt during I3C communication which currently require dedicated line on I2C. I3C allows slave to initiate I3C bus after available condition. Slave device with lowest address wins the arbitration. But I2C needs separate pins for interrupts and sleep logics. In addition I2C does not have ability to initiate communication. In MIPI I3C Interrupt functionality can be enabled or disabled using CCC commands. I3C master will give ACK to allow ACK/NACK for IBI event after checking the capability of slave device.

  5. Power saving modes:

    In I3C it is not necessary for all slaves to be activated when the I3C bus is initially powered up. There are two scenarios:

    • Some of the slaves can be physically inserted into the bus later or they have been present but not activated.
    • Slaves can be powered on after the bus has been active for some time.

    The process of activating such slaves into the bus is known as hot- join. The hot-join feature enables the master to assign a dynamic address to the slave when the request is made by the slaves. In I2C all these special features needs separate GPIO pins which increase the power and area requirement.

  6. Command queue support:

    MIPI I3C basic has command queue support from host controller appliance. Commands for different types of transaction has been defined and sent in a queue, then I3C master works according to this commands. This reduces the number of register used for peripherals and provides standard details and structure for I3C communication.

    i3c_interface_with_command_queue

    Figure 8: I3C interface with command queue

    • For regular write, read transaction regular command.
    • For CCC functions immediate command.
    • For broadcast inclusion address assignment.
    • For ENTDAA or SETDASA process internal control command is used.

    The process of activating such slaves into the bus is known as hot- join. The hot-join feature enables the master to assign a dynamic address to the slave when the request is made by the slaves. In I2C all these special features needs separate GPIO pins which increase the power and area requirement.

I3C Applications:

MIPI I3C is accepted in various industries because of its speed, power and area efficiency. I2C is typically used to support multiple sensors but having drawback in sensor interconnections. It increases the area requirement which affects power and cost as well. I3C is an absolute solution for integrating sensors with minimum number of connections, power and cost efficiency. I3C is used in smart phones, virtual reality, robot drones, medical instruments, autonomous vehicles, industrial equipments, all in one computers and TV remotes, accelerometers, touch screens, time of flight cameras, sonic/ultrasonic sensors, environmental sensors, near field communication, infrared or ultra violet sensing.

i3c_related_applications

Figure 9: I3C related applications

Summary

MIPI I3C Basic is a subset of MIPI I3C that bundles the most commonly needed I3C features for developers and other standards organizations. The mobile ecosystem and broader system integrator community can efficiently use these capabilities as an alternative to I2C. MIPI I3C interface has been developed to ease sensor system design architectures in mobile wireless products by providing fast, low cost, low power digital interface for sensors. Implementing I3C increases the flexibility mobile terminal system designers have to support an ever expanding sensor subsystem as efficiently and at as low cost as possible. MIPI I3C satisfies broad range of applications that extends beyond smart phones. Over time MIPI I3C could conceivably become much more than a standardized sensor interface and develop into a de facto bus communication standard for touch sensing, always-on and low resolution cameras, acoustics, environmental sensors and transducers that currently use I²C, SPI, UART and others.

References:

  • MIPI I3C Basic v1.0 Specification
  • Introduction to the MIPI I3C Standardized Sensor Interface (white paper series)
  • MIPI Webinar I3C Developer Guide 180207 PDF_0
  • A Developer’s Guide to MIPI I3C Implementation
  • MIPI Alliance Releases I3C Basic Interface Specification for Widespread Implementation in Mobile and Beyond
  • Specification for I3C Host controller interface

Follow us