TMC262硬件寄存器手册中文剖析.docx

上传人:b****6 文档编号:5074509 上传时间:2022-12-13 格式:DOCX 页数:28 大小:639.63KB
下载 相关 举报
TMC262硬件寄存器手册中文剖析.docx_第1页
第1页 / 共28页
TMC262硬件寄存器手册中文剖析.docx_第2页
第2页 / 共28页
TMC262硬件寄存器手册中文剖析.docx_第3页
第3页 / 共28页
TMC262硬件寄存器手册中文剖析.docx_第4页
第4页 / 共28页
TMC262硬件寄存器手册中文剖析.docx_第5页
第5页 / 共28页
点击查看更多>>
下载资源
资源描述

TMC262硬件寄存器手册中文剖析.docx

《TMC262硬件寄存器手册中文剖析.docx》由会员分享,可在线阅读,更多相关《TMC262硬件寄存器手册中文剖析.docx(28页珍藏版)》请在冰豆网上搜索。

TMC262硬件寄存器手册中文剖析.docx

TMC262硬件寄存器手册中文剖析

TMC262寄存器手册(中文)

关于TMC262全部写配置寄存器的一览表如表一所示:

具体的包含5个寄存器:

驱动控制寄存器(DRVCTRL)、斩波器控制寄存器(CHOPCONF)、智能控制寄存器(AMARTEN,也为COOLSETP)、负载监控控制寄存器(SGCSCONF)、控制配置寄存器(DRVCONF)。

表一

1、DriverControlRegister(DRVCTRL)驱动控制寄存器

它这里主要分为2种模式SETP/DIR模式与SPI模式,而这2中模式的选择取决于:

控制配置寄存器中的:

SDOFFmodebit。

DRVCTRL

DriverControlinSTEP/DIRMode(SDOFF=0)

名字

功能

注释(Write000X)

19

0

Registeraddressbit

18

0

Registeraddressbit

17

0

保留

16

0

保留

15

0

保留

14

0

保留

13

0

保留

12

0

保留

11

0

保留

10

0

保留

9

INTPOL

EnableSTEP

interpolation

0:

DisableSTEPpulseinterpolation.

1:

EnableSTEPpulsemultiplicationby16.

STEP信号修改的使能

0:

禁止对STEP脉冲信号的插补

1:

允许,为16clock模式

8

DEDGE

Enabledoubleedge

STEPpulses

0:

RisingSTEPpulseedgeisactive,fallingedgeisinactive.

1:

BothrisingandfallingSTEPpulseedgesareactive.

对于STEP信号脉冲沿方式的选择

0:

STEP信号为上升沿有效,下降沿无效。

1:

STEP信号为双沿有效(上升沿、下降沿都有效)

7

0

保留

6

0

保留

5

0

保留

4

0

保留

3

MRES3

MicrostepresolutionforSTEP/DIRmode

//微步距进度配置

Microstepsper90°:

%0000:

256

%0001:

128

%0010:

64

%0011:

32

%0100:

16

%0101:

8

%0110:

4

%0111:

2(halfstep)

%1000:

1(fullstep)

2

MRES2

1

MRES1

0000~1000一共9种方式:

256,128,

64,32,16,8,4,2,1

0

MRES0

2、ChopperControlRegister(CHOPCONF)斩波控制寄存器

CHOPCONF

ChopperConfiguration

名字

功能

注释(Write100X)

19

1

Registeraddressbit

18

0

Registeraddressbit

17

0

Registeraddressbit

16

TBL1

Blankingtime

//斩波的空白时间(也就是关断时间)

此时间需要安全的覆盖切换事件与持续的时间去响应检测电阻

Blankingtimeinterval,insystemclock

periods:

%00:

16

%01:

24

%10:

36

%11:

54

15

TBL0

设置斩波控制的空白时间00--11,对应16--54个时钟周期。

14

CHM

Choppermode

//

斩波模式的选择

Thismodebitaffectstheinterpretationof

