Take the built-in stm32 CPU in Keil as an example, track and observe the PWM waveform, open the stm32 Dome in the directory C:KeilARMBoardsKeilMCBSTM32PWM_2, the first step: perform simulation configuration, as shown in the figure:
(Original file name: 1.jpg)
The 'PWM' project is a simple program for the STM32F103RBT6
using Keil 'MCBSTM32' Evaluation Board and demonstrating
the use of PWM (Pulse Width Modulation) with Timer TIM4 .
Example functionality:
- Clock Settings:
- XTAL = 8.00 MHz
- SYSCLK = 72.00 MHz
- HCLK = SYSCLK = 72.00 MHz
- PCLK1 = HCLK/2 = 36.00 MHz
- PCLK2 = HCLK = 72.00 MHz
- ADCLK = PCLK2/6 = 12.00 MHz
- SYSTICK = HCLK/8 = 9.00 MHz
- TIM4 is running at 100Hz.
LEDs PB8, PB9 are dimmed using the PWM function of TIM4 channel3, channel4
The Timer program is available in different targets:
Simulator: - configured for software Simulator
MCBSTM32: - runs from Internal Flash located on chip
(used for production or target debugging)
Second, select software simulation
(Original file name: 2.jpg)
(Original file name: 3.jpg)
(Original file name: 4.jpg)
(Original file name: 5.jpg)
(Original file name: 6.jpg)
Previous article:C language "right shift >> and left shift <<" in single chip microcomputer and CY
Next article:Solution to the problem that two PIT interrupts of the microcontroller cannot run at the same time
Recommended ReadingLatest update time:2024-11-15 14:27
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Single-chip microcomputer C language programming and simulation
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- [New ways to play with SAMR21] 14. LSM6DSO gyroscope sensor
- I want to use FPGA to make an SPI Slave. I have a few questions about the clock.
- [NXP Rapid IoT Review] + First Look at IOT Kit
- Overseas battery giants are rushing into the lithium iron phosphate battery field - what do you think?
- 【N32G457】High-end Rubik's Cube based on RT-Thread and N32G457
- Revealed! PPO, the "hard core" material in the 5G era
- [Atria AT32WB415 Series Bluetooth BLE 5.0 MCU Review] 1.0 Unboxing and evaluation and setting up the operating environment
- Briefly describe the application of embedded logic analyzer in FPGA testing.zip
- Share MSP430F5529 library functions
- One year after being sanctioned, the U.S. Department of Commerce suddenly allowed U.S. companies to work with Huawei to develop 5G network standards