EasyManua.ls Logo

STMicroelectronics STM32F407 User Manual

STMicroelectronics STM32F407
1731 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #596 background image
General-purpose timers (TIM2 to TIM5) RM0090
596/1731 DocID018909 Rev 11
For example, to configure the upcounter to count each 2 rising edges on ETR, use the
following procedure:
1. As no filter is needed in this example, write ETF[3:0]=0000 in the TIMx_SMCR register.
2. Set the prescaler by writing ETPS[1:0]=01 in the TIMx_SMCR register
3. Select rising edge detection on the ETR pin by writing ETP=0 in the TIMx_SMCR
register
4. Enable external clock mode 2 by writing ECE=1 in the TIMx_SMCR register.
5. Enable the counter by writing CEN=1 in the TIMx_CR1 register.
The counter counts once each 2 ETR rising edges.
The delay between the rising edge on ETR and the actual clock of the counter is due to the
resynchronization circuit on the ETRP signal.
Figure 158. Control circuit in external clock mode 2
18.3.4 Capture/compare channels
Each Capture/Compare channel is built around a capture/compare register (including a
shadow register), a input stage for capture (with digital filter, multiplexing and prescaler) and
an output stage (with comparator and output control).
The following figure gives an overview of one Capture/Compare channel.
The input stage samples the corresponding TIx input to generate a filtered signal TIxF.
Then, an edge detector with polarity selection generates a signal (TIxFPx) which can be
used as trigger input by the slave mode controller or as the capture command. It is
prescaled before the capture register (ICxPS).
Counter clock = CK_CNT = CK_PSC
Counter register
35 3634
ETR
CNT_EN
CK_INT
ETRP
ETRF

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the STMicroelectronics STM32F407 and is the answer not in the manual?

STMicroelectronics STM32F407 Specifications

General IconGeneral
SeriesSTM32F4
CoreARM Cortex-M4
Max Clock Speed168 MHz
Flash MemoryUp to 1 MB
SRAMUp to 192 KB
ADC Resolution12-bit
DAC Channels2
DAC Resolution12-bit
I2CUp to 3
SPI3
Timers17
USBUSB
Communication InterfacesUSB, I2C, SPI
Operating Supply Voltage1.8 V to 3.6 V
Operating Temperature-40°C to +85°C
PackageLQFP100, LQFP64

Related product manuals