I've been working on a timer recently. When I read the instructions, it was like reading a book written in heaven. I didn't understand where the problem was. I didn't understand how many signals came from. So I took some time to sort it out.
I opened the overall block diagram in the STM32 data sheet. Damn, I was dazzled again.
First of all, we can see that this diagram has two parts, one is the clock source, and the other is the input and output.
The clock source counts to the CNT counter, and then records or compares according to the capture compare register. There are different configurations for recording or comparing.
First is the TI signal
TI1 TI2 TI3 TI4: This signal is an external signal, which is a signal directly connected to the pin. There is another problem in the diagram. TI1 can be triggered by an external signal of the first channel, or it can be set to trigger the first channel, the second channel, and the third channel XOR. The external signal is sent to the filter and edge detector. [page]
TIxFP triggers a valid signal.
TI1FP1 TI1FP2 TI2FP1 TI2FP2 TI3FP3 TI3FP4 TI4FP3 TI4FP4: This is a trigger valid signal. Since the signal directly connected to the pin can be set to high or low edge trigger, after setting, TIxFP is the mark corresponding to whether the signal is valid.
ICx mapping signal
IC1 IC2 IC3 IC4: channel valid signal, in front of it are TIxFP and TRC signals. It can be seen that TI1FP and TI2FP can correspond to IC1 and IC2, TI3FP and TI4FP can correspond to IC3 and IC4, so that one TIxFP signal can correspond to two ICx or two channels. In this way, PWM input can be realized, and one can calculate the period and the other can calculate the duty cycle. ICx signal is sent to the prescaler
Channel interrupt and DMA output signal
CC1I CC2I CC3I CC4I: After the ICx signal passes through the prescaler, it can be configured to generate interrupt or DMA output.
Prescaler counting signal
IC1PS IC2PS IC3PS IC4PS: After the ICx signal passes through the prescaler, it can enter the CCRx counting register. At this time, the CCR can be read in conjunction with the interrupt.
OC1REF output valid signal
OC1REF OC2REF OC3REF OC4REF: The first output signal when comparing output or PWM output. This signal can be turned into an
effective level output to the pin after configuring the high and low levels.
Comparison output PWM output level
OC1 OC1N OC2 OC2N OC3 OC3N OC4: Signal output to the pin
Brake input pin signal
BRK Brake input pin signal, after the pin is input, enters the polarity selection.
Brake signal
BI: Brake signal, after the polarity selection signal is ORed with the clock failure signal, the brake valid signal is obtained. To drive the brake.
Update time
u Update event signal, generated by software event register or counter overflow.
Event update interrupt
UI: event update interrupt signal
External ETR trigger pin signal
ETR: trigger timer dedicated trigger pin connected to external pin
ETR signal after edge pre-scaling
ETRP: ETR signal after edge pre-scaling
ETR valid signal after filtering
ETRF: ETRP valid signal after filtering, polarity, and edge
Internal trigger ITRx channel signal
ITR0 ITR1 ITR2 ITR3: The trigger can be generated by other internal timers, and the timer triggers of timer 1 and timer 8 are different. In the timer chapter table 74 in the data manual, it is reflected that
the ITR trigger signal
ITRx is set to generate a trigger signal. Enter the next link.
TI1 edge detector
TI1F_ED: TI1 edge detection signal, in Hall sensor mode, will detect the change of TI1, from the input is TI1F_ED. Whenever one of the three inputs changes, the counter starts counting from 0 again. This generates a time base triggered by any change in the Hall input.
TRC: The trigger signal issued after selecting the TI1 edge and internal trigger through the selector.
TRGI: Final trigger input.
TGI: Trigger input interrupt bit
TRGO: Trigger output. As the master mode to send out the trigger signal to control other timers, it should be connected to the ITRx of other timers.
Keywords:STM32
Reference address:About the timer signals in the STM32 data sheet
Previous article:About the concept of com events of STM32
Next article:Serial port pins in stm32
Recommended ReadingLatest update time:2024-11-16 14:56
STM32 records and plays infrared signals from air conditioner/TV remote control
Preparation: (1) Infrared receiver (2) IR transmitter (3) STM32 control board (4) Jumper cables (5) Air conditioner/TV remote control hardware 1. Module IR transmitter VCC, GND, DATA; IR receiver VCC, GND, DATA; software To verify that infrared recording is reliable, try recording a large sign
[Microcontroller]
Eight modes of operation of STM32 GPIO port
1. Input Mode 1. Floating input In floating input mode, the pull-up and pull-down switches are disconnected, and the high or low level reaches the input data register through the Schmitt trigger. The CPU can read the high and low level values of the external input by reading the input data register. 2. Input pull-
[Microcontroller]
Remote control timing switch device based on STM32 and GSM
At present, there are many time switch products on the domestic market, and they are widely used in home life, car service, public lighting and warehouse management. Most of them have only simple timing functions, and cannot realize advanced functions such as remote control and display. And a few remote-controlled
[Microcontroller]
STM32 system learning-TIM (basic timer)
1. Timer Classification In the STM32F1 series, in addition to the interconnected products, there are a total of 8 timers, which are divided into basic timers, general timers and advanced timers. The basic timers TIM6 and TIM7 are 16-bit timers that can only count up, can only be timed, and have no external IO. The
[Microcontroller]
Design of wireless communication module based on STM32 and SIM900A
In order to design a module that can realize SMS sending and receiving and wireless data transmission, this paper uses the mainstream product STM32 with ARM Cortex-M3 core as the main control chip and SIM900A of SIMCom as the communication chip. After consulting a large number of relevant literature and data manuals
[Microcontroller]
stm32 download method serial port ISP\swd
1. First look at the stm32 startup mode The boot mode of stm32 is determined by the boot0 and boot1 pins of the 32 chip. It is divided into embedded flash boot mode (normal boot mode), memory boot mode, and rom boot mode. The corresponding relationship between the boot mode and the high and low levels of the pins
[Microcontroller]
The difference between the regular channel and the injection channel of the STM32 ADC
Each ADC module of STM32 can switch to different input channels and perform conversions through the internal analog multiplexer. STM32 has specially added a variety of group conversion modes, which can be set by the program to automatically sample and convert multiple analog channels one by one. There are two ways t
[Microcontroller]
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- TecoCore Co., Ltd. is looking for SSD firmware development talents to join
- Some unclear points about self-oscillation
- Responsibility is heavier than Mount Tai! Talking about the safety requirements of China's high-speed rail signaling
- Write EEPROM, write FLASH experience record
- Commonly used algorithms for drones - Kalman filter (Part 9)
- Reset time problem
- Why does DLL not found error appear when running VB with Ginkgo?
- The problem of STM8L151k4t6 with programmed code being damaged by soldering?
- DSP28335 external interrupt configuration process
- Circuit PCB Design