Electronic – Reasons for multiple I2C modules in ARM-based MCUs

armi2c

I was looking in the NXP product selection guide for ARM Microcontrollers. There are multiple I2C modules in most of the ARM MCUs.

Since I2C is a multi-master multi-slave protocol, is there any clear advantage to this approach?

Best Answer

  • Ability to have multiple independent buses
    • Avoid address conflicts:
      • You can have two identical I²C devices with hard-coded addresses that way (e.g. temperature sensors), or;
      • if the address is only variable by a few bits, have more devices than addresses that fit into these bits.
    • Higher cumulative throughput
    • Not having to wait for one I²C transfer to be finished for the one on the other bus to start
    • Independent speeds
    • Having one bus for devices that are fully I²C compliant, and one for those not supporting advanced features like clock stretching (and would become confused)
  • Your MCU might be "logically" a peripheral on one bus, and a controller on the other
  • Layout simplification
  • Higher permissible rates
  • Different pull-ups for different device characteristics
  • Error isolation
  • Higher computational efficiency
    • Configure DMA to put I²C data from one interface to a different memory region than the other
    • Have different interrupts for different I²C buses
    • Have two threads accessing different I²C devices without needing to mutex access to the I²C hardware.
  • Energy saving
    • Only pulling down a small I²C bus with weak pull-up resistors wastes less energy than pulling down a large bus with strong resistors