I2C Drivers

Three driver variants are available for the I2C Master: Synchronous, Asynchronous, and RTOS.

  • I2C Master Synchronous Driver: The driver supports polling for hardware changes. The functionality is synchronous to the main clock of the MCU.

  • I2C Master Asynchronous Driver: The driver supports a callback handler for the IRQ caused by hardware state changes. The functionality is asynchronous to the main clock of the MCU.

  • I2C Master RTOS Driver: The driver supports a Real-Time operating system, i.e. is thread safe.

Two driver variants are available for the I2C Slave: Synchronous and Asynchronous.

  • I2C Slave Synchronous Driver: The driver supports polling for hardware changes. The functionality is synchronous to the main clock of the MCU.

  • I2C Slave Asynchronous Driver: The driver supports a callback handler for the IRQ caused by hardware state changes. The functionality is asynchronous to the main clock of the MCU.

I2C Basics and Best Practice

I2C (Inter-Integrated Circuit) is a two-wire serial interface normally used for on-board low-speed bidirectional communication between controllers and peripherals. The master device is responsible for initiating and controlling all transfers on the I2C bus. Only one master device can be active on the I2C bus at the time, but the master role can be transferred between devices on the same I2C bus. I2C uses only two bidirectional open-drain lines, normally designated SDA (Serial Data Line) and SCL (Serial Clock Line), with pull up resistors.