Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/I2C/EEPROM/readme.txt @ 0:c59513fd84fb
Initial commit of STM32 test code.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Mon, 03 Oct 2011 21:19:15 +1030 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c59513fd84fb |
---|---|
1 /** | |
2 @page I2C_EEPROM I2C and M24CXX EEPROM communication example | |
3 | |
4 @verbatim | |
5 ******************** (C) COPYRIGHT 2011 STMicroelectronics ******************* | |
6 * @file I2C/EEPROM/readme.txt | |
7 * @author MCD Application Team | |
8 * @version V3.5.0 | |
9 * @date 08-April-2011 | |
10 * @brief Description of the I2C and M24CXX EEPROM communication example. | |
11 ****************************************************************************** | |
12 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS | |
13 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE | |
14 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY | |
15 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING | |
16 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE | |
17 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. | |
18 ****************************************************************************** | |
19 @endverbatim | |
20 | |
21 @par Example Description | |
22 | |
23 This example provides a basic example of how to use the I2C firmware library and | |
24 an associate I2C EEPROM driver to communicate with an I2C EEPROM device (here the | |
25 example is interfacing with M24CXX EEPROMs where XX={01, 02, 04, 08, 16, 32, 64}. | |
26 | |
27 I2C peripheral is configured in Master transmitter during write operation and in | |
28 Master receiver during read operation from I2C EEPROM. | |
29 | |
30 The peripheral used is I2C1 but can be configured by modifying the defines values | |
31 in stm32_eval_i2c_ee.c file. The speed is set to 200kHz and can be configured to | |
32 other values by setting the define I2C_SPEED in stm32_eval_i2c_ee.h file. | |
33 All transfers are performed through DMA access (except for One Byte Receiving case) | |
34 which allows user application to perform parallel tasks while transfer to/from | |
35 EEPROM is ongoing. | |
36 | |
37 For M24C02 to M24C16 devices, one I2C EEPROM Block address where the program will | |
38 write the buffer have to be selected from the four address available and defined | |
39 in the stm32_eval_i2c_ee.h file. | |
40 | |
41 For M24C32 and M24C64 devices all the memory is accessible through the two-bytes | |
42 addressing mode and need to define block addresses. In this case, only the physical | |
43 address has to be defined (according to the address pins (E0,E1 and E2) connection). | |
44 This address is defined in stm32_eval_i2c_ee.c.h (default is 0xA0: E0, E1 and E2 | |
45 tied to ground). | |
46 The EEPROM addresses where the program start the write and the read operations | |
47 is defined in the main.c file. | |
48 | |
49 First, the content of Tx1_Buffer is written to the EEPROM_WriteAddress1 and the | |
50 written data are read. The written and the read buffers data are then compared. | |
51 Following the read operation, the program waits that the EEPROM reverts to its | |
52 Standby state. A second write operation is, then, performed and this time, Tx2_Buffer | |
53 is written to EEPROM_WriteAddress2, which represents the address just after the last | |
54 written one in the first write. After completion of the second write operation, the | |
55 written data are read. The contents of the written and the read buffers are compared. | |
56 | |
57 | |
58 @par Directory contents | |
59 | |
60 - I2C/EEPROM/stm32f10x_conf.h Library Configuration file | |
61 - I2C/EEPROM/stm32f10x_it.c Interrupt handlers | |
62 - I2C/EEPROM/stm32f10x_it.h Interrupt handlers header file | |
63 - I2C/EEPROM/main.c Main program | |
64 - I2C/EEPROM/system_stm32f10x.c STM32F10x system source file | |
65 | |
66 @par Hardware and Software environment | |
67 | |
68 - This example runs on STM32F10x Connectivity line, High-Density, High-Density | |
69 Value line, Medium-Density, XL-Density, Medium-Density Value line, Low-Density | |
70 and Low-Density Value line Devices. | |
71 | |
72 - This example has been tested with STM32100E-EVAL (STM32F10x High-Density Value | |
73 line) evaluation board (implemented EEPROM is M24C64) and STM3210C-EVAL | |
74 (STM32F10x Connectivity-Line) evaluation board (implemented EEPROM is M24C64) | |
75 with no additional hardware, and can be easily tailored to any other supported | |
76 device and development board. | |
77 | |
78 - STM32100E-EVAL Set-up | |
79 - Make sure the jumper JP14 "ROM_WP" is fitted on the board. | |
80 - No additional Hardware connections are needed. | |
81 | |
82 | |
83 - STM3210C-EVAL Set-up | |
84 - Make sure the Jumper JP17 "I2C_SCK" is fitted on the board. | |
85 - Make sure the jumper JP9 "ROM_WP" is fitted on the board. | |
86 - No additional Hardware connections are needed. | |
87 | |
88 @par How to use it ? | |
89 | |
90 In order to make the program work, you must do the following : | |
91 - Copy all source files from this example folder to the template folder under | |
92 Project\STM32F10x_StdPeriph_Template | |
93 - Open your preferred toolchain | |
94 - Rebuild all files and load your image into target memory | |
95 - Run the example | |
96 | |
97 @note | |
98 - Low-density Value line devices are STM32F100xx microcontrollers where the | |
99 Flash memory density ranges between 16 and 32 Kbytes. | |
100 - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx | |
101 microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. | |
102 - Medium-density Value line devices are STM32F100xx microcontrollers where | |
103 the Flash memory density ranges between 64 and 128 Kbytes. | |
104 - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx | |
105 microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes. | |
106 - High-density Value line devices are STM32F100xx microcontrollers where | |
107 the Flash memory density ranges between 256 and 512 Kbytes. | |
108 - High-density devices are STM32F101xx and STM32F103xx microcontrollers where | |
109 the Flash memory density ranges between 256 and 512 Kbytes. | |
110 - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where | |
111 the Flash memory density ranges between 512 and 1024 Kbytes. | |
112 - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers. | |
113 | |
114 * <h3><center>© COPYRIGHT 2011 STMicroelectronics</center></h3> | |
115 */ |