当前位置:网站首页>Stm32 cubemx hal----- PWM - change frequency
Stm32 cubemx hal----- PWM - change frequency
2022-07-27 04:53:00 【W001123456789】
LED1–3
Key1–5
Output PWM Waveform time , Use 2 Patterns :
sConfigOC.OCMode = TIM_OCMODE_PWM1;
sConfigOC.OCMode = TIM_OCMODE_TOGGLE;
They correspond to cubeMX in
The following changes are made in the program CCRx:
__HAL_TIM_SET_COMPARE(&htim5,TIM_CHANNEL_1,(uint16_t)CCRTemp);
__HAL_TIM_SET_COMPARE(&htim5,TIM_CHANNEL_2,(uint16_t)CCRTemp);
Through the actual output waveform, you can see :
1. change CCRx after , The frequency of both modes will not change , The frequency depends on PSC, ARR, And CCRx irrelevant ;
2. change CCRx Yes TIM_OCMODE_TOGGLE No influence , Its frequency remains unchanged , The duty cycle is always 50%
3. change CCRx Yes TIM_OCMODE_PWM1 Had an impact , Its frequency remains unchanged , The duty cycle changes .
边栏推荐
- Comprehensive experiment of static routing
- e. The difference between target and e.currenttarget
- Is the e-commerce billing system important? How should the platform choose billing service providers?
- BSN IPFs (interstellar file system) private network introduction, functions, architecture and characteristics, access instructions
- Post analysis of Data Analyst
- 【AtCoder Beginner Contest 260 (A·B·C)】
- Do you know about wechat merchant billing?
- CDH集群集成外部Flink(改进版-与时俱进)
- QString转换char*
- 2022杭电多校联赛第三场 题解
猜你喜欢

VSCode开启Pull Request更新代码分支可视化新篇章
![[construction of independent stations] this website is the first choice for cross-border e-commerce companies to open online stores at sea!](/img/26/22597a7ece0431a4e54703945a775c.jpg)
[construction of independent stations] this website is the first choice for cross-border e-commerce companies to open online stores at sea!

Chapter 4 scope and life cycle of bean object

TCP's three handshakes and four waves

Comprehensive experiment of static routing

STL 上头系列——list 容器详解

【C语言】自定义类型详解(结构体+枚举+联合)

Huawei's entry into the commercial market: due to the trend, there are many challenges

Vscode opens a new chapter in the visualization of pull request update code branches

JS第二天(变量、变量的使用、命名规则、语法扩展)
随机推荐
Explain left value, right value, left value reference and right value reference in detail
e. The difference between target and e.currenttarget
Structural mode - decorator mode
Shift right of negative numbers
缓存读写策略:CacheAside、Read/WriteThrough及WriteBack策略
Head detached from origin/... Causes push failure
Database leader Wang Shan: strive for innovation and carefully Polish high-quality database products
【C语言】动态内存管理
ELS compatibility DC, transfer pictures to window
IIC 通信协议 (一)
Do you know about wechat merchant billing?
Two way republication experiment
The data in echart histogram is displayed at the top of the chart
冒泡排序(详细)
Wechat applet editor Avatar
在有序数组找具体某个数字
RSA asymmetric encryption and decryption signature verification tool
哈希表刷题(下)
Yolov4网络详解
Technology sharing | gtid that needs to be configured carefully_ mode