2024年1月1日发(作者:)

TBCTL—16位配置

第15、14位:FREE,SOFT

仿真模式位。这些位选择EPWM时基计数器在仿真过程中事件的行为:

00:停止之后的下一个时基计数器递增或递减

01:停止当计数器完成整个周期:

•计数模式:当停止时基计数器=的周期(TBCT= BPRD)

•向下计数模式:当停止时基计数器值= 0x0000(TBCTR=0X0000)

•向下计数模式:当停止时基计数器值= 0x0000(TBCTR=0X0000)

1X自由运行

Emulation Mode Bits. These bits select the behavior of the ePWM time-base counter during

emulation events:

00 :Stop after the next time-base counter increment or decrement

01: Stop when counter completes a whole cycle:

• Up-count mode:stop when the time-base counter=period(TBCT =BPRD)

• Down-count mode:stop when the time-base counter=0x0000(TBCTR =0x0000)

• Up-down-count mode:stop when the time-base counter=0x0000(TBCTR =0x0000)

1X Free run

第13位:PHSDIR

相位方向位。

此位时基计数器被配置在上下计数模式时使用。的PHSDIR位表示散打新阶段值相(TBPHS)寄存器加载异步事件发生后,时基计数器(TBCTR的)计数的方向。这是前同步事件计数器的方向无关..

在向上计数和向下计数模式中,该位被忽略。

0:同步事件后减计数。

1:同步事件后增计数

Phase Direction Bit.

This bit is only used when the time-base counter is configured in the up-down-count mode. The

PHSDIR bit indicates the direction the time-base counter(TBCTR) will count after asynchronization

event occur sanda new phase value is loaded from the phase(TBPHS) register. This is

irrespective of the direction of the counter before the synchronization event..

In the up-count and down-count modes this bit is ignored.

0: Count down after the synchronization event.

1: Count up after the synchronization event

第12,11,10位: CLKDIV

时基时钟分频器位

这些位确定时基时钟预分频值的一部分。

TBCLK=SYSCLKOUT/ (HSPCLKDIV×CLKDIV)

000 /1 (default onreset) 001 /2 010 /4 011 /8 100 /16 101 /32

110 /64 111 /128

Time-base Clock Prescaler Bits

These bits determine part of the time-base clock prescaler value.

第9,8,7位: HSPCLKDIV

高速时基时钟分频器位

这些位确定时基时钟预分频值的一部分。

TBCLK=SYSCLKOUT/ (HSPCLKDIV×CLKDIV)

这除数事件管理器上使用的TMS320x281x系统仿真HSPCLK

(EV)外设

000 /1

001 /2 (default onreset)

010 /4

011 /6

100 /8

101 /10

110 /12

111 /14

High Speed Time-base Clock Pres cale Bits

These bits determine part of the time-base clock prescale value.

This divisor emulates the HSPCLK in the TMS320x281x system as used on the Event Manager

(EV)peripheral

第6位: SWFSYNC

软件强制同步脉冲

0:写0没有任何作用,读取始终返回0。

1:一次性的同步脉冲,以产生记录A1力。

此事件是O红色与EPWMxSYNCI输入EPWM模块。

SWFSYNC是有效的(工作)只有当选择EPWMxSYNCI由SYNCOSEL= 00,。

Software Forced Synchronization Pulse

0:Writing a 0 has no effect and reads always return a 0.

1:Writing a1 forces a one-time synchronization pulse to be generated.

This event is O Red with the EPWMxSYNCI input of the ePWM module.

SWFSYNC is valid(operates) only when EPWMxSYNCI is selected by SYNCOSEL=00.

第5,4位: SYNCOSEL

同步输出选择。这些位选择的EPWMxSYNCO信号源。

00:EPWMxSYNC:

01:CTR=时基计数器等于零(TBCTR=0X0000)

10:CTR =CMPB:时基计数器等于比较B(TBCTR=CMPB)

11:禁用EPWMxSYNCO信号

Synchronization Out put Select. These bits select the source of the EPWMxSYNCO signal.

00 :EPWMxSYNC:

01: CTR=zero: Time-base counter equal to zero(TBCTR =0x0000)

10: CTR=CMPB: Time-base counter equal to counter-compareB(TBCTR =CMPB)

11: Disable EPWMxSYNCO signal

第3位: PRDLD

有效周期寄存器LOAD FROM影子寄存器选择

0周期寄存器加载(TBPRD)从它的影子寄存器当等于零时基,TBCTR时。

写或读TBPRD寄存器的访问影子寄存器。

1:加载TBPRD,立即注册,无需使用影子寄存器。

直接写或读TBPRD寄存器访问活动寄存器

Active Period Register Load From Shadow Register Select

0 :The period register (TBPRD) is loaded from its shadow register when the time-base counter,

TBCTR, is equal to zero.

A write or read to the TBPRD register accesses the shadow register.

1 :Load the TBPRD register immediately without using a shadow register.

A write or read to the TBPRD register directly accesses the active register

第2位: PHSEN

计数器寄存器LOAD FROM相位寄存器启用

0:不加载来自时基阶段寄存器(TBPHS的的)时基(TBCTR的)

1:载入时基计数器与相位寄存器出现一个EPWMxSYNCI输入信号时,或者当一个软件同步被迫由SWFSYNC位

Counter Register Load From Phase Register Enable

0:Do not load the time-base counter(TBCTR) from the time-base phase register (TBPHS)

1:Load the time-base counter with the phase register when an EPWMxSYNCI input signal occurs

or when a software synchronization is forced by the SWFSYNC bit

第1,0位: CTRMODE

计数器模式

时基计数器模式通常配置一次,并没有改变在正常运作。

如果你改变了计数器模式,改变将在下一个TBCLK边沿生效和

当前计数器值递增或递减从模式更改前的值。

这些位设置时基计数器的操作模式如下:

00:向上计数模式

01:向下计数模式

10:向上向下计数模式

11:停止冻结操作(默认onreset)

Counter Mode

The time-base counter mode is normally configured once and not changed during normal

operation.

If you change the mode of the counter, the change will take effect at the next TBCLK edge and the

current counter value shall increment or decrement from the value before the mode change.

These bits set the time-base counter mode of operation as follows:

00:Up-count mode

01:Down-count mode

10:Up-down-count mode

11:Stop-freeze counter operation(default onreset)