an2824

所属分类:Windows编程
开发工具:C/C++
文件大小:1175KB
下载次数:27
上传日期:2009-05-08 09:20:45
上 传 者weijr
说明:  stm103-contexm3 内核编程:基于ST官方网站的IIC例程
(stm103-contexm3 core programming: ST based on the official website of the IIC routines)

文件列表:
STM32F10x_AN2824_FW_V3.0.0 (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3 (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\core_cm3.c (16249, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\core_cm3.h (42077, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\arm (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\arm\startup_stm32f10x_hd.s (15872, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\arm\startup_stm32f10x_ld.s (12236, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\arm\startup_stm32f10x_md.s (12564, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\gcc (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\gcc\startup_stm32f10x_hd.c (16437, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\gcc\startup_stm32f10x_ld.c (12790, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\gcc\startup_stm32f10x_md.c (13104, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\iar (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\iar\startup_stm32f10x_hd.s (16573, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\iar\startup_stm32f10x_ld.s (12001, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\startup\iar\startup_stm32f10x_md.s (12492, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\stm32f10x.h (530869, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\system_stm32f10x.c (24166, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\CM3\system_stm32f10x.h (2158, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\Documentation (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\CMSIS\Core\Documentation\CMSIS_Core.htm (50779, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc (0, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h (4951, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h (19558, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_bkp.h (7373, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h (14289, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_crc.h (1980, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dac.h (10271, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dbgmcu.h (2980, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dma.h (18790, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_exti.h (5833, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_flash.h (14446, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_fsmc.h (17276, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_gpio.h (15050, 2009-05-03)
STM32F10x_AN2824_FW_V3.0.0\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_i2c.h (16923, 2009-05-03)
... ...

/** @page DMAUseExample AN2824 DMAUseExample Readme File @verbatim ******************** (C) COPYRIGHT 2009 STMicroelectronics ******************* * @file DMAUseExample/readme.txt * @author MCD Application Team * @version V3.0.0 * @date 04/27/2009 * @brief Description of the ExampleDMA. ****************************************************************************** * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. ****************************************************************************** @endverbatim @par Description This example shows how to perform an I2C communication between three boards based on the STM32 with DMA is used for data transfer. Three STM32 EVAL Boards are operating as a Master, Slave1 and Slave2. The Slave1 sends to the Master ADC Channel 14 converted values (ADC CH14 is connected to the potentiometer). The Slave2 sends to the Master Temperature values (using the on chip Temperature Sensor). Both Slaves send data alternately (every 3ms approximately) (The Start condition is generated within a Timer interrupt generated every 3ms). @par Directory contents - inc: contains the header files - DMAUseExample/inc/driver.h Header for Driver.c - DMAUseExample/inc/main.h Header for main.c - DMAUseExample/inc/stm32f10x_conf.h Library Configuration files - DMAUseExample/inc/stm32f10x_it.h Interrupt handlers header files - src: contains the source files - DMAUseExample/src/stm32f10x_it.c Interrupt handlers - DMAUseExample/src/main.c Main program - DMAUseExample/src/driver.c Contains the I2C read and write routines and I2C DMA Channels configurations. @par Hardware and Software environment - This example runs on STM32F10x High-Density, STM32F10x Medium-Density and STM32F10x Low-Density Devices. - This example has been tested with STMicroelectronics STM3210B-EVAL and STM3210E-EVAL evaluations boards and can be easily tailored to any other supported device and development board. - Connect I2C1 SCL pin (PB.06) of the Master Board to I2C2 SCL pin (PB.10) of the Slave1 and Slave2 Boards. - Connect I2C1 SDA pin (PB.07) of the Master Board to I2C2 SDA pin (PB.11) of the Slave1 and Slave2 Boards. - Check that a pull-up resistor is connected on one I2C SDA pin - Check that a pull-up resistor is connected on one I2C SCL pin @par How to use it ? In order to make the program work, you must do the following: 1. Load the code compiled for master in the master Board 2. Load the code compiled for slave1 in the slave1 Board 3. Load the code compiled for slave2 in the slave2 Board 4. Run programs in slave1 and slave2 Boards 5. Run program in master Board In order to load the code, you have do the following: - EWARM: - Open the DMA_Use.eww workspace - In the workspace toolbar select the project config: - STM3210B-EVAL: to configure the project for STM32 Medium-density devices - Rebuild all files: Project->Rebuild all - Load project image: Project->Debug - Run program: Debug->Go(F5) - RIDE - Open the DMA_Use.rprj project - In the configuration toolbar(Project->properties) select the project config: - STM3210B-EVAL: to configure the project for STM32 Medium-density devices - Rebuild all files: Project->build project - Load project image: Debug->start(ctrl+D) - Run program: Debug->Run(ctrl+F9) - RVMDK - Open the DMA_Use.Uv2 project - In the build toolbar select the project config: - STM3210B-EVAL: to configure the project for STM32 Medium-density devices - Rebuild all files: Project->Rebuild all target files - Load project image: Debug->Start/Stop Debug Session - Run program: Debug->Run (F5) @note - Low-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. - Medium-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 32 and 128 Kbytes. - High-density devices are STM32F101xx and STM32F103xx microcontrollers where the Flash memory density ranges between 256 and 512 Kbytes. *

© COPYRIGHT 2009 STMicroelectronics

*/

近期下载者

相关文件


收藏者