国赛中文K60 FTM寄存器功能与配置.pdfVIP

  • 2
  • 0
  • 约2.15万字
  • 约 12页
  • 2025-10-13 发布于北京
  • 举报

6.3.2FTM相关寄存器

FTM寄存器非常多,我们这里只列举常用的8个。

1.状态和控制(FTMx_SC)

SC包含溢出状态标志和控制位,用来配置中断使能、FTM配置、时钟源和预分频因子。

这些控制和这个模块的所有通道相关。

表6-13FTMx_SC位域描述

位域描述

31-8这个只读位域被保留,值常为0。

保留

7定时器溢出标志位

TOF0FTM计数器不溢出

1FTM计数器溢出

6定时器溢出中断使能

TOIE0TOF中断。使用软件轮询

1使能TOF中断。当TOF等于1时产生中断

5对齐PWM选择位

CPWMS0FTM计数器向上计数

1FTM计数器向上向下计数

4-3时钟源选择

CLKS00没有选择任何时钟(实际上是FTM计数器)

01系统时钟

10固定频率时钟

11外部时钟

2-0预分频因子选择位

PS0001分频

0012分频

0104分频

0118分频

10016分频

10132分频

6.3.2FTMrelatedregisters

TherearemanyFTMregisters,soweonlylistthe8commonlyused

oneshere.

1.StatusandControl(FTMx_SC)

TheSCcontainsoverflowstatusflagsandcontrolbitstoconfigureinterruptenable,FTMconfiguration,clock

source,andprescalerfactors.Thesecontrolsarerelatedtoallchannelsofthismodule.

Table6-13FTMx_SCbitfield

description

BitDomainDescription

31-8Thisread-onlybitfieldisandthe

保留valueisalways0.

7Timeroverflowflagbit

TOF0FTMcounterdoesnotoverflow

1FTMcounteroverflow

6Timeroverflowinterruptenable

TOIE0DisableTOFinterruption.Usesoftwarepolling

1EnableTOFinterrupt.InterruptisgeneratedwhenTOFisequalto1

5CentrallyalignedPWMselectionbits

CPWMS0FTMcountercountsupward

1FTMcountercounts

文档评论(0)

1亿VIP精品文档

相关文档