Blame view

doc/I2C_Edge_Conditions 1.63 KB
6fcc18e0a   wdenk   Initial revision
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
  I2C Edge Conditions:
  ====================
  
      I2C devices may be left in a write state if a read was occuring
      and the CPU was reset. This may result in EEPROM data corruption.
  
      The edge condition is as follows:
  	1) A read operation begins.
  	2) I2C controller issues a start command.
  	3) The I2C writes the device address.
  	4) The CPU is reset at this point.
  
      Once the CPU reinitializes and the read is tried again:
  	1) The I2C controller issues a start command.
  	2) The I2C controller writes the device address.
  	3) The I2C controller writes the offset.
  
      The EEPROM sees:
  	1) START
  	2) device address
  	3) START "this start is ignored by most EEPROMs"
  	4) device address "EEPROM interprets this as offset"
  	5) Offset in device, "EEPROM interprets this as data to write"
  
      The device will interpret this sequence as a WRITE command and
      write rubbish into itself, i.e. the "offset" will be interpreted
      as data to be written in location "device address".
  
  Notes
  -----
0c8721a46   Wolfgang Denk   Cleanup (PPC4xx i...
31
  !!!THIS IS AN UNDOCUMENTED I2C BUS BUG, NOT A AMCC 4xx BUG!!!
6fcc18e0a   wdenk   Initial revision
32
33
  
  This reset edge condition could possibly be present in every I2C
3e38691e8   wdenk   * Patch by Arun D...
34
35
  controller and device available. For boards where a I2C bus reset
  function can be implemented a i2c_init_board() function should be
6d0f6bcf3   Jean-Christophe PLAGNIOL-VILLARD   rename CFG_ macro...
36
  provided and enabled by #define'ing CONFIG_SYS_I2C_INIT_BOARD in your
3e38691e8   wdenk   * Patch by Arun D...
37
38
39
  board's config file. Note that this is NOT necessary when using the
  bit-banging I2C driver (common/soft_i2c.c) as this already includes
  the I2C bus reset sequence.
6fcc18e0a   wdenk   Initial revision
40
41
42
43
44
45
  
  Many thanks to Bill Hunter for finding this serious BUG.
  email to: <williamhunter@attbi.com>
  
  Erik Theisen <etheisen@mindspring.com>
  Tue, 5 Mar 2002 23:02:19 -0500 (Wed 05:02 MET)