ARM7PWM arm7和stm32

PWM--PulseWidth Modulator
The PWM is based onthe standard Timer block and inheritsall of its features, although only the PWM function ispinned out on the LPC2131/32/34/36/38.【脉宽调制器基于标准的定时器模块并具有其所有特性。】
The Timer is designed to count cycles ofthe peripheral clock(PCLK)【外设时钟】and optionallygenerate interrupts or perform other actionswhen specified timer values occur, based on sevenmatch registers.【定时器对外设始终进行计数,可选择产生中断 或者基于7个寄存器,在到达指定的定时值时,执行其他动作(高/低/翻转/无动作)】
The PWM function is also based onmatch register events【匹配寄存器事件】.

The ability to separately control risingand falling edge locations allow the PWM to be used for moreapplications. For instance, multi-phase【多相位】 motor control typically requires three non-overlapping【无重叠的】 PWM outputs with individual control of all threepulse widths and positions.【而这3个输出的脉宽和位置需要独立进行控制】
Two matchregisters can be used to provide a single edge controlledPWM output.One match register(MR0) controls the PWM cycle rate【PWM周期率】, by resetting the countupon match.The other matchregister(MR1~MR6)controls the PWM edgeposition.
Additional single edge controlled PWMoutputs require only one match register each, since the repetition 【重复】 rate is the samefor all PWM outputs. Multiple single edge controlled PWM outputswill all have a rising edge at the beginning of each PWM cycle,whenan MR0 match occurs.
Three match registers can be used toprovide a PWM output with both edgescontrolled.【3个匹配寄存器共同控制一个 双边沿PWM输出】Again, the MR0 matchregister controls the PWM cycle rate. Theother match registers control the two PWM edge position.Additional double edge controlled PWM outputs require only twomatch register each, since the repetition rate is the same for allPWM outputs.
With double edge controlled PWM outputs,specific match registers control the rising and falling edge ofoutput. This allows both positive going PWMpulses【正脉冲】(when the rising edgeoccurs prior to the falling edge),and negativegoing PWM pulses【负脉冲】(when the falling edge occurs prior to the risingedge).
May be used as a standardtimer if the PWM mode is not enabled.
寄存器

PWMIR--中断寄存器包含11个位,其中7个位用于匹配中断,4个位保留。如果有中断产生,PWMIR对应位置位。向对应位的IR写入1,会置位中断,写入0,无效。位:10 98 76 54 32 10PWMMR6中断 54 保留 3 21PWMMR0中断

PWMTCR--定时器控制寄存器control the operation of the PWM Timercounter.【控制PWM定时器计数器的操作】位:3 2 1 0PWM使能 保留 计数器复位 计数器使能|只有在PWMLER中的 |为1时,PWMTC和 |为1时,PWMTC和|相应位置位后 |PWMPC在pclk的 |PWMPC使能计数|发生的匹配0事件, |下一个上升沿 |C为0时,|才会使程序写入 |同步复位。该位为 |计数器被禁止|匹配寄存器的值生效。 |0之前,保持复位状态 |
ARM7PWM arm7和stm32

PWMTC--定时器计数器PWM Timer Counter is incremented whenthe PC reaches its terminal count.
Unless it is reset before reaching itsupper limit, the PWMTC will count up through the value 0xFFFF,FFFFand then warp back to the value 0x0000,0000.
This event does not cause an interrupt,but a match register can be used to detect an overflow ifneeded.

PWMPR--预分频寄存器specifies the maximum value for thePWMPC.

PWMPC--预分频计数器PC每个周期+1,其值达到PWMPR中的值时,PWMPC+1,on thenext pclk->reset PWMPC

PWMMR0~PWMMR6--匹配寄存器continuously compared to th PWMTC value.TC一直增加,当两个值相等时,触发动作(产生中断、复位计数器、停止定时器),具体执行什么动作由PWMMCR控制。

PWMMCR--匹配控制寄存器控制在发生匹配时所执行的操作。位: 20:18 17:15 14:12 11:9 8:6 5:3 2:0对应于:PWMMR6 PWMMR5PWMMR4PWMMR3PWMMR2PWMMR1PWMMR0 | | 位14 13 12 值 1 1 1PWMMR4与 |停止 |复位 |产生PWMTC值匹配|PWMTC和 |PWMTC |中断 |PWMPC, | |PWMTCR[0] |复位为0

PWMPCR--控制寄存器enable and select the type of each PWMchannel
位:15 14 13 12 11 109 8 7 6 5 4 32 10保留PWMENA6 5 43 21 保留 PWMSEL6 5 43 2 保留 0 禁止输出 1双边沿控制模式 1 使能输出 0单边沿控制模式
PWMLER--锁存使能寄存器control the update of the PWMMR0~PWMMR6when they are used for PWM gegeration.位:7 6 5 4 3 21 保留 PWMMR6锁存 5 4 3 21
Rules for Single Edge Controlled PWMOutputs1.All single edgecontrolled PWM outputs go high at the beginning of a PWM cycleunless their match value is equal to0.2.Each PWM output will go lowwhen its match value is reached.if no match occurs(i.e. the matchvalue is greater than the PWM rate),the PWM output remainscontinuously high.单边沿控制的 PWM 输出规则⑴所有但边沿控制的 PWM 输出在 PWM周期开始时都为高电平,除非它们的匹配值等于0.每个PWM输出在到达其匹配值时都会变为低电平。如果没有发生匹配,PWM将一直保持高电平。

  

爱华网本文地址 » http://www.aihuau.com/a/25101014/190182.html

更多阅读

婚前检查项目和注意事项 精 胃镜检查前注意事项

婚前检查项目和注意事项 精——简介婚前检查是结婚前进行的体检项目,能提高人口素质、降低出生缺陷、预防先天疾病,也是夫妻彼此的一项权利,虽然新婚姻法去除了强制婚检的要求,但为了夫妻彼此的健康以及孩子的健康,应该主动进行婚检。婚

如何查询快递单号和派件员电话号码? 中通快递单号查询号码

如何查询快递单号和派件员电话号码?——简介现在电商社会,在淘宝上购买了东西,卖家已经发货也有了单号,看着旺旺上的跟踪记录就快派送到自己的手上了,但迟迟没有派送!我们该如何让快递早派送?例如:现在我们在淘宝得知有了自己的申通快递单

关于饮水:1 喝水方法和每天喝多少水合适

关于饮水:[1]喝水方法和每天喝多少水合适——简介水是生命之源,我们每天都在喝水,但是你真的知道该怎么喝水吗?每天喝多少水合适吗?今天,就来介绍一下。关于饮水:[1]喝水方法和每天喝多少水合适——方法/步骤1关于饮水:[1]喝水方法和每天喝

红米1S电信版和移动版和联通版的区别 红米1s移动版破解联通

红米1S电信版和移动版和联通版的区别——简介 直到今天,发烧级平民手机红米手机各种移动运营商制式总算全部发布起了!这也给不是IT行业的朋友选购带来了纠结,哪一版本适合自己呢?各个版本有什么全部呢?今天小编为你一一解析!希望能给你提

声明:《ARM7PWM arm7和stm32》为网友一起长大的约定分享!如侵犯到您的合法权益请联系我们删除