1、TMC262硬件寄存器手册中文剖析TMC262寄存器手册(中文)关于TMC262全部写配置寄存器的一览表如表一所示:具体的包含5个寄存器:驱动控制寄存器(DRVCTRL)、斩波器控制寄存器(CHOPCONF)、智能控制寄存器(AMARTEN,也为COOLSETP)、负载监控控制寄存器(SGCSCONF)、控制配置寄存器(DRVCONF)。表一1、Driver Control Register (DRVCTRL) 驱动控制寄存器它这里主要分为2种模式SETP/DIR模式与SPI模式,而这2中模式的选择取决于:控制配置寄存器中的:SDOFF mode bit。DRVCTRLDriver Contr
2、ol in STEP/DIR Mode (SDOFF=0)位 名字功能注释(Write 000X)190Register address bit 180Register address bit170保留160保留150保留140保留130保留120保留110保留100保留9INTPOLEnable STEP interpolation 0: Disable STEP pulse interpolation. 1: Enable STEP pulse multiplication by 16. STEP信号修改的使能0:禁止对STEP脉冲信号的插补1:允许,为16clock模式8DEDGE En
3、able double edgeSTEP pulses 0: Rising STEP pulse edge is active, falling edge is inactive. 1: Both rising and falling STEP pulse edges are active. 对于STEP信号脉冲沿方式的选择0:STEP信号为上升沿有效,下降沿无效。1:STEP信号为双沿有效(上升沿、下降沿都有效)70保留60保留50保留40保留 3 MRES3Microstep resolution for STEP/DIR mode/微步距进度配置Microsteps per 90: %0
4、000: 256 %0001: 128 %0010: 64 %0011: 32 %0100: 16 %0101: 8 %0110: 4 %0111: 2 (halfstep) %1000: 1 (fullstep) 2 MRES2 1MRES100001000 一共 9 种方式:256,128,64,32,16,8,4,2,1 0MRES02、Chopper Control Register (CHOPCONF) 斩波控制寄存器CHOPCONF Chopper Configuration位 名字功能注释(Write 100X)191Register address bit 180Registe
5、r address bit170Register address bit 16TBL1Blanking time/斩波的空白时间(也就是关断时间)此时间需要安全的覆盖切换事件与持续的时间去响应检测电阻Blanking time interval, in system clock periods: %00: 16 %01: 24 %10: 36 %11: 54 15TBL0设置斩波控制的空白时间00-11,对应16-54个时钟周期。14CHM Chopper mode/斩波模式的选择This mode bit affects the interpretation of the HDEC, HEN
6、D, and HSTRT parameters shown below.0 : Standard mode (spreadCycle) 1 : Constant tOFF with fast decay time. Fast decay time is also terminated when the negative nominal current is reached. Fast decay is after on time. 此位对:HDEC,HEND,HSTRT参数的设置有影响。0:斩波模式, 1: 常系数模式,一般选择0。13RNDTF Random TOFF time Enable
7、 randomizing the slow decay phase duration: 0: Chopper off time is fixed as set by bits tOFF 1: Random mode, tOFF is random modulated by dNCLK= -12 +3 clocks. 随机TOFF时间。0:斩波时间固定 1:斩波时间可调 12HDEC1Hysteresis decrementinterval or Fast decay mode /磁滞损耗和快速衰减模式 (CHM=0: Hysteresis decrement period setting, i
8、n system clock periods: %00: 16 %01: 32 %10: 48 %11: 64)(CHM=1: HDEC1=0:current comparator can terminate the fast decay phase before timer expires. HDEC1=1: only the timer terminates the fast decay phase. HDEC0: MSB of fast decay time setting. )11HDEC0CHM=0:磁滞衰减周期设置: 00: 11:16,32,48,64 CHM=1常系数模式设置:
9、HDEC1=1 禁止电流比较器作为快衰减的终止HDEC0:快衰减的时间最高位设置10HEND3 Hysteresis end (low) value or Sine wave offset /迟滞低位值或者正弦波偏置 CHM=0: %0000 %1111: Hysteresis is -3, -2, -1, 0, 1, , 12(1/512 of this setting adds to current setting) This is the hysteresis value which becomes used for the hysteresis chopper.CHM=1: %0000
10、 %1111: Offset is -3, - 2, -1,0, 1, , 12 ,This is the sine wave offset and 1/512 of the value becomes added to the absolute value of each sine wave entry. 9HEND2 8HEND1 0000:1111:迟滞为-3,-212,当 CHM=1 时,这个表示正弦波偏置 7 HEND0 6HSTRT2Hysteresis start value or Fast decay time Setting/迟滞开始值或快衰时间设置CHM=0: Hyster
11、esis start offset from HEND: %000: 1 %100: 5 %001: 2 %101: 6 %010: 3 %110: 7 %011: 4 %111: 8 Effective: HEND+HSTRT must be 15 CHM=1 :Three least-significant bits of the duration of the fast decay phase. The MSB is HDEC0. Fast decay time is a multiple of system clock periods: NCLK= 32 x (HDEC0+HSTRT)
12、 5HSTRT14HSTRT0CHM=0: DAC 迟滞设置 000011:对应的HEND 增加5,68且 HEND+HSTRT must be 15 才有效。CHM=1: 快衰时间设置。NCLK= 32 x (HDEC0+HSTRT) 3TOFF3Off time/MOSFET disable /off time驱动使能(斩波慢衰减时间,影响开关频率)控制着慢衰减时间的持续时间,并控制着斩波的最大频率Duration of slow decay phase. If TOFF is 0, the MOSFETs are shut off. If TOFF is nonzero, slow de
13、cay time is a multiple of system clock periods: NCLK= 12 + (32 x TOFF) (Minimum time is 64clocks.) %0000: Driver disable, all bridges off %0001: 1 (use with TBL of minimum 24 clocks) %0010 %1111: 2 15 2TOFF2 1TOFF10000:禁止所有驱动器晶体管,电机可以自由转 0001:TBL 最小 24 个时钟周期00101111:215 0TOFF03、coolStep Control Regi
14、ster (SMARTEN)智能控制寄存器SMARTEN Chopper Configuration位 名字功能注释(Write 1010X)191Register address bit 180Register address bit171Register address bit 160保留15SEIMINMinimum coolStep current /智能电流控制的最小电流0: CS current setting 1: CS current setting 0:设置电流的 1/2 1:设置电流的1/4 14SEDN1 Current decrement speed /智能电流的减少速
15、度Number of times that the stallGuard2 value must be sampled equal to or above the upper threshold for each decrement of the coil current: %00: 32 %01: 8 %10: 2 %11: 1 13SEDN000:每 32 个负载衰减值电流减小一个单位 01:每 8 个负载衰减值电流减小一个单位10:每 2 个负载衰减值电流减小一个单位 11:每个负载衰减值电流减小一个单位 120保留11SEMAX3 Upper coolStep threshold as
16、 an offset from the lower threshold /最小电流控制时负载的磁滞值(高位安全门限) If the stallGuard2 measurement value SG is sampled equal to or above (SEMIN+SEMAX+1) x 32 enough times, then the coil current scaling factor is decremented. 10SEMAX2 9SEMAX1 8SEMAX0如果负载检测值(SEMIN+SEMAX+1)*32 电机电流回到安全值。00001111:015 70 保留6SEUP1
17、 Current increment size /智能电流的增加速度Number of current increment steps for each time that the stallGuard2 value SG is sampled below the lower threshold: %00: 1 %01: 2 %10: 4 %11: 8 5SEUP0 每个负载测量值:0011:1,2,4,8 40保留 3SEMIN3Lower coolStep threshold/coolStep disable )/智能电流控制的最小负载检测值和电流使能If SEMIN is 0, cool
18、Step is disabled. If SEMIN is nonzero and the stallGuard2 value SG falls below SEMIN x 32, the coolStep current scalingfactor is increased. 2SEMIN2 1SEMIN10000:禁止电流控制如果负载检测值SEMIN*32,电机电流减小,负载转动角度将增加。 00011111:015 0SEMIN04、stallGuard2 Control Register (SGCSCONF) 负载监控控制寄存器SMARTEN Chopper Configuration
19、位 名字功能注释(Write 110X)191Register address bit 181Register address bit170Register address bit 16SFILT stallGuard2 filter enable /负载检测滤波使能0: Standard mode, fastest response time. 1: Filtered mode, updated once for each four fullsteps to compensate for variation in motor construction, highest accuracy. 0
20、:标准模式,最快的响应速度。1:滤波模式:每4个整步时信号偏差才补偿,最高时间精度150保留14SGT6 stallGuard2 threshold value / 负载阀值的设定 The stallGuard2 threshold value controls the optimum measurement range for readout and stall indicator output (SG_TST).A lower value results in a higher sensitivity and less torque is required to indicate a st
21、all. The value is a twos complement signed integer. Values below -10 are not recommended. Range: -64 to +63 13SGT512SGT4这里的信号值控制负载的阀值输出,为输出设置最优化的边界,设定值越低,灵敏度越高,0 为大部分电机的工作开始值,设定值越高,灵敏度越低,需要更低转矩来决定负载值,不建议小于-10。11SGT3 10SGT2 9SGT18SGT070保留60保留50保留4CS4Current scale (scales digital currents A and B) /电流
22、的标准A相或B相Current scaling for SPI and STEP/DIR operation. %00000 %11111: 1/32, 2/32, 3/32, 32/32 This value is biased by 1 anddivided by 32, so the range is 1/32 to 32/32. Example: CS=20 is 21/32 current. 3CS32CS2 1CS1驱动电流0-3100001111;分别对应 1/3232/32 0CS05、Driver Control Register (DRVCONF) 驱动配置寄存器DRVCO
23、NF Driver Configuration 位 名字功能注释(Write 111X)191Register address bit 181Register address bit171Register address bit 16TSTReserved TEST mode /为测试模式保留Must be cleared for normal operation. When set, the SG_TST output exposes digital test values, and the TEST_ANA output exposes analog test values. Test v
24、alue selection is controlled by SGT1 and SGT0: 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 输出模拟测试值,输出测试值的选择由SGT1 and SGT0所决定。15SLPH1 Slope control, high side /
25、 上功率管控制斜率 %00: Minimum %01: Minimum temperature compensation mode.%10: Medium temperature compensation mode. %11: Maximum In temperature compensated mode (tc), the MOSFET gate driver strength is increased if the overtemperature warning temperature is reached. This compensates for temperature depende
26、ncy of high-side slope control. 14SLPH0 00:最小值,01:最小的温度补偿模式,10:中间值的温度补偿模式11:最大值在温度补偿模式中,随着温度的增加对MOSFET门级的驱动电流是增加的,如果超过警戒电流,温度的补偿模式会依靠上功率管斜率控制进行控制13SLPL1 Slope control, low side / 下功率管控制斜率%00: Minimum. %01: Minimum. %10: Medium. %11: Maximum. 12SLPL0 00&01:最小值,10:中间值,11:最大值110保留10DISS2GShort to GND p
27、rotection disable / 短接到地保护使能0: Short to GND protection is enabled. 1: Short to GND protection is disabled. 0:使能,1:非使能 9TS2G1Short to GND detection timer /短接到地保护时间%00: 3.2s. %01: 1.6s. %10: 1.2s. %11: 0.8s.8TS2G07SDOFF STEP/DIR interface disable /STEP/DIR与SPI模式的选择0: Enable STEP/DIR operation. 1: Disa
28、ble STEP/DIR operation. SPI interface is used to move motor. 0:STEP/DIR模式;1:SPI模式6VSENSESense resistor voltage-based current scaling /检测参考电压的边界0: Full-scale sense resistor voltage is 305mV. 1: Full-scale sense resistor voltage is 165mV. (Full-scale refers to a current setting of 31 and a DAC value of 255.) 0: 采样电压值最大 305mV,1:采样电压值最大165mV5RDSEL1 Select value for read out (RD bits) /读取返回项%00 Microstep position read back %01 stallGuard2 level read back %10 stallGuard2 and coolStep current level read back %11 Reserved, do not use 4RDSEL0 00:返回微步位置,01:返回负载值,10:读回负载和智能电流级别,11:保留,未使用 30保留20
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1