29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RM0008<br />

Inter-integrated circuit (I 2 C) interface<br />

Figure 232. I 2 C block diagram<br />

DATA REGISTER<br />

SDA<br />

DATA<br />

CONTROL<br />

DATA SHIFT REGISTER<br />

COMPARATOR<br />

PEC CALCULATION<br />

SCL<br />

CLOCK<br />

CONTROL<br />

OWN ADDRESS REGISTER<br />

DUAL ADDRESS REGISTER<br />

PEC REGISTER<br />

CLOCK CONTROL<br />

REGISTER (CCR)<br />

SMBALERT<br />

CONTROL REGISTERS<br />

(CR1&CR2)<br />

STATUS REGISTERS<br />

(SR1&SR2)<br />

CONTROL<br />

LOGIC<br />

INTERRUPTS<br />

DMA REQUESTS & ACK<br />

Note: SMBALERT is an optional signal in SMBus mode. This signal is not applicable if<br />

SMBus is disabled.<br />

24.3.2 I 2 C slave mode<br />

Note:<br />

By default the I 2 C interface operates in Slave mode. To switch from default Slave mode to<br />

Master mode a Start condition generation is needed.<br />

The peripheral input clock must be programmed in the I2C_CR2 register in order to<br />

generate correct timings. The peripheral input clock frequency must be at least:<br />

● 2 MHz in St<strong>and</strong>ard mode<br />

● 4 MHz in Fast mode<br />

As soon as a start condition is detected, the address is received from the SDA line <strong>and</strong> sent<br />

to the shift register. Then it is compared with the address of the interface (OAR1) <strong>and</strong> with<br />

OAR2 (if ENDUAL=1) or the General Call address (if ENGC = 1).<br />

In 10-bit addressing mode, the comparison includes the header sequence (11110xx0),<br />

where xx denotes the two most significant bits of the address.<br />

Header or address not matched: the interface ignores it <strong>and</strong> waits for another Start<br />

condition.<br />

Doc ID 13902 Rev 9 627/995

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!