Mercurial > ~darius > hgwebdir.cgi > stm32temp
comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/TIM/ExtTrigger_Synchro/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_ExtTrigger_Synchro TIM External Trigger Synchro example | |
3 | |
4 @verbatim | |
5 ******************** (C) COPYRIGHT 2011 STMicroelectronics ******************* | |
6 * @file TIM/ExtTrigger_Synchro/readme.txt | |
7 * @author MCD Application Team | |
8 * @version V3.5.0 | |
9 * @date 08-April-2011 | |
10 * @brief Description of the TIM External Trigger Synchro 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 synchronize TIM peripherals in cascade mode with an | |
24 external trigger. | |
25 In this example three timers are used: | |
26 | |
27 1/TIM1 is configured as Master Timer: | |
28 - Toggle Mode is used | |
29 - The TIM1 Enable event is used as Trigger Output | |
30 | |
31 2/TIM1 is configured as Slave Timer for an external Trigger connected to TIM1 | |
32 TI2 pin (TIM1 CH2 configured as input pin): | |
33 - The TIM1 TI2FP2 is used as Trigger Input | |
34 - Rising edge is used to start and stop the TIM1: Gated Mode. | |
35 | |
36 3/TIM3 is slave for TIM1 and Master for TIM4, | |
37 - Toggle Mode is used | |
38 - The ITR1(TIM1) is used as input trigger | |
39 - Gated mode is used, so start and stop of slave counter | |
40 are controlled by the Master trigger output signal(TIM1 enable event). | |
41 - The TIM3 enable event is used as Trigger Output. | |
42 | |
43 4/TIM4 is slave for TIM3, | |
44 - Toggle Mode is used | |
45 - The ITR2(TIM3) is used as input trigger | |
46 - Gated mode is used, so start and stop of slave counter | |
47 are controlled by the Master trigger output signal(TIM3 enable event). | |
48 | |
49 * For Low-density, Medium-density, High-density and Connectivity line devices: | |
50 The TIMxCLK is fixed to 72 MHZ, the Prescaler is equal to 2 so the TIMx clock | |
51 counter is equal to 24 MHz. | |
52 The Three Timers are running at: | |
53 TIMx frequency = TIMx clock counter/ 2*(TIMx_Period + 1) = 162.1 KHz. | |
54 | |
55 * For Low-Density Value line, Medium-Density Value line and High-Density Value line devices: | |
56 The TIMxCLK is fixed to 24 MHz, the Prescaler is equal to 2 so the TIMx clock | |
57 counter is equal to 8 MHz. | |
58 TIMx frequency = TIMx clock counter/ 2*(TIMx_Period + 1) = 54 KHz. | |
59 | |
60 The starts and stops of the TIM1 counters are controlled by the external trigger. | |
61 The TIM3 starts and stops are controlled by the TIM1, and the TIM4 starts and | |
62 stops are controlled by the TIM3. | |
63 | |
64 @par Directory contents | |
65 | |
66 - TIM/ExtTrigger_Synchro/stm32f10x_conf.h Library Configuration file | |
67 - TIM/ExtTrigger_Synchro/stm32f10x_it.c Interrupt handlers | |
68 - TIM/ExtTrigger_Synchro/stm32f10x_it.h Interrupt handlers header file | |
69 - TIM/ExtTrigger_Synchro/main.c Main program | |
70 - TIM/ExtTrigger_Synchro/system_stm32f10x.c STM32F10x system source file | |
71 | |
72 @par Hardware and Software environment | |
73 | |
74 - This example runs on STM32F10x Connectivity line, High-Density, High-Density | |
75 Value line, Medium-Density, XL-Density, Medium-Density Value line, Low-Density | |
76 and Low-Density Value line Devices. | |
77 | |
78 - This example has been tested with STMicroelectronics STM32100E-EVAL (High-Density | |
79 Value line), STM32100B-EVAL (Medium-Density Value line), STM3210C-EVAL (Connectivity line), | |
80 STM3210E-EVAL (High-Density and XL-Density) and STM3210B-EVAL (Medium-Density) | |
81 evaluation boards and can be easily tailored to any other supported device | |
82 and development board. | |
83 | |
84 - STM32100B-EVAL Set-up | |
85 - Connect an external trigger, with a frequency <= xx KHz, to the TIM1 CH2 | |
86 pin (PA.09). In this example the frequency is equal to x KHz. | |
87 | |
88 - Connect the following pins to an oscilloscope to monitor the different waveforms: | |
89 - TIM1 CH1 (PA.08) | |
90 - TIM3 CH1 (PA.06) | |
91 - TIM4 CH1 (PB.06) | |
92 | |
93 - STM3210C-EVAL Set-up | |
94 - Connect an external trigger, with a frequency <= 40KHz, to the TIM1 CH2 | |
95 pin (PE.11). In this example the frequency is equal to 5 KHz. | |
96 | |
97 - Connect the following pins to an oscilloscope to monitor the different waveforms: | |
98 - TIM1 CH1 (PE.09) | |
99 - TIM3 CH1 (PC.06) | |
100 - TIM4 CH1 (PB.06) | |
101 | |
102 - STM3210E-EVAL, STM32100E-EVAL and STM3210B-EVAL Set-up | |
103 - Connect an external trigger, with a frequency <= 40KHz, to the TIM1 CH2 | |
104 pin (PA.09). In this example the frequency is equal to 5 KHz. | |
105 | |
106 - Connect the following pins to an oscilloscope to monitor the different waveforms: | |
107 - TIM1 CH1 (PA.08) | |
108 - TIM3 CH1 (PA.06) | |
109 - TIM4 CH1 (PB.06) | |
110 | |
111 @par How to use it ? | |
112 | |
113 In order to make the program work, you must do the following : | |
114 - Copy all source files from this example folder to the template folder under | |
115 Project\STM32F10x_StdPeriph_Template | |
116 - Open your preferred toolchain | |
117 - Rebuild all files and load your image into target memory | |
118 - Run the example | |
119 | |
120 @note | |
121 - Low-density Value line devices are STM32F100xx microcontrollers where the | |
122 Flash memory density ranges between 16 and 32 Kbytes. | |
123 - Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx | |
124 microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. | |
125 - Medium-density Value line devices are STM32F100xx microcontrollers where | |
126 the Flash memory density ranges between 64 and 128 Kbytes. | |
127 - Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx | |
128 microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes. | |
129 - High-density Value line devices are STM32F100xx microcontrollers where | |
130 the Flash memory density ranges between 256 and 512 Kbytes. | |
131 - High-density devices are STM32F101xx and STM32F103xx microcontrollers where | |
132 the Flash memory density ranges between 256 and 512 Kbytes. | |
133 - XL-density devices are STM32F101xx and STM32F103xx microcontrollers where | |
134 the Flash memory density ranges between 512 and 1024 Kbytes. | |
135 - Connectivity line devices are STM32F105xx and STM32F107xx microcontrollers. | |
136 | |
137 * <h3><center>© COPYRIGHT 2011 STMicroelectronics</center></h3> | |
138 */ |