I was playing with the servo tonight and looked at the code of the example program. I wanted to change the channel to practice, so I wanted to change the channel of TIM1 from ch1 to ch2, so I changed PA8 to PA9 (it is on the data sheet), and changed TIM_OC1PreloadConfig to TIM_OC2PreloadConfig. I tried it but it didn’t work. Then I looked for where OC1 was not changed to OC2, and found that TIM_OC1Init was not changed, so I changed it to TIM_OC2Init. I tried it but it still didn’t work. I searched for a long time in pwm.c but couldn’t find it. I looked for the answer online and thought that ch2 was closed by default, but found that it was not. Later, I finally found that TIM_SetCompare1 in the main function was not changed to TIM_SetCompare2. This carelessness took me an hour to find the answer. . .
Previous article:How to disable STM32 TIM channels individually
Next article:stm32 PWM input capture input mode
Recommended ReadingLatest update time:2024-11-22 22:04
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
- Intelligent Control Technology of Permanent Magnet Synchronous Motor (Written by Wang Jun)
- usb_host_device_code
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- DM365 CMEM allocated memory
- How to distinguish between pads and vias_Differences between vias and pads
- Could you please tell me what circuit is generally used to implement the 0/4-20mA drive circuit?
- Application of FRAM in automobile driving recorder 2
- Principle and application of diaphragm pressure gauge
- Interpretation of Mobile DreamNet charges for SMS, MMS and mobile Internet access
- Application of SP2338 serial port expansion chip in automobile driving recorder
- This week's review information is here~
- [AT-START-F425 Review] No.1 Unboxing AT32F425
- Showing off your products (6) - silicon lab