Electronic Components Datasheet Search
  English  ▼

X  

PM0222 Datasheet(PDF) 25 Page - STMicroelectronics

Part # PM0222
Description  Brain smart hub family
PDF  33 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

PM0222 Datasheet(HTML) 25 Page - STMicroelectronics

Back Button PM0222 Datasheet HTML 21Page - STMicroelectronics PM0222 Datasheet HTML 22Page - STMicroelectronics PM0222 Datasheet HTML 23Page - STMicroelectronics PM0222 Datasheet HTML 24Page - STMicroelectronics PM0222 Datasheet HTML 25Page - STMicroelectronics PM0222 Datasheet HTML 26Page - STMicroelectronics PM0222 Datasheet HTML 27Page - STMicroelectronics PM0222 Datasheet HTML 28Page - STMicroelectronics PM0222 Datasheet HTML 29Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 25 / 33 page
background image
DocID025476 Rev 1
25/33
PM0222
I2C
33
10
I2C
All I²C registers are described in a structure defined in the Brain header file (.h) provided by
STMicroelectronics. Each I²C can operate in master or slave mode, up to 400 kHz (fast
mode). Standard mode is also supported up to 100 kHz.
Brain has two I²C available at the following addresses in the memory map:
I2C2 APB base address: 0xA400_0000
I2C1 APB base address: 0xA500_0000
10.1
I2C FIFO management
The transmit and receive paths are buffered with internal FIFO memory enabling up to 16
bytes to be stored independently in both transmit and receive modes.
FIFOs status can be checked using the I²C interrupts. There is a programmable threshold
value for each FIFO. When the number of entries is greater for the receive FIFO or less for
the transmit FIFO, an interrupt is set.
10.2
I2C clock rate calculation example
To define the I²C clock rate generation there is one register to configure: I2C_BRCR.
The clock rate can be calculated using this formula:
Clock rate = FI2CCLK / ( (BRCNT2 x 2) + Foncycle ) ) (standard mode)
Clock rate = FI2CCLK / ( (BRCNT2 x 3) + Foncycle ) ) (fast mode)
where:
FI2CCLK is the I²C reference clock frequency, clocked on the system clock divided by
three
BRCNT2 is a field of the I2C_BRCR register
Foncycle depends on a programmable field of the I2C_CR register:
I2C_CR: FON = “00” => Filter the clock spike wide = 0 => Foncycle = 1
I2C_CR: FON = “01” => Filter the clock spike wide = 1 => Foncycle = 3
I2C_CR: FON = “10” => Filter the clock spike wide = 2 => Foncycle = 4
I2C_CR: FON = “11” => Filter the clock spike wide = 4 => Foncycle = 6
Example: programming a clock rate
If the system clock is the RC80Mhz: FI2CCLK = 26.66 MHz and we need a 300 kHz I²C
clock rate without font cycle in fast mode.
According to the previous equation in fast mode: 0.300 = 26.66 / ((BRCNT2 x 3) + 1)
BRCNT2 = (26.66 – 0.3) / 0.9 = 29.2 = 0x1D
This equation provides a theoretical value. The baud rate actually generated on the master
clock line may differ due to the charge on the I2C bus or due to the bounding choice (open-
drain or push-pull I/Os).



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com