theHDEC,HEND,andHSTRTparametersshownbelow.

0:

Standardmode(spreadCycle)

1:

ConstanttOFFwithfastdecaytime.

Fastdecaytimeisalsoterminatedwhenthenegativenominalcurrentisreached.Fast

decayisafterontime.

此位对:

HDEC,HEND,HSTRT参数的设置有影响。

0:

斩波模式,1:

常系数模式,一般选择0。

13

RNDTF

RandomTOFFtime

Enablerandomizingtheslowdecayphaseduration:

0:

ChopperofftimeisfixedassetbybitstOFF

1:

Randommode,tOFFisrandommodulatedbydNCLK=-12…+3clocks.

随机TOFF时间。

0:

斩波时间固定

1:

斩波时间可调

12

HDEC1

HysteresisdecrementintervalorFastdecaymode

//磁滞损耗和快速衰减模式

(CHM=0:

Hysteresisdecrementperiod

setting,insystemclockperiods:

%00:

16

%01:

32

%10:

48

%11:

64)

(CHM=1:

HDEC1=0:

currentcomparatorcanterminatethefastdecayphasebeforetimerexpires.

HDEC1=1:

onlythetimerterminatesthe

fastdecayphase.

HDEC0:

MSBoffastdecaytimesetting.)

11

HDEC0

CHM=0:

磁滞衰减周期设置:

00:

11:

16,32,48,64

CHM=1常系数模式设置:

HDEC1=1禁止电流比较器作为快衰减的终止

HDEC0:

快衰减的时间最高位设置

10

HEND3

Hysteresisend(low)valueorSinewaveoffset

//

迟滞低位值或者正弦波偏置

CHM=0:

%0000…%1111:

Hysteresisis-3,-2,-1,0,1,…,12(1/512ofthissettingaddstocurrentsetting)Thisisthehysteresisvaluewhichbecomesusedforthehysteresischopper.

CHM=1:

%0000…%1111:

Offsetis-3,-2,-1,0,1,…,12,Thisisthe

sinewaveoffsetand1/512ofthevalue

becomesaddedtotheabsolutevalueof

eachsinewaveentry.

9

HEND2

8

HEND1

0000:

1111:

迟滞为-3,-2……12,

当CHM=1时,这个表示正弦波偏置

7

HEND0

6

HSTRT2

Hysteresisstartvalue

or

Fastdecaytime

Setting

//

迟滞开始值或快衰时间设置

CHM=0:

HysteresisstartoffsetfromHEND:

%000:

1%100:

5

%001:

2%101:

6

%010:

3%110:

7

%011:

4%111:

8

Effective:

HEND+HSTRTmustbe≤15

CHM=1:

Threeleast-significantbitsofthe

durationofthefastdecayphase.TheMSBis

HDEC0.Fastdecaytimeisamultipleofsystemclock

periods:

NCLK=32x(HDEC0+HSTRT)

5

HSTRT1

4

HSTRT0

CHM=0:

DAC迟滞设置000……011:

对应的HEND增加5,6……8且HEND+HSTRTmustbe≤15才有效。

CHM=1:

快衰时间设置。

NCLK=32x(HDEC0+HSTRT)

3

TOFF3

Offtime/MOSFET

disable//offtime驱动使能(斩波慢衰减时间,影响开关频率)控制着慢衰减时间的持续时间,并控制着斩波的最大频率

Durationofslowdecayphase.IfTOFFis0,theMOSFETsareshutoff.IfTOFFis

nonzero,slowdecaytimeisamultipleofsystemclockperiods:

NCLK=12+(32xTOFF)(Minimumtimeis64clocks.)

%0000:

Driverdisable,allbridgesoff

%0001:

1(usewithTBLofminimum24clocks)

%0010…%1111:

2…15

2

TOFF2

1

TOFF1

0000:

禁止所有驱动器晶体管,电机可以自由转

0001:

TBL最小24个时钟周期

0010……1111:

2~15

0

TOFF0

 

3、coolStepControlRegister(SMARTEN)智能控制寄存器

