...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
420
www.silabs.com
When enabling the I
2
C, the ABORT command or the Bus Idle Timeout feature must be
applied prior to use even if the BUSY flag is not set.
16.3.3 Safely Disabling and Changing Slave Configuration
The I
2
C slave is partially asynchronous, and some precautions are necessary to always ensure a safe
slave disable or slave configuration change. These measures should be taken, if (while the slave is
enabled) the user cannot guarantee that an address match will not occur at the exact time of slave
disable or slave configuration change.
Worst case consequences for an address match while disabling slave or changing configuration is that
the slave may end up in an undefined state. To reset the slave back to a known state, the EN bit in
I2Cn_CTRL must be reset. This should be done regardless of whether the slave is going to be re-enabled
or not.
16.3.4 Clock Generation
The SCL signal generated by the I
2
C master determines the maximum transmission rate on the bus.
The clock is generated as a division of the peripheral clock, and is given by Equation 16.2 (p. 420) :
I
2
C Maximum Transmission Rate
f
SCL
= 1/(T
low
+ T
high
),
(16.2)
where
T
low
and T
high
is the low and high periods of the clock signal respectively, given below. When the clock
is not streched, the low and high periods of the clock signal are:
I
2
C High and Low Cycles Equations
T
high
= (N
high
× ( 1))/f
HFPERCLK
,
T
low
= (N
low
× ( 1))/f
HFPERCLK
.
(16.3)
Equation 16.3 (p. 420) and Equation 16.2 (p. 420) does not apply for low clock division factors (0,
1 and 2) because of synchronization. For these clock division factors, the formulas for computing high
and low periods of the clock signal are given in Table 16.2 (p. 420) .
Table 16.2. I
2
C High and Low Periods for Low CLKDIV
CLKDIV
Standard (4:4)
Asymmetric (6:3)
Fast (11:6)
T
low
T
high
T
low
T
high
T
low
T
high
0
7/f
HFPERCLK
7/f
HFPERCLK
9/f
HFPERCLK
6/f
HFPERCLK
14/f
HFPERCLK
9/f
HFPERCLK
1
10/f
HFPERCLK
10/f
HFPERCLK
14/f
HFPERCLK
8/f
HFPERCLK
24/f
HFPERCLK
14/f
HFPERCLK
2
15/f
HFPERCLK
15/f
HFPERCLK
21/f
HFPERCLK
12/f
HFPERCLK
36/f
HFPERCLK
21/f
HFPERCLK
The values of N
low
and N
high
and thus the ratio between the high and low parts of the clock signal is
controlled by CLHR in the I2Cn_CTRL register. The available modes are summarized in Table 16.3 (p.
421) along with the highest I
2
C-bus frequencies in the given modes that can be achieved without
violating the timing specifications of the I
2
C-bus. The maximum data hold time is dependent on the DIV
and is given by:
Maximum Data Hold Time
t
HD,DAT-max
= (4+DIV)/f
HFPERCLK
.
(16.4)
Note
DIV must be set to 1 or higher during slave mode operation.
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......