Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/TIM/OnePulse/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 TIM_OnePulse TIM One Pulse example | |
3 | |
4 @verbatim | |
5 ******************** (C) COPYRIGHT 2011 STMicroelectronics ******************* | |
6 * @file TIM/OnePulse/readme.txt | |
7 * @author MCD Application Team | |
8 * @version V3.5.0 | |
9 * @date 08-April-2011 | |
10 * @brief Description of the TIM One Pulse 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 shows how to use the TIM peripheral to generate a One pulse Mode | |
24 after a Rising edge of an external signal is received in Timer Input pin. | |
25 | |
26 TIM2CLK = SystemCoreClock, we want to get TIM2 counter clock at 24 MHz: | |
27 - Prescaler = (TIM2CLK / TIM2 counter clock) - 1 | |
28 SystemCoreClock is set to 72 MHz for Low-density, Medium-density, High-density | |
29 and Connectivity line devices and to 24 MHz for Low-Density Value line, | |
30 Medium-Density Value line and High-Density devices. | |
31 | |
32 The Autoreload value is 65535 (TIM4->ARR), so the maximum frequency value to | |
33 trigger the TIM4 input is 24000000/65535 = 300 Hz. | |
34 | |
35 The TIM4 is configured as follows: | |
36 The One Pulse mode is used, the external signal is connected to TIM4 CH2 pin (PB.07), | |
37 the rising edge is used as active edge, the One Pulse signal is output | |
38 on TIM4_CH1 (PB.06). | |
39 | |
40 The TIM_Pulse defines the delay value, the delay value is fixed to: | |
41 delay = CCR1/TIM4 counter clock = 16383 / 24000000 = 682.6 us. | |
42 The (TIM_Period - TIM_Pulse) defines the One Pulse value, the pulse value is fixed to: | |
43 One Pulse value = (TIM_Period - TIM_Pulse)/TIM4 counter clock | |
44 = (65535 - 16383) / 24000000 = 2.048 ms. | |
45 | |
46 @par Directory contents | |
47 | |
48 - TIM/OnePulse/stm32f10x_conf.h Library Configuration file | |
49 - TIM/OnePulse/stm32f10x_it.c Interrupt handlers | |
50 - TIM/OnePulse/stm32f10x_it.h Interrupt handlers header file | |
51 - TIM/OnePulse/main.c Main program | |
52 - TIM/OnePulse/system_stm32f10x.c STM32F10x system source file | |
53 | |
54 @par Hardware and Software environment | |
55 | |
56 - This example runs on STM32F10x Connectivity line, High-Density, High-Density | |
57 Value line, Medium-Density, XL-Density, Medium-Density Value line, Low-Density | |
58 and Low-Density Value line Devices. | |
59 | |
60 - This example has been tested with STMicroelectronics STM32100E-EVAL (High-Density | |
61 Value line), STM32100B-EVAL (Medium-Density Value line), STM3210C-EVAL (Connectivity line), | |
62 STM3210E-EVAL (High-Density and XL-Density) and STM3210B-EVAL (Medium-Density) | |
63 evaluation boards and can be easily tailored to any other supported device | |
64 and development board. | |
65 | |
66 - STM32100B-EVAL, STM3210E-EVAL, STM3210B-EVAL, STM32100E-EVAL and STM3210C-EVAL Set-up | |
67 - Connect the external signal to the TIM4_CH2 pin (PB.07) | |
68 - Connect the TIM4_CH1 (PB.06) pin to an oscilloscope to monitor the waveform. | |
69 | |
70 @par How to use it ? | |
71 | |
72 In order to make the program work, you must do the following : | |
73 - Copy all source files from this example folder to the template folder under | |
74 Project\STM32F10x_StdPeriph_Template | |
75 - Open your preferred toolchain | |
76 - Rebuild all files and load your image into target memory | |
77 - Run the example | |
78 | |
79 @note | |
80 - Low-density Value line devices are STM32F100xx microcontrollers where the | |
81 Flash memory density ranges between 16 and 32 Kbytes. | |
82 - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx | |
83 microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. | |
84 - Medium-density Value line devices are STM32F100xx microcontrollers where | |
85 the Flash memory density ranges between 64 and 128 Kbytes. | |
86 - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx | |
87 microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes. | |
88 - High-density Value line devices are STM32F100xx microcontrollers where | |
89 the Flash memory density ranges between 256 and 512 Kbytes. | |
90 - High-density devices are STM32F101xx and STM32F103xx microcontrollers where | |
91 the Flash memory density ranges between 256 and 512 Kbytes. | |
92 - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where | |
93 the Flash memory density ranges between 512 and 1024 Kbytes. | |
94 - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers. | |
95 | |
96 * <h3><center>© COPYRIGHT 2011 STMicroelectronics</center></h3> | |
97 */ |