SMARTEN

ChopperConfiguration

名字

功能

注释(Write1010X)

19

1

Registeraddressbit

18

0

Registeraddressbit

17

1

Registeraddressbit

16

0

保留

15

SEIMIN

MinimumcoolStep

current//

智能电流控制的最小电流

0:

½CScurrentsetting

1:

¼CScurrentsetting

0:

设置电流的1/2

1:

设置电流的1/4

14

SEDN1

Currentdecrement

speed//

智能电流的减少速度

NumberoftimesthatthestallGuard2valuemustbesampledequaltoorabovetheupperthresholdforeachdecrementofthecoilcurrent:

%00:

32

%01:

8

%10:

2

%11:

1

13

SEDN0

00:

每32个负载衰减值电流减小一个单位

01:

每8个负载衰减值电流减小一个单位

10:

每2个负载衰减值电流减小一个单位

11:

每个负载衰减值电流减小一个单位

12

0

保留

11

SEMAX3

UppercoolStep

thresholdasanoffset

fromthelower

threshold//

最小电流控制时负载

的磁滞值(高位安全门限)

IfthestallGuard2measurementvalueSGissampledequaltoorabove(SEMIN+SEMAX+1)x32enoughtimes,thenthecoilcurrentscalingfactorisdecremented.

10

SEMAX2

9

SEMAX1

8

SEMAX0

如果负载检测值≥(SEMIN+SEMAX+1)

*32电机电流回到安全值。

0000……1111:

0……15

7

0

保留

6

SEUP1

Currentincrement

size//

智能电流的增加速度

 

NumberofcurrentincrementstepsforeachtimethatthestallGuard2valueSGissampledbelowthelower

threshold:

%00:

1

%01:

2

%10:

4

%11:

8

5

SEUP0

每个负载测量值:

00……11:

1,2,4,8

4

0

保留

3

SEMIN3

LowercoolStep

threshold/coolStep

disable)

//

智能电流控制的最小

负载检测值和电流使

IfSEMINis0,coolStepisdisabled.IfSEMINisnonzeroandthestallGuard2valueSGfalls

belowSEMINx32,thecoolStepcurrent

scalingfactorisincreased.

2

SEMIN2

1

SEMIN1

0000:

禁止电流控制

如果负载检测值<SEMIN*32,电机电流减小,负载转动角度将增加。

0001……1111:

0……15

0

SEMIN0

4、stallGuard2ControlRegister(SGCSCONF)负载监控控制寄存器

SMARTEN

ChopperConfiguration

名字

功能

注释(Write110X)

19

1

Registeraddressbit

18

1

Registeraddressbit

17

0

Registeraddressbit

16

SFILT

stallGuard2filter

enable

//负载检测滤波使能

0:

Standardmode,fastestresponsetime.

1:

Filteredmode,updatedonceforeach

fourfullstepstocompensateforvariationinmotorconstruction,highestaccuracy.

0:

标准模式,最快的响应速度。

1:

滤波模式:

每4个整步时信号偏差才补偿,最高时间精度

15

0

保留

14

SGT6

stallGuard2threshold

value//

负载阀值的设定

ThestallGuard2thresholdvaluecontrolstheoptimummeasurementrangeforreadoutandstallindicatoroutput(SG_TST).Alowervalueresultsinahigher

sensitivityandlesstorqueisrequiredtoindicateastall.Thevalueisatwo’scomplementsignedinteger.Valuesbelow-10arenotrecommended.Range:

-64to+63

13

SGT5

12

SGT4

这里的信号值控制负载的阀值输出,为输出设置最优化的边界,设定值越低,灵敏度越高,0为大部分电机的工作开始值,设定值越高,灵敏度越低,需要更低转矩来决定负载值,不建议小于-10。

11

SGT3

10

SGT2

9

SGT1

8

SGT0

7

0

保留

6

0

保留

5

0

保留

4

CS4

Currentscale

(scalesdigital

currentsAandB)//

