In the process of learning STM32, we often encounter words such as "high level is effective" and "low level is effective". When we first see them, we often understand them literally, thinking that high level is effective means the effective level is high level, and low level is effective means the effective level is low level. In fact, this understanding is wrong. Let's take the output comparison channel in the STM32 timer as an example:
This picture is actually a process of generating a PWM wave. Those who don't know much about timers can refer to the relevant manual. Now let's look at the output mode controller labeled 1 in the figure. The mode here refers to the PWM mode, which means that the PWM mode can be selected by configuring the two bits OC1M of the register TIMx_CCMR1. However, regarding mode selection, there is such a sentence in the manual: When counting down, once TIMx_CNT>TIMx_CCR1, channel 1 is an invalid level (OC1REF=0), otherwise it is a valid level (OC1REF=1).
The red font tells us: when OCREF is an invalid level, it is a low level, and when OCREF is a valid level, it is a high level.
Let's look at label 2: Its function is to select the output polarity. If the CC1P bit of TIMx_CCER is 0, the high level is valid, otherwise the low level is valid. What does this high level valid mean? For the selector, the high level is valid. If OCREF is high, the gate of the selector will open, allowing the signal to enter and "activate" the selector. After that, the selector will generate a signal to activate the subsequent output enable circuit to drive OC1, so that it generates a valid level on OC1 (that is, a high level is generated on OC1).
Through the above analysis, we can find that high level valid means that if the signal is at a high level, it is valid for the corresponding controller and can activate the relevant functions of the controller.
Summarize a few key words: Effective level: high level
Invalid level: low level
High level is valid: high level can enable the corresponding function
Low level is effective: Low level can enable the corresponding function
Previous article:Solution to the problem that the STM32 I/O port cannot output high and low levels normally
Next article:STM32-External Interrupt Study Notes
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 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
- 【phyBOARD-i.MX 8M Plus Development Board】Part 2: Powering on the Development Board and Evaluating the Development Environment
- 22 Ways to Prevent EMI When Designing Power Supplies
- 【NXP Rapid IoT Review】Hello Touch
- RISC-V MCU Application Development Series Tutorial CH32V103
- Let's take a look
- Let’s talk about whether Huawei can survive in the end.
- Can the network cable be directly soldered to the PCB without a crystal plug or can the network cable be plugged into the circuit board with terminals?
- EEWORLD University Hall----30 Case Studies of MATLAB Intelligent Algorithms
- Flyback Power Supply Magnetic Core Calculation Method
- Is there any way to directly give the calculation equation and related solutions based on the electrical parameters of a given circuit and related components?