Inter-integrated Circuit (I2C) Interface
User Manual All information provided in this document is subject to legal disclaimers. © REALTEK 2019. All rights reserved.
245
13
Inter-integrated Circuit (I
2
C) Interface
13.1
Introduction
This chapter describes the Ameba-D I
2
C Interface Peripheral, referred to as I
2
C.
The design of Ameba-D I
2
C aims on sensor hub application in low-power or battery-powered productions. Essential features of I
2
C bus protocol
should be provided for acquiring or controlling external sensor data. To reduce system power consumption, advanced application scheme in
Ameba-D I
2
C are also available for further low power system state.
Ameba-D I
2
C has the following features:
Two-wire I
2
C serial interface – consists of a serial data line (SDA) and a serial clock (SCL)
Support one I
2
C port
Two Speed mode:
Standard (up to 100Kbps)
fast (up to 400Kbps)
Master or Slave I
2
C operation
7- or 10-bit addressing
Transmit and receive buffers with depth of 16
T
X
and Rx DMA support
Multi-master ability including bus arbitration scheme
Slave mode address match wakeup for power save (up to 100kbps)
Clock stretch in master/slave mode
7- or 10-bit combined format transfers
General Call
Component parameters for configurable software driver support (programmable SDA hold time, slave address, etc.)
Filter to eliminate the glitches on signal of SDA and SCL. Programmable digital noise Filter
Status flags (Bus busy flag, activity flag, FIFO status flag, etc.) and Error flags (arbitration lost, acknowledge failure, etc.)
13.2
Functional Description
This chapter describes the functional behavior of Ameba-D I
2
C in more details.
13.2.1
Overview
The I
2
C bus is a two-wire serial interface, consisting of a serial data line (SDA) and a serial clock (SCL). These wires carry information between
the devices connected to the bus. Each device is recognized by a unique address and can operate as either a “transmitter” or “receiver,”
depending on the function of the device. Devices can also be considered as masters or slaves when performing data transfers. A master is a
device that initiates a data transfer on the bus and generates the clock signals to permit that transfer. At that time, any device addressed is
considered a slave.
Note:
The Ameba-D I
2
C must only be programmed to operate in either master or slave mode only. Operating as master and slave
simultaneously is not supported.
Any I
2
C device can be attached to an I²C-bus and every device can talk with any master, passing information back and forth. There needs to be
at least one master (such as a microcontroller or DSP) on the bus but there can be multiple masters, which require them to arbitrate for
ownership. Multiple masters and arbitration are explained later in this chapter.
There are three clock domains, APB clock, Core clock and SCL clock.
Ameba-D I
2
C uses bus clock as APB clock, which has frequency of 10M.
Core clock is consisted of bus clock (10M) and OSC clock (2M), which is selected by a mux. Ameba-D I
2
C uses bus clock as core clock
expect for low power mode.
SCL clock is from the I
2
C bus, which is 100K/s in Standard Mode, 400K/s in Fast Mode and 3.4M/s in High Speed Mode (not supported in
Ameba-D).
Realtek confidential files
The document authorized to
SZ99iot
2019-05-15 10:08:03