Home
  • Products
  • Solutions
  • Support
  • Company

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  • Products
  • Solutions
  • Support
  • Company
Community Blogs Breakfast Bytes > How to Connect Sensors with I3C
Paul McLellan
Paul McLellan

Community Member

Blog Activity
Options
  • Subscribe by email
  • More
  • Cancel
MIPI
i2c
sensors
mobile
I3C

How to Connect Sensors with I3C

22 Sep 2016 • 6 minute read

 breakfast bytes logoA couple of sessions at MIPI DevCon last week were on I3C. This is a new generation based on the old I2C standard. Confusingly, the old standard is pronounced "eye-squared-see" but the new one is "eye-three-see".

I2C History

i2c logoThe I2C network was developed by Philips Semiconductors in the early 1980s. It was largely intended to reduce the cost of televisions, which Philips Consumer Electronics built a lot of. In those days, there were a lot of components and having a two-wire shared network was a way of reducing system cost. Philips patented various aspects of the technology and charged a licensing fee to semiconductor companies. When VLSI Technology, where I was at the time, licensed our gate arrays to Philips Semiconductors, we tried to get the licensing fee waived. Since it was a fixed royalty based on the cost of the whole chip, it wasn't a very ASIC-friendly business model. We were paying a royalty of a couple of percent, I think, on a chip where maybe 0.1% of the chip was the I2C interface. They told us that they couldn't negotiate. That was when I discovered the phrase "most favored nation." All other I2C licensees had a most favored nation clause in their contract that said that if anyone ever got a better deal than they did, they got that deal too. We tried to argue that we could have the same deal, they just had to license their gate arrays too, but that never got any traction. The only time I've ever seen a most favored nation clause actually come into play was when I negotiated a CDMA license with Qualcomm on such favorable terms that they had to go back to the only other semiconductor licensee, DSP Communications in Israel, and lower their royalty rate too.

One of the clever tricks in the I2C was that it was an open drain design, with pullup resistors to keep the two signal lines high if no one was pulling them down. During transmission of an address, all the devices that wanted to transmit would transmit their device ID bit by bit at the same time. If any device pulled the line down (0) when another device was leaving it alone (1), then both devices could tell who had won the arbitration, and thus which device got to transmit. The other device, the one with the higher address, would have to wait its turn.

I3C Bus

Ken Foust gave an overview of I3C. He is the MIPI Sensor Working Group Chair (and in his spare time he works at Intel). I3C is intended for ubiquitous low-speed networking. Anywhere a sensor is used is a good place for i3C.

I3C is a two-wire interface but it addresses many of the things that I2C does not:

  • In-band Interrupt, the capability for a device to send an interrupt to the master over the two-wire bus (I2C required separate interrupt lines for any device that needed to interrupt)
  • Dynamic device addressing (I2C required static addresses and a registry that Philips ran to hand them out)
  • Multi-master (capability for one master to pass control temporarily to another master such as a sensor hub)
  • Standardized commands
  • Time control
  • Hot-join (typically not plugging and unplugging, like with USB, but on-chip blocks being powered down and up)
  • Error detection and recovery
  • Plus I3C should be higher performance and lower power

i3c visionThe top left of the picture above shows an I2C architecture system. Despite I2C requiring just two wires, lots of other signals are required to cope with the things that I2C could not handle, such as interrupts. In the lower right is the equivalent system put together with I3C, so that literally the two wires of I3C are the only signals needed to connect up all the devices.

One of the big challenges with I3C was to keep I2C compatibility. A large number of I2C components are available from many manufacturers, including sensors, memories, microcontrollers, and more. Since these parts already exist, they cannot be changed. The biggest challenge is how to get the I2C components to ignore I3C operation without being able to change them to make them I3C-aware. That way there could be four types of device on the bus:

  • I3C main master
  • I3C secondary master
  • I3C slave
  • I2C slave

Some features of I2C, such as extended addressing and clock stretching, are not supported. I2C devices need to have a 50ns spike filter and then they will ignore any I3C high data rate (HDR) signalling since it won't make it through the filter. Also, I2C devices already have static addresses and so can't participate in the dynamic address assignment.

entering and exiting i3c hdrThere are a number of different data rates: standard data rate (SDR), high data rate (HDR), double data rate (HDR-DDR), and ternary data (using both lines for data) called HDR-TSP/TSL. Not all I3C devices need to support the higher data rates, but they do need to be designed to recognize the start and end high data rate symbols so that they can ignore the high-speed data but start listening again once it finishes transmitting.

I3C Verfication

Next, Alex Passi of Cadence talked about i3C HDR Modes—From Spec to Real Devices. His focus was on verification of high-speed data and real-life scenarios.

Verification is done using both active and passive components. An active component behaves just like the real component. In fact, often it will be the SystemVerilog RTL of the real component. The passive components listen to what is going on, flag errors, and collect coverage. For example, if an incorrect packet of data is transmitted from a slave, then the active master will behave as it would in the real world (probably ignoring the packet) and attempt to recover. The passive component will flag the error. Of course it might not really be an error, part of verification involves sending "bad" data (such as data with a bad CRC) and making sure that the devices handle the bad data the way the I3C spec describes.

In HDR-DDR where data is transmitted on both edges of the clock, the main verification issues are:

  • Ensuring the invisibility of HDR-DDR to  I2C devices on the bus
  • Correct encoding and decoding of data
  • Termination of read operation by the master
  • Error detection and recovery
  • For components that do not support HDR-DDR, ensuring that they properly ignore the traffic

HDR-DDR read

I won't cover all the details of what type of tests are required. But to give a flavor, here is what Alex described for a slave (as opposed to master) DUT:

  • General Write-Read – verifies proper operation of slave DUT in HDR-DDR mode
  • Read Terminated by Master – verifies DUT ability to recognize and accept read termination by I3C master
  • Write with invalid preamble – Active master VC generates invalid preamble in different kinds of DDR words written to slave DUT, in order to test DUT ability to detect, ignore, and recover from erroneous transmission
  • Write with invalid parity - Active master VC generates invalid parity bits in different kinds of DDR words written to slave DUT, in order to test DUT ability to detect, ignore, and recover from erroneous transmission
  • Write with invalid CRC5 - Active master VC generates invalid CRC5 word in DDR write message, in order to test DUT ability to detect, ignore, and recover from erroneous transmission

Alex described similar tests for the master and then progressed to the ternary modes, which are more complex still.

Of course, the most straightforward approach is not to try and build everything from scratch but to purchase verification IP (VIP) for I3C from Cadence. This covers all these conditions and others that are in the standard. It makes more sense to build on work that has already been done rather than duplicating it.

Details of the Cadence I3C VIP are here. It is compatible with the 0.7 version of the I3C spec. The full I3C spec should be finalized by the end of the year.

Next: Mellanox: Using Palladium ICA Mode

Previous: שלום from CDNLive Israel

Debugging Complex Flows Using Indago Debug Analyzer - See more at: https://www.cadence.com/cdnlive/il/2016/Pages/agenda.aspx#sthash.VgADKUF1.dpuf