电流的标准A相或B相

CurrentscalingforSPIandSTEP/DIRoperation.%00000…%11111:

1/32,2/32,3/32,…32/32Thisvalueisbiasedby1anddividedby32,sotherangeis1/32to32/32.

Example:

CS=20is21/32current.

3

CS3

2

CS2

1

CS1

驱动电流0--31

0000……1111;分别对应1/32……32/32

0

CS0

5、DriverControlRegister(DRVCONF)驱动配置寄存器

DRVCONF

DriverConfiguration

名字

功能

注释(Write111X)

19

1

Registeraddressbit

18

1

Registeraddressbit

17

1

Registeraddressbit

16

TST

ReservedTESTmode//为测试模式保留

Mustbeclearedfornormaloperation.When

set,theSG_TSToutputexposesdigitaltest

values,andtheTEST_ANAoutputexposes

analogtestvalues.Testvalueselectionis

controlledbySGT1andSGT0:

TEST_ANA:

%00:

anatest_2vth,

%01:

anatest_dac_out,

%10:

anatest_vdd_half.

SG_TST:

%00:

comp_A,

%01:

comp_B,

%10:

CLK,

%11:

on_state_xy

测试的时候必须清除的正常运行,设置为0,当设置为1时,SG_TST输出数字测试值,TEST_ANA输出模拟测试值,输出测试值的选择由SGT1andSGT0所决定。

15

SLPH1

Slopecontrol,high

side//

上功率管控制斜率

%00:

Minimum

%01:

Minimumtemperaturecompensationmode.

%10:

Mediumtemperaturecompensationmode.

%11:

Maximum

Intemperaturecompensatedmode(tc),the

MOSFETgatedriverstrengthisincreasedifthe

overtemperaturewarningtemperatureisreached.Thiscompensatesfortemperaturedependencyofhigh-sideslopecontrol.

14

SLPH0

00:

最小值,

01:

最小的温度补偿模式,

10:

中间值的温度补偿模式

11:

最大值

在温度补偿模式中,随着温度的增加对MOSFET门级的驱动电流是增加的,如果超过警戒电流,温度的补偿模式会依靠上功率管斜率控制进行控制

13

SLPL1

Slopecontrol,low

side

//

下功率管控制斜率

%00:

Minimum.

%01:

Minimum.

%10:

Medium.

%11:

Maximum.

12

SLPL0

00&01:

最小值,10:

中间值,11:

最大值

11

0

保留

10

DISS2G

ShorttoGND

protectiondisable

//

短接到地保护使能

0:

ShorttoGNDprotectionisenabled.

1:

ShorttoGNDprotectionisdisabled.

0:

使能,1:

非使能

9

TS2G1

ShorttoGNDdetectiontimer//

短接到地保护时间

%00:

3.2µs.

%01:

1.6µs.

%10:

1.2µs.

%11:

0.8µs.

8

TS2G0

7

SDOFF

STEP/DIRinterface

disable//STEP/DIR与SPI模式的选择

0:

EnableSTEP/DIRoperation.

1:

DisableSTEP/DIRoperation.SPIinterfaceisusedtomovemotor.

0:

STEP/DIR模式;1:

SPI模式

6

VSENSE

Senseresistor

voltage-basedcurrent

scaling//

检测参考电压的边界

0:

Full-scalesenseresistorvoltageis305mV.

1:

Full-scalesenseresistorvoltageis165mV.

(Full-scalereferstoacurrentsettingof31andaDACvalueof255.)

0:

采样电压值最大305mV,

1:

采样电压值最大165mV

5

RDSEL1

Selectvalueforread

out(RDbits)//

读取返回项

 

%00Microsteppositionreadback

%01stallGuard2levelreadback

%10stallGuard2andcoolStepcurrentlevelreadback

%11Reserved,donotuse

4

RDSEL0

00:

返回微步位置,01:

返回负载值,10:

读回负载和智能电流级别,11:

保留,未使用

3

0

保留

2

0

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 军事

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1