pinlvji

所属分类:处理器开发
开发工具:Others
文件大小:4084KB
下载次数:228
上传日期:2012-06-05 15:38:28
上 传 者cherry ting
说明:  基于STM32的频率计代码 可测出方波的频率
(Based on the STM32 cymometer code can be detected in the square wave frequency)

文件列表:
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\core_cm3.c (16249, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\core_cm3.h (42077, 2011-11-24)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\startup\arm\startup_stm32f10x_hd.s (11310, 2011-10-24)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\startup\gcc\startup_stm32f10x_hd.c (16437, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\startup\gcc\startup_stm32f10x_ld.c (12790, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\startup\gcc\startup_stm32f10x_md.c (13104, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\startup\iar\startup_stm32f10x_hd.s (16573, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\startup\iar\startup_stm32f10x_ld.s (12001, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\startup\iar\startup_stm32f10x_md.s (12492, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\stm32f10x.h (530869, 2012-02-08)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\system_stm32f10x.c (24166, 2012-02-10)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\CM3\system_stm32f10x.h (2158, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\CMSIS\Core\Documentation\CMSIS_Core.htm (50779, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\misc.h (10076, 2012-02-26)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h (19558, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_bkp.h (7373, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_can.h (14289, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_crc.h (1980, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dac.h (10271, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dbgmcu.h (2980, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dma.h (18790, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_exti.h (5833, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_flash.h (14446, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_fsmc.h (17276, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_gpio.h (15050, 2011-11-22)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_i2c.h (16923, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_iwdg.h (3677, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_pwr.h (4201, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h (16258, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rtc.h (3659, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_sdio.h (18598, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_spi.h (14896, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h (48768, 2011-11-12)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h (14483, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_wwdg.h (2785, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\src\misc.c (6874, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_adc.c (46634, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_bkp.c (8248, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_can.c (30960, 2009-04-06)
实验五 频率测量 无显示\实验五 频率测量 无显示\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_crc.c (3340, 2009-04-06)
... ...

/** @page TIM_6Steps TIM_6Steps @verbatim ******************** (C) COPYRIGHT 2009 STMicroelectronics ******************* * @file TIM/6Steps/readme.txt * @author MCD Application Team * @version V3.0.0 * @date 04/06/2009 * @brief Description of the TIM 6Steps example. ****************************************************************************** * 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 Example Description This example shows how to configure the TIM1 peripheral to generate 6 Steps. The STM32F10x TIM1 peripheral offers the possibility to program in advance the configuration for the next TIM1 outputs behaviour (step) and change the configuration of all the channels at the same time. This operation is possible when the COM (commutation) event is used. The COM event can be generated by software by setting the COM bit in the TIM1_EGR register or by hardware (on TRC rising edge). In this example, a software COM event is generated each 100 ms: using the SysTick interrupt. The TIM1 is configured in Timing Mode, each time a COM event occurs, a new TIM1 configuration will be set in advance. The break Polarity is used at High level. The following Table describes the TIM1 Channels states: @verbatim ----------------------------------------------- | Step1 | Step2 | Step3 | Step4 | Step5 | Step6 | ---------------------------------------------------------- |Channel1 | 1 | 0 | 0 | 0 | 0 | 1 | ---------------------------------------------------------- |Channel1N | 0 | 0 | 1 | 1 | 0 | 0 | ---------------------------------------------------------- |Channel2 | 0 | 0 | 0 | 1 | 1 | 0 | ---------------------------------------------------------- |Channel2N | 1 | 1 | 0 | 0 | 0 | 0 | ---------------------------------------------------------- |Channel3 | 0 | 1 | 1 | 0 | 0 | 0 | ---------------------------------------------------------- |Channel3N | 0 | 0 | 0 | 0 | 1 | 1 | ---------------------------------------------------------- @endverbatim @par Directory contents - TIM/6Steps/stm32f10x_conf.h Library Configuration file - TIM/6Steps/stm32f10x_it.c Interrupt handlers - TIM/6Steps/stm32f10x_it.h Interrupt handlers header file - TIM/6Steps/main.c Main program @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 STM3210E-EVAL (STM32F10x High-Density) and STM3210B-EVAL (STM32F10x Medium-Density) evaluation boards and can be easily tailored to any other supported device and development board. - STM3210E-EVAL and STM3210B-EVAL Set-up - Connect the TIM1 pins to an oscilloscope to monitor the different waveforms: - TIM1_CH3 pin (PA.10) - TIM1_CH1N pin (PB.13) - TIM1_CH2 pin (PA.09) - TIM1_CH3N pin (PB.15) - TIM1_CH1 pin (PA.08) - TIM1_CH2N pin (PB.14) - Connect the TIM1 break pin TIM1_BKIN pin (PB.12) to the GND. To generate a break event, switch this pin level from 0V to 3.3V. @par How to use it ? In order to make the program work, you must do the following: - Create a project and setup all project configuration - Add the required Library files: - stm32f10x_gpio.c - stm32f10x_rcc.c - stm32f10x_tim.c - misc.c - system_stm32f10x.c - Edit stm32f10x.h file to select the device you are working on. @b Tip: You can tailor the provided project template to run this example, for more details please refer to "stm32f10x_stdperiph_lib_um.chm" user manual; select "Peripheral Examples" then follow the instructions provided in "How to proceed" section. - Link all compiled files and load your image into target memory - Run the example @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

*/

近期下载者

相关文件


收藏者