Part Number Hot Search : 
H01N60S LP28007 127141N LET21008 EM73362 DS2411 M1300 NZH6V8B
Product Description
Full Text Search
 

To Download USB-2-RTMI Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  dedicated motion controller for 2-/3-phase pmsm i ntegrated c i rcu i ts tmc4671 datasheet i c version v1.00 | document revision v1.04 ? 2018-dec-11 the tmc4671 is a fully integrated servo controller, providing field oriented control for bldc/pmsm and 2-phase stepper motors as well as dc motors and voice coils. all control functions are imple- mented in hardware. i ntegrated adcs, position sensor interfaces, position interpolators, enable a fully functional servo controller for a wide range of servo applications. features ? servo controller w/ field oriented control (foc) ? torque control (foc), velocity control, position control ? feed forward control i nputs ? i ntegrated adcs,  -adc frontend ? encoder engine: hall analog/digital, encoder analog/digital ? supports 3-phase pmsm/bldc, 2-phase stepper motors, and dc motors ? advanced pwm engine (25khz. . . 100khz) ? application sp i + debug (uart, sp i ) ? step-direction i nterface (s/d) applications ? robotics ? pick and place machines ? factory automation ? e-mobility ? laboratory automation ? blowers ? pumps simpli 1 ed block diagram ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at: www.trinamic.com read entire documentation.
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 2 / 157 contents 1 order codes 5 2 functional summary 6 3 foc basics 8 3.1 why foc? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.2 what is foc? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.3 why foc as pure hardware solution? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.4 how does foc work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.5 what is required for foc? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.5.1 coordinate transformations - clarke, park, iclarke, ipark . . . . . . . . . . . . . . . . . 10 3.5.2 measurement of stator coil currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.5.3 stator coil currents i _u, i _v, i _w and association to terminal voltages u_u, u_v, u_w 10 3.5.4 measurement of rotor angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.5.5 measured rotor angle vs. magnetic axis of rotor vs. magnetic axis of stator . . . . . 11 3.5.6 knowledge of relevant motor parameters and position sensor (encoder) parameters 12 3.5.7 proportional i ntegral (p i ) controllers for closed loop current control . . . . . . . . . . 12 3.5.8 pulse width modulation (pwm) and space vector pulse width modulation (svpwm) . 12 3.5.9 orientations, models of motors, and coordinate transformations . . . . . . . . . . . . 13 4 functional description 14 4.1 functional blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2 communication i nterfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2.1 sp i slave user i nterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2.2 tr i nam i c real-time monitoring i nterface (sp i master) . . . . . . . . . . . . . . . . . . . 17 4.2.3 uart i nterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.2.4 step/direction i nterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2.5 single pin i nterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.3 numerical representation, electrical angle, mechanical angle, and pole pairs . . . . . . . . . 20 4.3.1 numerical representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.3.2 n_pole_pa i rs, ph i _e, ph i _m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3.3 numerical representation of angles ph i . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.4 adc engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.4.1 adc group a and adc group b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.4.2 i nternal delta sigma adcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.4.3 external delta sigma adcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.5 delta sigma con 1 guration and timing con 1 guration . . . . . . . . . . . . . . . . . . . . . . . . 24 4.5.1 i nternal delta sigma modulators - mapping of v_raw to adc_raw . . . . . . . . . . . 27 4.5.2 external delta sigma modulator i nterface . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.5.3 adc con 1 guration - mdac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.6 analog signal conditioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.6.1 foc3 - stator coil currents i _u, i _v, i _w and association to terminal voltages u_u, u_v, u_w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.6.2 stator coil currents i _x, i _y and association to terminal voltages u_x, u_y . . . . . . . 33 4.6.3 adc selector & adc scaler w/ o ? set correction . . . . . . . . . . . . . . . . . . . . . . . 33 4.7 encoder engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.7.1 open-loop encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.7.2 i ncremental abn encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.7.3 secondary i ncremental abn encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.7.4 digital hall sensor i nterface with optional i nterim position i nterpolation . . . . . . . . 37 4.7.5 digital hall sensor - i nterim position i nterpolation . . . . . . . . . . . . . . . . . . . . . 38 4.7.6 digital hall sensors - masking and filtering . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 3 / 157 4.7.7 digital hall sensors together with i ncremental encoder . . . . . . . . . . . . . . . . . . 38 4.7.8 analog hall and analog encoder i nterface (sincos of 0 90 or 0 120 240) . . . . . . 39 4.7.9 analog position decoder (sincos of 090 or 0120240) . . . . . . . . . . . . . . . . . 40 4.7.10 encoder i nitialization support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.7.11 velocity measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.7.12 reference switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.8 foc23 engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.8.1 p i controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.8.2 p i controller calculations - classic structure . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.8.3 p i controller calculations - advanced structure . . . . . . . . . . . . . . . . . . . . . . . 44 4.8.4 p i controller - clipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.8.5 p i flux & p i torque controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4.8.6 p i velocity controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.8.7 p position controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.8.8 i nner foc control loop - flux & torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.8.9 foc transformations and p i (d) for control of flux & torque . . . . . . . . . . . . . . . . 46 4.8.10 motion modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.8.11 brake chopper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.9 filtering and feed-forward control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.9.1 biquad filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.9.2 standard velocity filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.9.3 feed-forward control structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.10 pwm engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.10.1 pwm polarities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.10.2 pwm frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.10.3 pwm resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.10.4 pwm modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.10.5 break-before-make (bbm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.10.6 space vector pwm (svpwm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5 safety functions 54 5.1 watchdog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 6 register map 56 6.1 register map overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 6.2 register map full . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 7 pinning 136 8 tmc4671 pin table 138 9 electrical characteristics 142 9.1 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 9.2 electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 9.2.1 operational range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 9.2.2 dc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 10 sample circuits 144 10.1 supply pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 10.2 clock and reset circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 10.3 digital encoder, hall sensor i nterface and reference switches . . . . . . . . . . . . . . . . . . 144 10.4 analog frontend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 10.5 phase current measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 10.6 power stage i nterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 4 / 157 11 setup guidelines 148 12 package dimensions 149 13 supplemental directives 151 13.1 producer i nformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 13.2 copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 13.3 trademark designations and symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 13.4 target user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 13.5 disclaimer: life support systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 13.6 disclaimer: i ntended use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 13.7 collateral documents & tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 14 errata 153 15 figures i ndex 155 16 tables i ndex 156 17 revision history 157 17.1 i c revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 17.2 document revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 5 / 157 1 order codes order code description size tmc4671-es tmc4671 foc servo controller i c 10.5mm x 6.5mm tmc4671-eval tmc4671 evaluation board 55mm x 85mm tmc4671-bob tmc4671 breakout board 38mm x 40mm landungsbruecke mcu board 85mm x 55mm tmc-ups-2a24v-eval power stage board 85mm x 55mm tmc-ups-10a70v-eval power stage board 85mm x 55mm usb-2-rtm i i nterface adapter to use rtm i 40mm x20mm table 1: order codes ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 6 / 157 2 functional summary ? servo controller with field oriented control (foc) C torque (and 2 ux) control mode C velocity control mode C position control mode C update rate of current controller and pwm at maximum frequency of 100 khz (speed and position controller update rate is con 1 gurable by setting a divider of current controller update rate) ? control functions/p i controllers C programmable clipping of inputs and outputs of interim results C i ntegrator windup protection for all controllers C programmable 1 eld oriented voltage circular ( q u 2 d + u 2 q ) limiter C feed-forward o ? sets for target values and feed-forward friction compensation C advanced feed-forward control structure for optimal trajectory tracking performance C extended i rq event masking options and limiter status register C advanced encoder initialization algorithms with hall sensor or/and with minimal movement ? supported motor types C foc3 : 3-phase permanent magnet synchronous motors (pmsm) C foc2 : 2-phase stepper motors C dc1 : brushed dc motors, or linear voice coil motors ? adc engine with o ? set correction and scaling C i ntegrated  adcs for current sense voltage, motor supply voltage, analog encoder, two agp i s C i ntegrated  - i nterface for external  -modulators ? position feedback evaluation C open loop position generator (programmable [rpm], [rpm/s]) for initial setup C digital incremental encoder (abn resp. abz, up to 5 mhz) C secondary digital incremental encoder C digital hall sensor interface (h 1 , h 2 , h 3 resp. h u , h v , h w ) with interpolation of interim positions C analog encoder/analog hall sensor interface (sincos (0, 90) or 0, 120, 240) C multi-turn position counter (32-bit) C position target, velocity and target torque 1 lters (biquad) ? pwm engine i ncluding svpwm C programmable pwm frequency within the range of 20 khz . . . 100 khz C programmable brake-before-make (bbm) times (high side, low side) 0 ns . . . 2.5  s in 10 ns steps and gate driver input signals C pwm auto scaling for transparent change of pwm frequency during motion ? sp i communication i nterface C 40-bit datagram length (1 readwrite bit + 7 address bits + 32 data bits) ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 7 / 157 C i mmediate sp i read response (register read access by single datagram) C sp i clock frequency up to 1mhz (8mhz in future version) ? tr i nam i c realtime monitoring i nterface C high frequency sampling of real-time data via tr i nam i c s real-time monitoring system C only single 10-pin high density connector on pcb needed C advanced controller tuning support by frequency response identi 1 cation and advanced auto tuning options with tr i nam i c s i de ? uart debug i nterface C three pin (gnd, rxd, txd) 3.3 v uart interface (1n8; 9600 (default), 115200, 921600, or 3m bps) C transparent register access parallel to embedded user application interface (sp i ) ? supply voltages C 5v and 3.3v; vcc_core is internally generated ? i o voltage C 3.3v for all digital i os (choosable by vcc i o supply), 5v input range for di ? erential analog inputs, 1.25v input range for single ended inputs ? clock frequency C 25 mhz (external oscillator needed) ? packages C qfn76 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 8 / 157 3 foc basics this section gives a short introduction into some basics of field oriented control (foc) of electric motors. 3.1 why foc? the field oriented control (foc), alternatively named vector control (vc), is a method for the most energy-e z cient way of turning an electric motor. 3.2 what is foc? the field oriented control was independently developed by k. hasse, tu darmstadt, 1968, and by felix blaschke, tu braunschweig, 1973. the foc is a current regulation scheme for electro motors that takes the orientation of the magnetic 1 eld and the position of the rotor of the motor into account, regulating the strength in such way that the motor gives that amount of torque that is requested as target torque. the foc maximizes active power and minimizes idle power - that 1 nally results in power dissipation - by intelligent closed-loop control illustrated by 1 gure 1 . figure 1: i llustration of the foc basic principle by cartoon: maximize active power and minimize idle power and power dissipation by intelligent closed-loop control. 3.3 why foc as pure hardware solution? the initial setup of the foc is usually very time consuming and complex, although source code is freely available for various processors. this is because the foc has many degrees of freedom that all need to 1 t together in a chain in order to work. the hardware foc as an existing standard building block drastically reduces the e ? ort in system setup. with that o ? the shelf building block, the starting point of foc is the setup of the parameters for the foc. setting up and implement the foc itself and building and programming required interface blocks is no longer necessary. the real parallel processing of hardware blocks de-couples the higher lever application software from high speed real-time tasks and simpli 1 es the development of application software. with the tmc4671, the user is free to use its quali 1 ed cpu together with its quali 1 ed tool chain, freeing the user from 1 ghting with processer-speci 1 c challenges concerning interrupt handling and direct memory access. there is no need for a dedicated tool chain to access the tmc4671 registers and to operate it - just sp i (or uart) communication needs to be enabled for any given cpu. the integration of the foc as a soc (system-on-chip) drastically reduces the number of required compo- nents and reduces the required pcb space. this is in contrast to classical foc servos formed by motor ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 9 / 157 block and separate controller box wired with motor cable and encoder cable. the high integration of foc, together with velocity controller and position controller as a soc, enables the foc as a standard peripheral component that transforms digital information into physical motion. compact size together with high performance and energy e z ciency especially for battery powered mobile systems are enabling factors when embedded goes autonomous. 3.4 how does foc work? two force components act on the rotor of an electric motor. one component is just pulling in radial direction ( i d) where the other component is applying torque by pulling tangentially ( i q). the ideal foc performs a closed loop current control that results in a pure torque generating current i q C without direct current i d. figure 2: foc optimizes torque by closed loop control while maximizing i q and minimizing i d to 0 from top point of view, the foc for 3-phase motors uses three phase currents of the stator interpreted as a current vector ( i u; i v; i w) and calculates three voltages interpreted as a voltage vector (uu; uv; uw) taking the orientation of the rotor into account in a way that only a torque generating current i q results. from top point of view, the foc for 2-phase motors uses two phase currents of the stator interpreted as a current vector ( i x; i y) and calculates two voltages interpreted as a voltage vector (ux; uy) taking the orientation of the rotor into account in a way that only a torque generating current i q results. to do so, the knowledge of some static parameters (number of pole pairs of the motor, number of pulses per revolution of an used encoder, orientation of encoder relative to magnetic axis of the rotor, count direction of the encoder) is required together with some dynamic parameters (phase currents, orientation of the rotor). the adjustment of p parameter p and i parameters of two p i controllers for closed loop control of the phase currents depends on electrical parameters of the motor (resistance, inductance, back emf constant of the motor that is also the torque constant of the motor, supply voltage). 3.5 what is required for foc? the foc needs to know the direction of the magnetic axis of the rotor of the motor in refrence to the magnetic axis of the stator of the motor. the magnetic 2 ux of the stator is calculated from the currents through the phases of the motor. the magnetic 2 ux of the rotor is 1 xed to the rotor and thereby determined by an encoder device. for the foc, the user needs to measure the currents through the coils of the stator and the angle of the rotor. the measured angle of the rotor needs to be adjusted to the magnetic axes. the challenge of the foc is the high number of degrees of freedom in all parameters. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 10 / 157 3.5.1 coordinate transformations - clarke, park, iclarke, ipark the foc requires di ? erent coordinate transformations formulated as a set of matrix multiplications. these are the clarke transformation (clarke), the park transformation (park), the inverse park transforma- tion (ipark) and the inverse clarke transformation (iclarke). some put park and clarke together as dq transformation and park and clarke as inverse dq transformation. the tmc4671 takes care of the required transformations so the user no longer has to 1 ght with implemen- tation details of these transformations. 3.5.2 measurement of stator coil currents the measurement of the stator coil currents is required for the foc to calculate a magnetic axis out of the stator 1 eld caused by the currents 2 owing through the stator coils. coil current stands for motor torque in context of foc. this is because motor torque is proportional to motor current, de 1 ned by the torque constant of a motor. i n addition, the torque depends on the orientation of the rotor of the motor relative to the magnetic 1 eld produced by the current through the coils of the stator of the motor. 3.5.3 stator coil currents i _u, i _v, i _w and association to terminal voltages u_u, u_v, u_w the correct association between stator terminal voltages u_u, u_v, u_w and stator coil currents i _u, i _v, i _w is essential for the foc. i n addition to the association, the signs of each current channel need to 1 t. signs of the current can be adapted numerically by the adc scaler. the mapping of adc channels is programmable via con 1 guration registers for the adc selector. i nitial setup is supported by the integrated open loop encoder block, that can support the user to turn a motor open loop. 3.5.3.1 chain of gains for adc raw values an adc raw value is a result of a chain of gains that determine it. a coil current i _sense 2 owing through a sense resistor causes a voltage di ? erence according to ohm s law. the resulting adc raw value is a result of the analog signal path according to adc_raw = ( i _sense  adc_ga i n ) + adc_offset : (1) the adc_ga i n is a result of a chain of gains with individual signs. the sign of the adc_ga i n is positive or negative, depending on the association of connections between sense ampli 1 er inputs and the sense resistor terminals. the adc_offset is the result of electrical o ? sets of the phase current measurement signal path. for the tmc4671, the maximum adc_raw value adc_raw_max = (2 16 1) and the minimum adc raw value is adc_raw_m i n = 0. adc_ga i n = ( i _sense_max  r_sense )  sense_ampl i f i er_ga i n  ( adc_raw_max = adc_u_max ) (2) for the foc, the adc_raw is scaled by the adc scaler of the tmc4671 together with subtraction of o ? set to compensate it. i nternally, the tmc4671 foc engine calculates with s16 values. thus, the adc scaling needs to be chosen so that the measured currents 1 t into the s16 range. with the adc scaler, the user can choose a scaling with physical units like [ ma ] . ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 11 / 157 3.5.4 measurement of rotor angle determination of the rotor angle is either done by sensors (digital encoder, analog encoder, digital hall sensors, analog hall sensors) or sensorless by a reconstruction of the rotor angle. currently, there are no sensorless methods available for foc that work in a general purpose way as a sensor down to velocity zero. the tmc4671 does not support sensorless foc. 3.5.5 measured rotor angle vs. magnetic axis of rotor vs. magnetic axis of stator the rotor angle, measured by an encoder, needs to be adjusted to the magnetic axis of the rotor. this is because an incremental encoder has an arbitrary orientation relative to the magnetic axis of the rotor, and the rotor has an arbitrary orientation to magnetic axis of the stator. the direction of counting depends on the encoder, its mounting, and wiring and polarities of encoder signals and motor type. so, the direction of encoder counting is programmable for comfortable de 1 nition for a given combination of motor and encoder. 3.5.5.1 direction of motion - magnetic field vs. position sensor for foc it is essential, that the direction of revolution of the magnetic 1 eld is compatible with the direction of motion of the rotor position reconstructed from encoder signals: for revolution of magnetic 1 eld with positive direction, the decoder position needs to turn into the same positive direction. for revolution of magnetic 1 eld with negative direction, the decoder position needs to turn into the same negative direction. with an absolute encoder, once adjusted to the relative orientation of the rotor and to the relative orientation of the stator, one could start the foc without initialization of the relative orientations. 3.5.5.2 bang-bang i nitialization of the encoder a bang-bang initialization is an initialization where the motor is forced with high current into a speci 1 c position. for bang-bang initialization, the user sets a current into direction d that is strong enough to move the rotor into the desired direction. other initialization methods ramp up the current smoothly and adjust the current vector to rotor movement detected by the encoder. 3.5.5.3 encoder i nitialization using hall sensors the encoder can be initialized using digital hall sensor signals. digital hall sensor signals give absolute positions within each electrical period with a resolution of sixty degrees. i f the hall sensor signals are used to initialize the encoder position on the 1 rst change of a hall sensor signal, an absolute reference within the electrical period for commutation is given. 3.5.5.4 minimum movement i nitialization of the encoder for minimal movement initialization of the encoder, the user slowly increases a current into direction d and adjusts an o ? set of the measured angle in a way that the rotor of the motor does not move during initialization while the o ? set of the measured angle is determined. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 12 / 157 3.5.6 knowledge of relevant motor parameters and position sensor (encoder) parameters 3.5.6.1 number of pole pairs of a motor the number of pole pairs is an essential motor parameter. i t de 1 nes the ratio between electrical revolutions and mechanical revolutions. for a motor with one pole pair, one mechanical revolution is equivalent to one electrical revolution. for a motor with npp pole pairs, one mechanical revolution is equivalent to npp electrical revolutions, with n = 1, 2, 3, 4, . . . . some de 1 ne the number of poles np instead of number of pole pairs npp for a motor, which results in a factor of two that might cause confusion. for the tmc4671, we use npp number of pole pairs. 3.5.6.2 number of encoder positions per revolution for the encoder, the number of positions per revolution (ppr) is an essential parameter. the number of positions per revolution is essential for the foc. some encoder vendors give the number of lines per revolution (lpr) or just named line count (lc) as encoder parameter. line count and positions per revolution might di ? er by a factor of four. this is because of the quadrature encoding - a signal and b signal with phase shift - that give four positions per line, enabling the determination of the direction of revolution. some encoder vendors associate counts per revolution (cpr) or pulses per revolution associated to ppr acronym. the tmc4671 uses positions per revolution (ppr) as encoder parameter. 3.5.7 proportional i ntegral (p i ) controllers for closed loop current control last but not least, two p i controllers are required for the foc. the tmc4671 is equipped with two p i controllers - one for control of torque generating current i _q and one to control current i _d to zero. 3.5.8 pulse width modulation (pwm) and space vector pulse width modulation (svpwm) the pwm power stage is a must-have for energy e z cient motor control. the pwm engine of the tmc4671 just needs a couple of parameters to set pwm frequency fpwm and switching pauses for both high side switches tbbm_h and low side switches tbbm_l. some control bits are for the programming of power switch polarities for maximum 2 exibility in the selection in gate drivers for the power mos-fets. an additional control bit selects svpwm on or o ? . the tmc4671 allows for change of pwm frequency by a single parameter during operation. with this, the tmc4671 is advanced compared to software solutions where pwm and svpm con 1 guration of cpu internal peripherals normally needs settings of many parameters. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 13 / 157 3.5.9 orientations, models of motors, and coordinate transformations the orientation of magnetic axes (u, v, w for foc3 resp. x, y for foc2) is essential for the foc together with the relative orientation of the rotor. here, the rotor is modeled by a bar magnet with one pole pair (n_pole_pairs = 1) with magnetic axis in north-south direction. the actual magnetic axis of the stator - formed by the motor coils - is determined by measurement of the coil currents. the actual magnetic axis of the rotor is determined by incremental encoder or by hall sensors. i ncremental encoders need an initialization of orientation, where hall sensors give an absolute orientation, but with low resolution. a combination of hall sensor and incremental encoder is useful for start-up initialization. figure 3: orientations uvw (foc3) and xy (foc2) figure 4: compass motor model w/ 3 phases uvw (foc3) and compass motor model w/ 2 phases (foc2) ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 14 / 157 4 functional description the tmc4671 is a fully integrated controller for 1 eld-oriented control (foc) of either one 2-phase stepper motor (foc2) or one 3-phase brushless motor (foc3), as well as dc motors or voice coil actuators. containing the complete control loop core architecture (position, velocity, torque), the tmc4671 also has the required peripheral interfaces for communication with an application controller, for feedback (digital encoder, analog interpolator encoder, digital hall with interpolator, analog inputs for current and voltage measurement), and helpful additional i os. the tmc4671 supports highest control loop speed and pwm frequencies. the tmc4671 is the building block which takes care of all real-time critical tasks of 1 eld-oriented motor control. i t decouples the real-time 1 eld-oriented motor control and its real-time sub-tasks such as current measurement, real-time sensor signal processing, and real-time pwm signal generation from the user application layer as outlined by 1 gure 5 . figure 5: hardware foc application diagram 4.1 functional blocks the application interface, register bank, adc engine, encoder engine, foc torque p i controller, velocity p i controller, position p controller, and pwm engine make up the tmc4671. figure 6: hardware foc block diagram ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 15 / 157 the adc engine interfaces the integrated adc channels and maps raw adc values to signed 16 bit (s16) values for the inner foc current control loop based on programmable o ? set and scaling factors. the foc torque p i controller forms the inner base component including required transformations (clark, park, inverse park, inverse clark). all functional blocks are pure hardware. 4.2 communication i nterfaces the tmc4671 is equipped with an sp i interface for access to all registers of the tmc4671. the sp i interface is the main application interface. an additional uart interface is intended for system setup. with that interface, the user can access all registers of the tmc4671 in parallel to the application accessing them via the sp i communication interface - via the user s 1 rmware or via evaluation boards and the tmcl- i de. the data format of the uart interface is similar to the sp i communication interface - sp i 40 bit datagrams sent to the tmc4671 and sp i 40 bit datagrams received by the mcu vs. 1 ve bytes sent via uart and 1 ve bytes received via uart. sending a burst of di ? erent real-time data for visualization and analysis via the tmcl- i de can be triggered using special datagrams. with that, the user can set up an embedded application together with the tmcl- i de, without having to write a complex set of visualization and analysis functions. the user can focus on its application. the tmc4671 is also equipped with an additional sp i master interface (tr i nam i c real-time monitoring i nterface, dbgsp i ) for high-speed visualization of real-time data together with the tmcl- i de. 4.2.1 sp i slave user i nterface the sp i of the tmc4671 for the user application has an easy command and control structure. the tmc4671 user sp i acts as a slave. the sp i datagram length is 40 bit with a clock rate up to 1 mhz (8 mhz in future chip version). ? the msb (bit#39) is sent 1 rst. the lsb (bit#0) is sent last. ? the msb (bit#39) is the wr i te_notread (wrnrd) bit. ? the bits (bit#39 to bit#32) are the address bits (addr). ? bits (bit#31) to (bit#0) are 32 data bits. the sp i of the tmc4671 immediately responses within the actual sp i datagram on read and write for ease-of-use communication and uses sp i mode 3 with cpol = 1 and cpha = 1. figure 7: sp i datagram structure a simple sp i datagram example: 0x8100000000 // 1st write 0x00000000 into address 0x01 (chipinfo_addr) 0x0000000000 // 2nd read register 0x00 (chipinfo_data), returns 0x34363731 <=> acsii "4671" ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 16 / 157 figure 8: sp i timing sp i i nterface timing characteristics, fclk = 25mhz parameter symbol condition min typ max unit sck valid before or after change of nscs t cc 62.5 ns nscs high time t csh 62.5 ns nscs low time t csl 62.5 ns sck high time t ch 62.5 ns sck low time t cl 62.5 ns sck low time t cl 62.5 ns sck frequency f sck 8 mhz mos i setup time before rising edge of sck t du 62.5 ns mos i hold time after falling edge of sck t dh 62.5 ns m i so data valid time after falling edge of sck t do 10 ns table 2: sp i timing parameter i nfo the sp i in the tmc4671-es shows following error: during transaction of read data the msb (bit#31) might get corrupted. this shows in two di ? erent ways. the 1 rst one being a 40 ns pulse (positive or negative) on m i so at the beginning of transfer of that particular bit. this pulse can corrupt the msb of read data and this error can be avoided when sp i clock frequency is set to 1 mhz. the second error also corrupts msb of read data when msb of register is unstable. such as current measurement noise around zero. i n this case, msb should be ignored when possible. please also consider that e.g. actual torque value can be read from register p i d_torque_flux_actual or from i nter i m_data register, where it is showing up in the lower 16 bits. these errors will be 1 xed in the next i c version. sp i write access is not a ? ected and can be performed at 8 mhz clock frequency. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 17 / 157 4.2.2 tr i nam i c real-time monitoring i nterface (sp i master) the tr i nam i c real-time monitoring i nterface (rtm i , sp i master) is an additional fast interface enabling real-time identi 1 cation of motor and system parameters. the user can check con 1 guration and access registers in the tmc4671 via the tmcl- i de with its build-in con 1 guration wizards for foc setup in parallel to the user 1 rmware. tr i nam i c provides a monitoring adapter to access the interface, which connects easily to a single 10 pin high density connector (type: hirose df20f-10dp-1v) on the user s pcb or on the evaluation board. i f the interface is not needed, pins can be left open or can be used as gp i os according to the speci 1 cation. the connector needs to be placed near the tmc4671 and assignment needs to be as displayed in 1 gure 9 . figure 9: connector for real-time monitoring i nterface (connector type: hirose df20f-10dp-1v) i nfo the tr i nam i c real-time monitoring i nterface can not be used with galvanic isolation, as the timing of sp i communication is too strict. this will be 1 xed in the next version so that galvanic isolation of sp i signals will be possible with a de 1 ned latency of isolators. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 18 / 157 4.2.3 uart i nterface the uart interface is a simple three pin (gnd, rxd, txd) 3.3v uart interface with up to 3 mbit/s transfer speed with one start bit, eight data bits, one stop bit, and no parity bits (1n8). the default speed is 9600 bps. other supported speeds are 115200 bps, 921600 bps, and 3000000 bps. with an 3.3v-uart-to-usb adapter cable (e.g. ftd i ttl-232r-rpi), the user can use the full maximum data rate. the uart port enables i n-system-setup-support by multiple-ported register access. an uart datagram consists of 1 ve bytes - similar to the datagrams of the sp i . i n contrast to sp i , the uart interface has a time out feature. so, the 1 ve bytes of a uart datagram need to be send within one second. a pause of sending more than one second causes a time out and sets the uart protocol handler back into i dle state. i n other words, waiting for more than one second in sending via uart ensures that the uart protocol handler is in i dle state. a simple uart example (similar to the simple sp i example): 0x81 0x00 0x00 0x00 0x00 // 1st write 0x00000000 into address 0x01 (chipinfo_addr) 0x00 0x00 0x00 0x00 0x00 // 2nd read register 0x00 (chipinfo_data), returns 0x34363731 why uart i nterface? i t might become necessary during the system setup phase to simply access some internal registers without disturbing the application, without changing the actual user application software, and without adding additional debugging code that might disturb the application software itself. the uart enables this supporting function. i n addition, it also enables easy access for monitoring purposes with its very simple and direct 1 ve byte protocol. i t is not recommended as standard communication interface due to low performance. figure 10: uart read datagram (tmc4671 register read via uart) figure 11: uart write datagram (tmc4671 register write via uart) ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 19 / 157 4.2.4 step/direction i nterface the user can manipulate the target position via the step direction interface. i t can be enabled by setting the step_w i dth (s32) register to a proper step width. i nfo the step/direction interface is not working properly, due to wrong mapping of internal signals. the target position is updated, but not fed into the position controller. this error will be 1 xed in next i c version. 4.2.5 single pin i nterface the tmc4671 can be operated in motion modes in which the main target value is calculated from either a pwm input signal on p i n pwm_ i or by analog input to agp i _a. number motion mode using pwm_ i or agp i _a 0 stopped mode no 1 torque mode no 2 velocity mode no 3 position mode no 4 prbs flux mode no 5 prbs torque mode no 6 prbs velocity mode no 7 prbs position mode no 8 uq ud ext mode no 9 encoder i nit mini move mode no 10 agp i _a torque mode agp i _a 11 agp i _a velocity mode agp i _a 12 agp i _a position mode agp i _a 13 pwm_ i torque mode pwm_ i 14 pwm_ i velocity mode pwm_ i 15 pwm_ i position mode pwm_ i table 3: single pin i nterface motion modes registers s i ngle_p i n_ i f_offset and s i ngle_p i n_ i f_scale can be used to scale the value to desired range. i n case of the pwm input, a permanent low input signal or permanent high signal is treated as input error and chosen target value is set to zero. register s i ngle_p i n_ i f_cfg con 1 gures the length of a digital 1 lter for the pwm_ i signal. spikes on the signal can be thereby suppressed. bit 0 in register s i ngle_p i n_ i f_status is set high when pwm_ i is constant low, bit 1 is set high when the pwm_ i is constant high. writing to this register resets these 2 ags. maximum pwm period of the pwm signal must be 65536 x 40 ns. the calculation of the normalized duty cycle is started on the rising edge of pwm_ i . the pwm frequency needs to be constant as big variations (tolerance of 4 us in pwm period) in the pwm frequency are treated as error. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 20 / 157 a duty cycle of 50% equals an input value of 32768. with the o ? set and scaling factors it can be mapped to desired range. 4.3 numerical representation, electrical angle, mechanical angle, and pole pairs the tmc4671 uses di ? erent numerical representations for di ? erent parameters, measured values, and interim results. the terms electrical angle ph i _e, mechanical angle ph i _m, and number of pole pairs (n_pole_pa i rs) of the motor are important for setup of foc. this section describes the di ? erent numerical representations of parameters and terms. 4.3.1 numerical representation the tmc4671 uses signed and unsigned values of di ? erent lengths and 1 xed point representations for parameters that require a non-integer granularity. symbol description min max u16 unsigned 16 bit value 0 65535 s16 signed 16 bit values, 2 th complement -32767 32767 u32 unsigned 32 bit value 0 2 32 = 4294967296 s32 signed 32 bit values, 2 th complement -2147483647 2 31 - 1 = 2147483647 q8.8 signed 1 x point value with 8 bit integer part and 8 bit fractional part -32767/256 32767/256 q4.12 signed 1 x point value with 4 bit integer part and 12 bit fractional part -32767/4096 -32767/4096 table 4: numerical representations i nfo two s complement of n bit is 2 ( n 1) . . . 2 ( n 1) 1 . to avoid unwanted over 2 ow, the range is clipped to 2 ( n 1) + 1 . . . 2 ( n 1) 1 . because the zero is interpreted as a positive number for 2 th complement representation of integer n bit number, the smallest negative number is 2 ( n 1) where the largest positive number is 2 ( n 1) 1 . using the smallest negative number 2 ( n 1) might cause critical under 2 ow or over 2 ow. i nternal clipping takes this into account by mapping 2 ( n 1) to 2 ( n 1) + 1 . hexadecimal value u16 s16 q8.8 q4.12 0x0000 h 0 0 0.0 0.0 0x0001 h 1 1 1 / 256 1 / 4096 0x0002 h 2 2 2 / 256 2 / 4096 0x0080 h 128 128 0.5 0.03125 0x0100 h 256 256 1.0 0.0625 0x0200 h 512 512 2.0 0.125 0x3fff h 16383 16383 16383 / 256 16383 / 4096 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 21 / 157 hexadecimal value u16 s16 q8.8 q4.12 0x5a81 h 23169 23169 23169 / 256 23169 / 4096 0x7fff h 32767 32767 32767 / 256 32767 / 4096 0x8000 h 32768 -32768 -32768 / 256 -32768 / 4096 0x8001 h 32769 -32767 -32767 / 256 -32767 / 4096 0x8002 h 32770 -32766 -32766 / 256 -32766 / 4096 0xc001 h 49153 -16383 -16383 / 256 -16383 / 4096 0xfffe h 65534 -2 -2 / 256 -2 / 4096 0xffff h 65535 -1 -1 / 256 -1 / 4096 table 5: examples of u16, s16, q8.8, q4.12 the q8.8 and q4.12 are used for p and i parameters which are positive numbers. note that q8.8 and q4.12 are used as signed numbers. this is because theses values are multiplied with signed error values resp. error integral values. 4.3.2 n_pole_pa i rs, ph i _e, ph i _m the parameter n_pole_pa i rs de 1 nes the factor between electrical angle ph i _e and mechanical angle ph i _m of a motor (pls. refer 1 gure 12 ). a motor with one (1) pole pair turns once for each electrical period. a motor with two (2) pole pairs turns once for every two electrical periods. a motor with three (3) pole pairs turns once for every three electrical periods. a motor with four pole (4) pairs turns once for every four electrical periods. the electrical angle ph i _e is relevant for the commutation of the motor. i t is relevant for the torque control of the inner foc loop. ph i _e = ph i _m  n_pole_pa i rs (3) the mechanical angle ph i _m is primarily relevant for velocity control and for positioning. this is because one wants to control the motor speed in terms of mechanical turns and not in terms of electrical turns. ph i _m = ph i _e = n_pole_pa i rs (4) di ? erent encoders give di ? erent kinds of position angles. digital hall sensors normally give the electrical position ph i _e that can be used for commutation. analog encoders give - depending on their resolu- tion - angles that have to be scaled 1 rst to mechanical angles ph i _m and to electrical angles ph i _e for commutation. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 22 / 157 figure 12: n_pole_pa i rs - number of pole pairs (number of poles) 4.3.3 numerical representation of angles ph i electrical angles and mechanical angles are represented as 16 bit integer values. one full revolution of 360 deg is equivalent to 2 16 = 65536 steps. any position coming from a sensor is mapped to this integer range. adding an o ? set of ph i _offset causes a rotation of an angle ph i _offset = 2 16 . subtraction of an o ? set causes a rotation of an angle ph i _offset in opposite direction. figure 13: i nteger representation of angles as 16 bit signed (s16) resp. 16 bit unsigned (u16) hexadecimal value u16 s16 ph i []  ph i [] 0x0000 h 0 0 0.0 0.0 0x1555 h 5461 5461 30.0 -330.0 0x2aaa h 10922 10922 60.0 -300.0 0x4000 h 16384 16384 90.0 -270.0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 23 / 157 hexadecimal value u16 s16 ph i []  ph i [] 0x5555 h 21845 21845 120.0 -240.0 0x6aaa h 27306 27768 150.0 -210.0 0x8000 h 32768 -32768 180.0 -180.0 0x9555 h 38229 -27307 210.0 -150.0 0xaaaa h 43690 -21846 240.0 -120.0 0xc000 h 49152 -16384 270.0 -90.0 0xd555 h 54613 -10923 300.0 -60.0 0xeaaa h 60074 -5462 330.0 -30.0 table 6: examples of u16, s16, q8.8 the option of adding an o ? set is for adjustment of angle shift between the motor and stator and the rotor and encoder. finally, the relative orientations between the motor and stator and the rotor and encoder can be adjusted by just one o ? set. alternatively, one can set the counter position of an incremental encoder to zero on initial position. for absolute encoders, one needs to use the o ? set to set an initial position. 4.4 adc engine the adc engine controls the sampling of di ? erent available adc channels. the adc channels (adc_ i 0_pos, adc_ i 0_neg, adc_ i 1_pos, adc_ i 1_neg) for current measurement are di ? erential inputs. for analog hall and for analog encoder, the adc channels have di ? erential inputs (aenc_ux_pos, aenc_ux_neg, aenc_vn_pos, aenc_vn_neg, aenc_wy_pos, aenc_wy_neg). two general purpose adc channels are single-ended analog inputs (agp i _a, agp i _b). the adc channel for measurement of supply voltage (adc_vm) is associated with the brake chopper. the foc engine expects o ? set corrected adc values, scaled into the foc engine s 16 bit (s16) 1 xed point representation. the integrated scaler and o ? set compensator maps raw adc samples of current measurement channels to 16 bit two s complement values (s16). while the o ? set is compensated by subtraction, the o ? set is represented as an unsigned value. the scaling value is signed to compensate wrong measurement direction. the s16 scaled adc values are available for read out from the register by the user. i nfo wrong scaling factors (adc_scale) or wrong o ? sets (adc_offset) might cause damages when the foc is active. i ntegrated hardware limiters allow protection - especially in the setup phase when using careful limits. adc samples for measurement of supply voltage (vm) and the general purpose analog adc inputs are available as raw values only without digital scaling. this is because these values are not processed by the foc engine. they are just additional adc channels for the user. the general purpose analog inputs (agp i ) are intended to monitor analog voltage signals representing mosfet temperature or motor temperature. agp i _a can also be used for the single pin i nterface (please see section 4.8.10 ). i nfo adc_vm must be scaled down by voltage divider to the allowed voltage range, and might require additional supply voltage spike protection. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 24 / 157 4.4.1 adc group a and adc group b adc inputs of the tmc4671 are grouped into two groups, to enable di ? erent sample rates for two groups of analog signals if needed. for all applications both groups should work with the same sampling rates. necessary to run its adc channels with a much higher bandwidth than the adc channels for current measurement. 4.4.2 i nternal delta sigma adcs the tmc4671 is equipped with internal delta sigma adcs for current measurement, supply voltage measurement, analog gp i s and analog encoder signal measurement. delta sigma adcs, as integrated within the tmc4671, together with programmable digital 1 lters are 2 exible in parameterizing concerning resolution vs. speed. the advantage of delta sigma adcs is that the user can adjust measurement from lower speed with higher resolution to higher speed with lower resolution. this 1 ts with motor control application. higher resolution is required for low speed signals, while lower resolution satis 1 es the needs for high speed signals. due to high oversampling, the analog input front-end is easier to implement than for successive approxi- mation register adcs as anti aliasing 1 lters can be chosen to a much higher cuto ? frequency. the adc engine processes all adc channels in parallel hardware - avoiding phase shifts between the channels compared to adc channels integrated in mcus. an analog voltage v_ i n of an analog input is mapped to a raw adc value adc_raw. 4.4.3 external delta sigma adcs the delta sigma front-end of the adc engine supports external delta sigma modulators to enable isolated delta sigma modulators for the tmc4671. additionally, the delta sigma front-end supports low-cost comparators together with two resistors and one capacitor (r-c-r-cmp) forming 1 rst order delta sigma modulators, as generic analog front-end for pure digital variants of the tmc4671 core. 4.4.3.1 adc raw the sampled raw adc values are available for read out by the user. this is important during the system setup phase to determine o ? set and scaling factors. 4.4.3.2 adc ext the user can write adc values into the adc_ext registers of the register bank from external sources. these values can be selected as raw current adc values by selection. adc_ext registers are primarily intended for test purposes as optional inputs for external current measurement sources. 4.5 delta sigma con 1 guration and timing con 1 guration the delta sigma con 1 guration is programmed via mcfg register that selects the mode (internal/external delta sigma modulator with 1 xed internal 100mhz system clock or with programmable mclk; delta sigma modulator clock mode (mclk output, mclk input, mclk used as mdac output with external r-c-r-cmp con 1 guration); delta sigma modulator clock and its polarity; and the polarity of the delta sigma modulator data signal mdat). ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 25 / 157 figure 14: delta sigma adc con 1 gurations dsadc_conf i g (internal: analog vs. external: mclko, mclk i , mdac) dsadc_cong i g description nc_mclko_mclk i _mdac v i n_mdat analog integrated internal adc mode, v i n_mdat is analog input v i n mclk not connected (nc) v i n (analog) mclko external dsmodulator (e.g. ad7403) with mclk input driven by mclko mclk output mdat input mclk i external dsmodulator (e.g. ad7400) with mclk output that drives mclk i mclk input mdat input mdac external dsmodulator (e.g. lm339, lm319) realized by external comparator cmp with two r and one c mdac output (= mclk out) mdat input for cmp table 7: delta sigma adc con 1 gurations ( 1 gure 14 ), selected with dsadc_mcfg_a and dsadc_mcfg_b. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 26 / 157 register function dsadc_mcfg_b delta sigma modulator con 1 guration mcfg (analog, mclk i , mclko, mdac), group b dsadc_mcfg_a delta sigma modulator con 1 guration mcfg (analog, mclk i , mclko, mdac), group a dsadc_mclk_b delta sigma modulator clock mclk, group b dsadc_mclk_a delta sigma modulator clock mclk, group a dsadc_mdec_b delta sigma decimation parameter mdec, group b dsadc_mdec_a delta sigma decimation parameter mdec, group a table 8: registers for delta sigma con 1 guration 4.5.0.1 timing con 1 guration mclk when the programmable mclk is selected, the mclk_a and mclk_b parameter registers de 1 ne the programmable clock frequency fmclk of the delta sigma modulator clock signal mclk for delta sigma modulator group a and group b. for a given target delta sigma modulator frequency fmclk, together with the internal clock frequency fclk = 100mhz, the mclk frequency parameter is calculated by mclk = 2 31  fmclk [ hz ] = fclk [ hz ] (5) due to the 32 bit s length of the mclk frequency parameter, the resulting frequency fmclk might di ? er from the desired frequency fmclk. the back calculation of the resulting frequency fmclk for a calculated mclk parameter with 32 bit length is de 1 ned by fmclk [ hz ] = fclk [ hz ]  mclk = 2 31 (6) the precise programming of the mclk frequency is primarily intended for external delta sigma modulators to meet given em i requirements. with that, the user can programm frequencies fmclk with a resolution better than 0.1 hz. this advantage concerning em i might cause trouble when using external delta signal modulators if they are sensitive to slight frequency alternating. this is not an issue when using external 1 rst-order delta sigma modulators based on r-c-r-cmp (e.g. lm339). but for external second-order delta signal modulators, it is recommended to con 1 gure the mclk parameter for frequencies fmclk with khz quantization (e.g. 10,001,000 hz instead of 10,000,001 hz). table 9 gives an overview of mclk parameter settings for di ? erent frequencies fmclk. fmclk_target mclk fmclk_resulting comment 25 mhz 0x20000000 25 mhz w/o fmclk frequency jitter, recommended 20 mhz 0x19000000 20 mhz -468750 hz recommended for ext.  modulator 20 mhz 0x19999999 20 mhz -0.03 hz might be critical for ext.  modulator 12.5 mhz 0x10000000 12.5 mhz w/o fmclk frequency jitter, recommended 10 mhz 0x0ccccccc 10 mhz -0.04 hz might be critical for ext.  modulator 10 mhz 0x0cc00000 10 mhz -39062.5 hz recommended for ext.  modulator table 9: delta sigma mclk con 1 gurations ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 27 / 157 i nfo parametrization of fmclk will be changed in a future version of the chip to match usual modulator frequencies like 10mhz and 20mhz better. i t is recommended to use a modulatorfrequency of 25khz for all applications. i f the second adc group is not needed, it is recommended to shut it o ? by setting the mclk_b register to 0x0. 4.5.0.2 decimation con 1 guration mdec the high oversampled single bit delta sigma data stream (mdat) is digitally 1 ltered by sinc3 1 lters. to get raw adc data, the actual digitally 1 ltered values need to be sampled periodically with a lower rate called decimation ratio. the decimation is controlled by parameter mdec_a for adc group a and mdec_b for adc group b. a new adc_raw value is available after mdec delta sigma pulses of mclk. as such, the parameters mclk and mdec together de 1 ne the sampling rate of the 16 bit adc_raw values. the delta sigma modulator with sinc3 1 lter works with best noise reduction performance when the length of the step response time ts i nc3 of the sinc3 1 lter is equal to the length of the pwm period tpwm = (pwm_maxcnt+1) / fpwmclk = ((pwm_maxcnt+1) * 10 ns) of the period. the length of the step function response of a sinc3 1 lter is ts i nc3 = ( 3  ( mdec 1) + 1)  tmclk (7) mdec recommended = tpwm 3  tmclk 2 (8) fmclk tmclk mdec25 (25 khz, 40 s ) mdec50 (50 khz, 20 s ) mdec100 (100 khz, 10 s ) 50 mhz 20 ns 665 331 165 25 mhz 40 ns 331 165 81 20 mhz 50 ns 265 131 65 12.5 mhz 80 ns 165 81 40 10 mhz 100 ns 131 65 31 table 10: recommended decimation parameter mdec (equation ( 8 ) for di ? erent pwm frequencies fpwm (mdec25 for fpwm=25khz w/ pwm_maxcnt=3999, mdec50 for fpwm=50khz w/ pwm_maxcnt=1999, mdec100 for fpwm=100khz w/ pwm_maxcnt=999). i nfo i nternal structure of the sinc3 and synchronization to pwm will be enhanced in future version of the chip. this might need the user s application controller software to be changed. 4.5.1 i nternal delta sigma modulators - mapping of v_raw to adc_raw generally, delta sigma modulators work best for a typical input voltage range of 25% v_max . . . 75% v_max. for the integrated delta sigma modulators, this input voltage operation range is recommended with v_max ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 28 / 157 = 5v where v_max = 3.3v is possible. the table 11 de 1 nes the recommended voltage ranges for both 5v and 3.3v analog supply voltages. v_supply[v] (v_m i n[v]) v_m i n25%[v] v_max50%[v] v_max75%[v] (v_max[v]) (3.3) (0.0) (0.825) (1.65) (2.75) (3.3) 5.0 (0.0) 1.250 2.50 3.75 (5.0) table 11: recommended input voltage range from v_m i n25%[v] to v_max75%[v] for internal delta sigma modulators; v_supply[v] = 5v is recommended for the analog part of the tmc4671. v_raw = 8 > > > < > > > : v_max for v_ i n > v_max ( v_ i n v_ref ) for v_m i n < ( v_ i n v_ref ) < v_max v_m i n for v_ i n < v_m i n (9) the resulting raw adc value is adc_raw = ( 2 16 1 )  v_raw v_max for v_m i n25%[v] < v_raw < v_max75%[v] : (10) the idealized expression (equation 9 ) is valid for recommended voltage ranges (table 11 ) neglecting deviations in linearities. these deviations primarily depend on di ? erent impedance on the analog signal path, but also on digital parameterization. finally, the deviation is quanti 1 ed in terms of resulting adc resolution. so, the delta sigma adc engine maps the analog input voltages v_raw = v_ i n - v_ref of voltage range v_m i n < v_raw < v_max to adc_raw values of range f 0 : : : (2 16 ) 1 g < = > f 0 : : : 65535 g < = > 0x0000 : : : 0xffff. vmin[v] vref[v] vmax[v] v i n[v] duty[%] adc_raw 0.0 2.5 5.0 (0.0) (0%) (0x0000) 0.0 2.5 5.0 1.0 25% 0x4000 0.0 2.5 5.0 2.5 50% 0x7 ? f 0.0 2.5 5.0 3.75 75% 0xc000 0.0 2.5 5.0 (5.0) (100%) (0x ?? ) table 12: delta sigma input voltage mapping of internal delta sigma modulators i nfo for calibrating purposes, the input voltage of the delta sigma adc inputs can be programmed to 1 xed voltages (25%, 50%, 75% of analog supply voltage) via the associated con 1 guration register ds_analog_ i nput_stage_cfg. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 29 / 157 4.5.2 external delta sigma modulator i nterface the tmc4671 is equipped with integrated digital 1 lters for extraction of adc raw values from delta sigma data stream for both internal and external delta sigma modulators. the interface for external delta sigma modulators is intended for external isolated sigma delta modulators, such as ad7401 (with mclk input driven by tmc4671), or ad7402 (with mclk output to drive tmc4671). i n addition, the external delta sigma interface supports the use of simple comparator with a r-c-r network as external low cost delta sigma modulators (r-c-r-cmp, e.g. lm339). i nfo when selecting the external delta sigma adc i nterface, the high-performance debug sp i i nterface (rtm i ) it not available in parallel due to pin sharing. the uart is always available, but with less performance than the rtm i . each external delta sigma modulator channel (dsmod) has two signals (pls. refer 1 gure 14 ), one dedicated input, and one programmable input/output. the con 1 guration of the external delta sigma modulator interface is de 1 ned by programming associated registers. when selecting external delta signal adc, the associated analog adc inputs are con 1 gured as digital inputs for the delta sigma signal data stream mdat. 4.5.3 adc con 1 guration - mdac figure 15:  adc con 1 guration - mdac (comparator-r-c-r as  -modulator) i n the mdac delta sigma modulator, the delay of the comparator cmp determines the mclk of the comparator modulator. a capacitor c m ccm p within a range of 100 pf . . . 1nf 1 ts in most cases. the time constant  rc should be in a range of 0.1 tcmp . . . tcmp of the comparator. the resistors should be in the range of 1k to 10k. the fmaxtyp depends also on the choice of the decimation ratio. cmp tcmptyp [ ns ] r mcmp [ k
] r mdac [ k
] c mcmp [ pf ] fmclkmaxtyp lm319 100 1 1 100 10 mhz lm319 100 10 10 100 1 mhz lm319 100 100 100 100 100 khz cmp tcmptyp [ ns ] r mcmp [ k
] r mdac [ k
] c mcmp [ pf ] fmclkmaxtyp lm339 1000 1 1 100 1 mhz ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 30 / 157 cmp tcmptyp [ ns ] r mcmp [ k
] r mdac [ k
] c mcmp [ pf ] fmclkmaxtyp lm339 1000 10 10 100 100 khz lm339 1000 100 100 100 10 khz table 13: delta sigma r-c-r-cmp con 1 gurations (pls. refer 14 ) ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 31 / 157 vmin[v] vref[v] vmax[v] v i n[v] duty[%] adc_raw 0.0 1.65 3.3 0.0 0% 0x0000 0.0 1.65 3.3 0.825 25% 0x4000 0.0 1.65 3.3 1.65 50% 0x7 ? f 0.0 1.65 3.3 2.475 75% 0xc000 0.0 1.65 3.3 3.3 100% 0x ?? vmin[v] vref[v] vmax[v] v i n[v] duty[%] adc_raw 0.0 2.5 5.0 0.0 0% 0x0000 0.0 2.5 5.0 1.0 25% 0x4000 0.0 2.5 5.0 2.5 50% 0x7 ? f 0.0 2.5 5.0 3.75 75% 0xc000 0.0 2.5 5.0 5.0 100% 0x ?? table 14: delta sigma input voltage mapping of external comparator (cmp) 4.6 analog signal conditioning the range of measured coil currents, resp. the measured voltages of sense resistors, needs to be mapped to the valid input voltage range of the delta sigma adc inputs. this analog preprocessing is the task of the analog signal conditioning. 4.6.0.1 chain of gains for adc raw values an adc raw value is a result of a chain of gains that determine it. a coil current i _sense 2 owing through a sense resistor causes a voltage di ? erence according to ohm s law. finally, a current is mapped to an adc raw value adc_raw = ( i _sense  adc_ga i n ) + adc_offset : (11) the adc_ga i n is a result of a chain of gains with individual signs. the sign of the adc_ga i n is positive or negative, depending on the association of connections between sense ampli 1 er inputs and the sense resistor terminals. the adc_offset is the result of electrical o ? sets of the phase current measurement signal path. for the tmc4671, the maximum adc_raw value is adc_raw_max = (2 16 1) and the minimum adc raw value is adc_raw_m i n = 0. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 32 / 157 adc_ga i n = ( i _sense_max  r_sense )  sense_ampl i f i er_ga i n  ( adc_raw_max = adc_u_max ) (12) rsense [ m
] i sense [ a ] usense [ mv ] ga i n [ v =v ] adc_ga i n [ a=v ] sense ampli 1 er 5 10 50 20 10 ad8204 10 5 50 20 5 ad8204 table 15: example parameters for adc_ga i n for the foc, the adc_raw is scaled by the adc scaler of the tmc4671 together with subtraction of o ? set to compensate it. i nternally, the tmc4671 foc engine calculates with s16 values. so, the adc scaling needs to be chosen so that the measured currents 1 t into the s16 range. with the adc scaler, the user can choose a scaling with physical units like [ ma ] . a scaling to [ ma ] covers a current range of 32 a : : : + 32 a with m [ a ] resolution. for higher currents, the user can choose unusual units like centi ampere [ ca ] covering 327 a : : : + 327 a or deci ampere 3276 a : : : + 3276 a . adc scaler and o ? set compensators are for mapping raw adc values to s16 scaled and o ? set cleaned current measurement values that are adequate for the foc. 4.6.1 foc3 - stator coil currents i _u, i _v, i _w and association to terminal voltages u_u, u_v, u_w the correct association between stator terminal voltages u_u, u_v, u_w and stator coil currents i _u, i _v, i _w is essential for the foc. for three-phase motors with three terminals u, v, w, the voltage u_u is in phase with the current i _u, u_v is in phase with i _v, and u_w is in phase with i _w according to equations ( 13 ) and ( 14 ) for foc3. u_uvw_foc3(u_d, ph i _e) = 8 > > > < > > > : u u (  e ) = u d  sin (  e ) u v (  e ) = u d  sin (  e + 120 o ) u w (  e ) = u d  sin (  e 120 o ) (13) i _uvw_foc3( i _d, ph i _e) = 8 > > > < > > > : i u (  e ) = i d  sin (  e ) i v (  e ) = i d  sin (  e + 120 o ) i w (  e ) = i d  sin (  e 120 o ) (14) ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 33 / 157 4.6.2 stator coil currents i _x, i _y and association to terminal voltages u_x, u_y for two-phase motors (stepper) with four terminals x1, x2, and y1, y2, voltage u_ux = u_x1 - u_x2 is in phase with the measured current i _x and u_wy = u_y1 - u_y2 is in phase with the measured current i _y according to equations ( 15 ) and ( 16 ) for foc2. u_xy_foc2 = 8 < : u x (  e ) = u x  sin (  e ) u y (  e ) = u y  sin (  e + 90 o ) (15) i _xy_foc2 = 8 < : i x (  e ) = i d  sin (  e ) i y (  e ) = i d  sin (  e + 90 o ) (16) 4.6.3 adc selector & adc scaler w/ o ? set correction the adc selector selects adc channels for foc. the 3-phase foc uses two of three adc channels for measurement and calculates the third channel via kirchho ? s law using the scaled and o ? set-corrected adc values. the 2-phase foc just uses two adc channels because for a 2-phase stepper motor, the two phases are independent from each other. note the open-loop encoder is useful for setting up adc channel selection, scaling, and o ? set by running a motor open-loop. the foc23 engine processes currents as 16 bit signed (s16) values. raw adc values are expanded to 16 bit width, regardless of their resolution. with this, each adc is available for read out as a 16 bit number. the adc scaler w/ o ? set correction is for the preprocessing of measured raw current values. i t might be used to map to user s own units (e.g. a or ma). for scaling, gains of current ampli 1 ers, reference voltages, and o ? sets have to be taken into account. i nfo raw adc values generally are of 16 bit width, regardless of their real resolution. i nfo the adc scaler maps raw adc values to the 16 bit signed (s16) range and centers the values to zero by removing o ? sets. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 34 / 157 figure 16: adc selector & scaler w/ o ? set correction adc o ? sets and adc scalers for the analog current measurement input channels need to be programmed into the associated registers. each adc_ i _u, adc_ i _v, adc_ i _ux, adc_ i _wy, adcsd_ i _ux, adcsd_ i _wy, adc_ i 0_ext, and adc_ i 1_ext is mapped either to adc_ i 0_raw or to adc_ i 1_raw by adc_ i 0_select and adc_ i 1_select. i n addition, the adc_offset is for conversion of unsigned adc values into signed adc values as required for the foc. adc_ i 0 = ( adc_ i 0_raw adc_ i 0_offset )  adc_ i 0_scale (17) adc_ i 1 = ( adc_ i 1_raw adc_ i 1_offset )  adc_ i 1_scale (18) for foc3, the third current adc_ i 2 is calculated via kirchho ? s law. this requires the correct scaling and o ? set correction beforehand. for foc2, there is no calculation of a third current. the adc_ux_select selects one of the three adc channels adc_ i 0 adc_ i 1, or adc_ i 2 for adc_ux. the adc_v_select selects one of the three adc channels adc_ i 0 adc_ i 1, or adc_ i 2 for adc_v. the adc_wy_select selects one of the three adc channels adc_ i 0 adc_ i 1, or adc_ i 2 for adc_wy. the adc_ux, adc_v, and adc_wy are for the foc3 (u, v, w). the adc_ux and adc_wy (x, y) are for the foc2. note the open-loop encoder is useful to run a motor open loop for setting up the adc channel selection with correct association between phase currents i _u, i _v, i _w and phase voltages u_u, u_v, u_w. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 35 / 157 4.7 encoder engine the encoder engine is an uni 1 ed position sensor interface. i t maps the selected encoder position informa- tion to electrical position (phi_e) and to mechanical position (phi_e). both are 16 bit values. the encoder engine maps single turn positions from position sensors to multi-turn positions. the user can overwrite the multi-turn position for initialization. the di ? erent position sensors are the position sources for torque and 2 ux control via foc, for velocity control, and for position control. the ph i _e_select i on selects the source of the electrical angel phi_e for the inner foc control loop. veloc i ty_select i on selects the source for velocity measurement. with phi_e selected as source for velocity measurement, one gets the electrical velocity. with the mechanical angle phi_m selected as source for velocity measurement, one gets the mechanical velocity taking the set number of pole pairs (n_pole_pa i rs) of the motor into account. nevertheless, for a highly precise positioning, it might be useful to do positioning based on the electrical angel phi_e. 4.7.1 open-loop encoder for initial system setup, the encoder engine is equipped with an open-loop position generator. this allows for turning the motor open-loop by specifying speed in rpm and acceleration in rpm/s, together with a voltage ud_ext in d direction. as such, the open-loop encoder is not a real encoder. i t simply gives positions as an encoder does. the open-loop decoder has a direction bit to de 1 ne direction of motion for the application. note the open-loop encoder is useful for initial adc setup, encoder setup, hall signal validation, and for validation of the number of pole pairs of a motor. the open- loop encoder turns a motor open with programmable velocity in unit [rpm] with programmable acceleration in unit [rpm/s]. with the open-loop encoder, the user can turn a motor without any position sensor and without any current measurement as a 1 rst step of doing the system setup. with the turning motor, the user can adjust the adc scales and o ? sets and set up positions sensors (hall, incremental encoder, . . . ) according to resolution, orientation, and direction of rotation. 4.7.2 i ncremental abn encoder the incremental encoders give two phase shifted incremental pulse signals a and b. some incremental encoders have an additional null position signal n or zero pulse signal z. an incremental encoder (called abn encoder or abz encoder) has an individual number of incremental pulses per revolution. the number of incremental pulses de 1 ne the number of positions per revolution (ppr). the ppr might mean pulses per revolution or periods per revolution. i nstead of positions per revolution, some incremental encoder vendors call these cpr counts per revolution. the ppr parameter is the most important parameter of the incremental encoder interface. with that, it forms a modulo (ppr) counter, counting from 0 to (ppr-1). depending on the direction, it counts up or down. the modulo ppr counter is mapped into the register bank as a dual ported register. the user can overwrite it with an initial position. the abn encoder interface provides both the electrical position and the multi-turn position, which are accessible through dual-ported read-write registers. note the ppr parameter must be set exactly according to the used encoder. the n pulse from an encoder triggers either sampling of the actual encoder count to fetch the position at the n pulse or it re-writes the fetched n position on an n pulse. the n pulse can either be used as stand ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 36 / 157 alone pulse or and-ed with nab = n and a and b. i t depends on the decoder what kind of n pulse has to be used - either n or nab. for those encoders with precise n pulse within one ab quadrant, the n pulse must be used. for those encoders with n pulse over four ab quadrants the user can enhance the precision of the n pulse position detection by using nab instead of n. note i ncremental encoders are available with n pulse and without n pulse. figure 17: abn i ncremental encoder n pulse the polarity of n pulse, a pulse and b pulse are programmable. the n pulse is for reinitialization with each turn of the motor. once fetched, the abn decoder can be con 1 gured to write back the fetched n pulse position with each n pulse. note the abn encoder interface has a direction bit to set to match wiring of motor to direction of encoder. logical abn = a and b and n might be useful for incremental encoders with low resolution n pulse to enhance the resolution. on the other hand, for incremental encoders with high resolution n pulse a logical abn = a and b and n might totally suppress the resulting n pulse. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 37 / 157 figure 18: encoder abn timing - high precise n pulse and less precise n pulse 4.7.3 secondary i ncremental abn encoder for commutating a motor with foc, the user selects a position sensor source (digital incremental encoder, digital hall, analog hall, analog incremental encoder, . . . ) that is mounted close to the motor. the inner foc loop controls torque and 2 ux of the motor based on the measured phase currents and the electrical angle of the rotor. the tmc4671 is equipped with a secondary incremental encoder interface. this secondary encoder interface is available as source for velocity control or position control. this is for applications where a motor with a gearing positions an object. i nfo the secondary incremental encoder is not available for commutation (phi_e) for the inner foc. i n others words, there is no electrical angle phi_e selectable from the secondary encoder. 4.7.4 digital hall sensor i nterface with optional i nterim position i nterpolation the digital hall interface is the position sensor interface for digital hall signals. the digital hall signal interface 1 rst maps the digital hall signals to an electrical position ph i _e_raw. an o ? set ph i _e_offset can be used to rotate the orientation of the hall signal angle. the electrical angle ph i _e is for commutation. optionally, the default electrical positions of the hall sensors can be adjusted by writes into the associated registers. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 38 / 157 figure 19: hall sensor angles hall sensors give absolute positions within an electrical period with a resolution of 60 as 16 bit positions (s16 resp. u16) ph i . with activated interim hall position interpolation, the user gets high resolution interim positions when the motor is running at a speed above 60 rpm. 4.7.5 digital hall sensor - i nterim position i nterpolation for lower torque ripple the user can switch on the position interpolation of interim hall positions. this function is useful for motors that are compatible with sine wave commutation, but equipped with digital hall sensors. when the position interpolation is switched on, it becomes active on speeds above 60 rpm. for lower speeds it automatically disables itself. this is especially important when the motor has to be at rest. hall sensor position interpolation might fail when hall sensors are not properly placed in the motor. please adjust hall sensor positions for this case. 4.7.6 digital hall sensors - masking and filtering sometimes digital hall sensor signals get disturbed by switching events in the power stage. the tmc4671 can automatically mask switching distortions by correct setting of the hall_mask i ng register. when a switching event occurs, the hall sensor signals are held for hall_mask i ng value times 10 ns. this way, hall sensor distortions are eliminated. uncorrelated distortions can be 1 ltered via a digital 1 lter of con 1 gurable length. i f the input signal to the 1 lter does not change for hall_d i g_f i lter_length times 5 us, the signal can pass the 1 lter. this 1 lter eliminates issues with bouncing hall signals. 4.7.7 digital hall sensors together with i ncremental encoder i f a motor is equipped with both hall sensors and incremental encoder, the hall sensors can be used for the initialization as a low resolution absolute position sensor. later on, the incremental encoder can be used as a high resolution sensor for commutation. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 39 / 157 4.7.8 analog hall and analog encoder i nterface (sincos of 0 90 or 0 120 240) an analog encoder interface is part of the decoder engine. i t is able to handle analog position signals of 0 and 90 and of 0 120 240. the analog decoder engine adds o ? sets and scales the raw analog encoder signals, while also calculating the electrical angle ph i _e from these analog position signals by an atan2 algorithm. figure 20: analog encoder (aenc) signal waveforms an individual signed o ? set is added to each associated raw adc channel and scaled by its associated scaling factors according to aenc_value = ( aenc_raw + aenc_offset )  aenc_scale (19) i n addition, the aenc_offset is for conversion of unsigned adc values into signed adc values as required for the foc. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com sin/cos hall track sin track cos 3-phase analog hall track 0 track 120 track 240 sin/cos with 10 ppr track sin track cos
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 40 / 157 figure 21: analog encoder (aenc) selector & scaler w/ o ? set correction i n fig. 20 possible waveforms are shown. the graphs show usual s i n/cos track signals with one and multi- ple periods per revolution as well as typical waveforms of three phase analog hall signals for one electrical revolution. the number of periods per revolution can be con 1 gured by register aenc_decoder_ppr. the position in one period (aenc_decoder_ph i _a) is calculated by an atan2 algorithm. the periods are counted with respect to the number of periods per revolution to calculate aenc_decoder_ph i _e and aenc_decoder_ph i _m. i f ppr is the same as the number of pole pairs, aenc_decoder_ph i _e and aenc_decoder_ph i _a are identical. this is usually the case for analog hall signals. i nfo the analog n pulse is just a raw adc value. handling of analog n pulse similar to n pulse handling of digital encoder n pulse is not implemented for analog encoder. 4.7.9 analog position decoder (sincos of 090 or 0120240) the extracted positions from the analog decoder are available for read out from registers. 4.7.9.1 multi-turn counter electrical angles are mapped to a multi-turn position counter. the user can overwrite this multi-turn position for initialization purposes. 4.7.9.2 encoder engine phi selector the angle selector selects the source for the commutation angle ph i _e. that electrical angle is available for commutation. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 41 / 157 4.7.9.3 external position register a register value written into the register bank via the application interface is available for commutation as well. with this, the user can interface to any encoder by just writing positions extracted from external encoder into this regulator. from the decoder engine point of view this is just one more selectable encoder source. 4.7.10 encoder i nitialization support the tmc4671 needs proper feedback for correct and stable operation. one main parameter is the com- mutation angle o ? set ph i _e_offset. this o ? set must not be calculated when an absolute sensor system like analog or digital hall sensors is used. all other supported feedback systems need to be initialized - their ph i _e_offsets need to be identi 1 ed. the user has several options to determine ph i _e_offset with support of the tmc4671. 4.7.10.1 encoder i nitialization in open-loop mode i n the case of a free driving motor, the motor can be switched to open-loop mode. i n this mode, the used commutation angle (ph i _open_loop) can be used to match the measured ph i _e. this method is supported by the tmcl- i de. 4.7.10.2 encoder i nitialization by minimal movement i f the motor shall not make a big move during initialization, the mot i on_mode encoder_ i n i t_m i n i _move can be used which determines ph i _e_offset by ramping up the 2 ux and controlling the movement to a minimum by manipulating the used ph i _e_offset. after the procedure is 1 nished, the estimated ph i _e_offset can be read from the register and used as the corresponding ph i _e_offset for the feedback system. figure 22: encoder i nitialization by minimal movement the 2 ux ramping can be controlled by setting the u_d_ i nkr - which manipulates the slope of the ramp. the maximum voltage can be set by the parameter u_d_max. during operation, the current is monitored and the process is stopped when the current limit i _d_max is reached. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 42 / 157 figure 23: flux ramping i nfo for correct operation of this module a few parameters have to be set. please try tr i nam i c tmcl- i de support for 1 rst usage and parameter tuning. 4.7.10.3 encoder i nitialization by hall sensors the tmc4671 can calculate ph i _e_offset very precisely at a hall state change for a second encoder system, when hall sensors are correctly aligned. therefore, the function needs to be enabled and calculate a new o ? set at the next hall state change. after disabling of the module, the process can be started again. this function can also be used as a rough plausibility check during longer operation. 4.7.10.4 encoder i nitialization by n pulse detection after determination of a correct o ? set, the value can be used again after power cycle. the encoder s n pulse can be used as reference for this. for starters the user can drive the motor in open-loop mode or by using digital hall sensor signals. after passing the encoder s n pulse, the abn encoder is initialized and can be used for operation. 4.7.11 velocity measurement servo control comprises position, velocity and current control. the position and the current are measured by separate sensors. the actual velocity has to be calculated by time discrete di ? erentiation from the position signal. the user can choose a calculated position from the various encoder interfaces for velocity measurement by parameter veloc i ty_select i on. the user can switch between two di ? erent velocity calculation algorithms with the parameter veloc- i ty_meter_select i on. default setting (veloc i ty_meter_select i on = 0) is the standard velocity meter, which calculates the velocity at a sampling rate of about 4369.067 hz by di ? erentiation. output value is displayed in rpm (revolutions per minute). this option is recommended for usage with the standard p i controller structure. by choosing the second option (veloc i ty_meter_select i on = 1), the sampling frequency is synchronized to the pwm frequency. this option is recommended for usage with the advanced p i controller structure. otherwise, the controller structure might tend to be unstable due to non-matched sampling. velocity 1 lters can be applied to reduce noise on velocity signals. section 4.9 describes 1 ltering opportuni- ties in detail. 4.7.12 reference switches the tmc4671 is equipped with three input pins for reference switches (ref_sw_l, ref_sw_h and ref_sw_r). these pins can be used to determine three reference positions. the tmc4671 displays the status of the reference switches in the register tmc_ i nputs_raw and is able to store the actual position at rising ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 43 / 157 edge of the corresponding signal. the signal polarities are programmable and the module reacts only on toggling the enable register. the signals can be 1 ltered with a con 1 gurable digital 1 lter, which suppresses spike errors. 4.8 foc23 engine i nfo support for the tmc4671 is integrated into the tmcl- i de including wizards for set up and con 1 guration. with the tmcl- i de, con 1 guration and operation can be done in a few steps and the user gets direct access to all registers of the tmc4671. the foc23 engine performs the inner current control loop for the torque current i q and the 2 ux current i d including the required transformations. programmable limiters take care of clipping of interim results. per default, the programmable circular limiter clips u_d and u_q to u_d_r = p ( 2)  u_q and u_r_r = p ( 2)  u_d. p i controllers perform the regulation tasks. 4.8.1 p i controllers p i controllers are used for current control and velocity control. a p controller is used for position control. the derivative part is not yet supported but might be added in the future. the user can choose between two p i controller structures: the classic p i controller structure, which is also used in the tmc4670, and the advanced p i controller structure. the advanced p i controller structure shows better performance in dynamics and is recommended for high performance applications. user can switch between controllers by setting register mode_p i d_type. controller type can not be switched individually for each cascade level. 4.8.2 p i controller calculations - classic structure the p i controllers in the classic structure perform the following calculation dxdt = p  e + i  z t 0 e(t) d t (20) with e = x_target x (21) where x_target stands for target 2 ux, target torque, target velocity, or target position with error e, which is the di ? erence between target value and actual values. the time constant d t is 1 s with the integral part is divided by 256. i nfo changing the i -parameter of the classic p i controller during operation causes the controller output to jump, as the control error is 1 rst integrated and then gained by the i parameter. be careful during controller tuning or use the advanced p i controller structure instead. the normalization of the p i parameters might be changed due to low performance at high pwm frequencies. this will need small changes in user s application controller software. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 44 / 157 4.8.3 p i controller calculations - advanced structure the p i controllers in the advanced controller structure perform the calculation dxdt = p  e + z t 0 p  i  e(t) d t (22) with e = x_target x (23) where x_target represents target 2 ux, target torque, target velocity, or target position with control error e, which is the di ? erence between target value and actual values. the time constant d t is set according to the pwm period but can be downsampled for the velocity and position controller by register mode_p i d_smpl. velocity and position controller evaluation can be down-sampled by a constant factor when needed. figure 24: advanced p i controller i nfo the p i velocity controller will be given a derivative part (so it will be a p i d controller) in a future version of the chip. also, the normalization of the p i parameters might be changed due to low performance at high pwm frequencies. this will need changes in the user s application controller software. i nfo the p factor in the advanced position controller is not properly scaled. due to the high gain in velocity control loop, the position controller gain should be respectively low. the p factor normalization of q8.8 does not match these needs. this will be changed in a future version of the chip to a di ? erent q format. this change will need changes in the user s application controller software. we recommend to use the classical p i control structure if performance is not su z cient. 4.8.4 p i controller - clipping the limiting of target values for p i controllers and output values of p i controllers is programmable. per power on default these limits are set to maximum values. during initialization, these limits should be set properly for correct operation and clipping. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 45 / 157 the target input is clipped to x_target_l i m i t. the output of a p i controller is named dxdt because it gives the desired derivative d/dt as a target value to the following stage: the position (x) controller gives velocity (dx/dt). the output of the p i controller is clipped to dxdt_l i m i t. the error integral of ( 20 ) is clipped to dxdt_l i m i t / i in the classic controller structure, and the integrator output is clipped to dxdt_output_limit in the advanced controller structure. figure 25: p i controllers for position, velocity and current 4.8.5 p i flux & p i torque controller the p part is represented as q8.8 and i is the i part represented as q0.15. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 46 / 157 4.8.6 p i velocity controller the p part is represented as q8.8 and i is the i part represented as q0.15. 4.8.7 p position controller for the position regulator, the p part is represented as q4.12 to be compatible with the high resolution positions - one single rotation is handled as an s16. for the advanced controller structure the p part is represented by q8.8. 4.8.8 i nner foc control loop - flux & torque the inner foc loop ( 1 gure 26 ) controls the 2 ux current to the 2 ux target value and the torque current to the desired torque target. the inner foc loop performs the desired transformations according to 1 gure 27 for 3-phase motors (foc3). for 2-phase motors (foc2) both clarke (clarke) transformation and inverse clarke (iclarke) are bypassed. for control of dc motors, transformations are bypassed and only the 1 rst full bridge (connected to x1 and x2) is used. the inner foc control loop gets a target torque value ( i _q_target) which represents acceleration, the rotor position, and the measured currents as input data. together with the programmed p and i parameters, the inner foc loop calculates the target voltage values as input for the pwm engine. figure 26: i nner foc control loop 4.8.9 foc transformations and p i (d) for control of flux & torque the clarke transformation (clarke) maps three motor phase currents ( i u , i v , i w ) to a two-dimensional coordinate system with two currents ( i , i ). based on the actual rotor angle determined by an encoder or via sensorless techniques, the park transformation (park) maps these two currents to a quasi-static coordinate system with two currents ( i d , i q ). the current i d represents 2 ux and the current i q represents torque. the 2 ux just pulls on the rotor but does not a ? ect torque. the torque is a ? ected by i q . two p i controllers determine two voltages ( u d , u q ) to drive desired currents for a target torque and a target 2 ux. the determined voltages ( u d , u q ) are re-transformed into the stator system by the inverse park transformation (ipark). the inverse clarke transformation (iclarke) transforms these two currents into three voltages ( u u , u v , u w ). theses three voltage are the input of the pwm engine to drive the power stage. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 47 / 157 i n case of the foc2, clarke transformation clarke and inverse clarke transformation iclarke are skipped. figure 27: foc3 transformations (foc2 just skips clarke and iclarke) 4.8.10 motion modes the user can operate the tmc4671 in several motion modes. standard motion modes are position control, velocity control and torque control, where target values are fed into the controllers via register access. the motion mode ud_uq_extern allows the user to set voltages for open-loop operation and for tests during setup. figure 28: standard motion modes ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 48 / 157 i n position control mode, the user can feed the step and direction interface to generate a position target value for the controller cascade. additional motion modes are the motion mode for encoder initialisation (encoder_ i n i t_m i n i _move), and motion modes where target values are fed into the tmc4671 via pwm interface (pin: pwm_ i n) or analog input via pin agp i _a. there are additional motion modes, which are using input from the pwm_ i input or the agp i _a input. i nput signals can be scaled via a standard scaler providing o ? set and gain correction. the interface can be con 1 gured via the registers s i ngle_p i n_ i f_offset_scale and s i ngle_p i n_ i f_status_cfg, where the status of the interface can be monitored as well. pwm input signals which are out of frequency range can be neglected. i n case of wrong input data, last correct position is used or velocity and torque are set to zero. number motion mode description 0 stopped mode disabling all controllers 1 torque mode standard torque control mode 2 velocity mode standard velocity control mode 3 position mode standard position control mode 4 prbs flux mode prbs value is used as target flux value for i dent. 5 prbs torque mode prbs value is used as target torque value for i dent. 6 prbs velocity mode prbs value is used as target velocity value for i dent. 7 prbs position mode prbs value is used as target position value for i dent. 8 uq ud ext mode voltage control mode (software mode) 9 encoder i nit mini move mode encoder i nitialization by minimal movement of the rotor. 10 agp i _a torque mode agp i _a used as target torque value 11 agp i _a velocity mode agp i _a used as target velocity value 12 agp i _a position mode agp i _a used as target position value 13 pwm_ i torque mode pwm_ i used as target torque value 14 pwm_ i velocity mode pwm_ i used as target velocity value 15 pwm_ i position mode pwm_ i used as target position value table 16: motion modes 4.8.11 brake chopper during regenerative braking of the motor, current is driven into the dc link. i f the power frontend is not actively controlled, the dc link voltage will rise. the brake chopper output pin (brake) can be used for control of an external brake chopper, which burns energy over a brake resistor. the brake pin is set to high for a complete pwm cycle if measured voltage is higher then adc_vm_l i m i t_h i gh. once active it will be deactivated when voltage drops below adc_vm_l i m i t_low. this acts like a hysteresis. brake can be deactivated by setting both registers to zero. by setting proper values in the registers it is automatically enabled. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 49 / 157 4.9 filtering and feed-forward control the tmc4671 uses di ? erent 1 lters for certain target and actual values. when using standard velocity meter, a standard velocity 1 lter is used which is optimized for velocity signals from hall sensors. additional biquad 1 lters can be used to suppress measurement noise or damp resonances. 4.9.1 biquad filters the tmc4671 uses standard biquad 1 lters (standard ii r 1 lter of second order) in the following structure. y(n) = x(n)  b_0 + x(n-1)  b_1 + x(n-2)  b_2 + y(n-1)  a_1 + y(n-2)  a_2 (24) i n this equation x(n) is the actual input sample, while y(n-1) is the 1 lter output of the last cycle. all coe z cients are s32 values and are normalized to a q3.29 format. users must take care of correct parametrization of the 1 lter. there is no built-in plausibility or stability check. all 1 lters can be disabled or enabled via register access. biquad state variables are reset when parameters are changed. the tr i nam i c i de supports parametrization with wizards. a standard biquad 1 lter has the following transfer function in the laplace-domain: g(s) = b_2_cont  s 2 + b_1_cont  s + b_0_cont a_2_cont  s 2 + a_1_cont  s + a_0_cont (25) ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 50 / 157 the transfer function needs to be transformed to time discrete domain by z-transformation and coe z - cients need to be normalized. this is done by the following equations. b _ 2 _ z = ( b _ 0 _ cont  t 2 + 2  b _ 1 _ cont  t + 4  b _ 2 _ cont ) = ( t 2 2  a _ 1 _ cont  t + 4  a _ 2 _ cont ) (26) b _ 1 _ z = (2  b _ 0 _ cont  t 2 8  b _ 2 _ cont ) = ( t 2 2  a _ 1 _ cont  t + 4  a _ 2 _ cont ) (27) b _ 0 _ z = ( b _ 0 _ cont  t 2 2  b _ 1 _ cont  t + 4  b _ 2 _ cont ) = ( t 2 2  a _ 1 _ cont  t + 4  a _ 2 _ cont ) (28) a _ 2 _ z = ( t 2 + 2  a _ 1 _ cont  t + 4  a _ 2 _ cont ) = ( t 2 2  a _ 1 _ cont  t + 4  a _ 2 _ cont ) (29) a _ 1 _ z = (2  t 2 8  a _ 2 _ cont ) = ( t 2 2  a _ 1 _ cont  t + 4  a _ 2 _ cont ) (30) b _ 0 = round ( b _ 0 _ z  2 29 ) (31) b _ 1 = round ( b _ 1 _ z  2 29 ) (32) b _ 2 = round ( b _ 2 _ z  2 29 ) (33) a _ 1 = round ( a _ 1 _ z  2 29 ) (34) a _ 2 = round ( a _ 2 _ z  2 29 ) (35) while t is the sampling time according to pwm_max_count  10 ns and variables with index z are auxiliary variables. there are four biquad 1 lters in the control structure. figure 29 illustrates their placement in the control structure. figure 29: biquad filters the biquad 1 lter for the position target value is intended to be used as a low-pass 1 lter for smoothening position input to the control structure. i t is evaluated in every pwm cycle, or down-sampled according to the down-sampling factor for the velocity and position controllers. after powering on it is disabled. the biquad 1 lter for the 2 ux target value is also intended to be used as a low-pass 1 lter for input values from the user s microcontroller. sampling frequency is 1 xed to the pwm frequency. the biquad 1 lter for the torque target value can be used as a low-pass 1 lter for bandwidth limitation and noise suppression. moreover, it can be designed to suppress a resonance or anti-resonance. same ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 51 / 157 statements are correct for the velocity biquad 1 lter. both 1 lters sampling times are 1 xed to the pwm period. the velocity target value biquad is con 1 gured as a second order low-pass with a cuto ? frequency at 200 hz - by default at a sampling frequency of 25 khz. biquad 1 lters can be activated separately. 4.9.2 standard velocity filter by using the standard velocity measurement algorithm, the default velocity 1 lter is enabled and can not be switched o ? . the standard velocity 1 lter is a low-pass 1 lter with a cuto ? frequency of 20 hz (slope of -20 db/decade). i n this con 1 guration, a new velocity is calculated at a sample rate of approx. 4369.067 hz. this con 1 guration is intended to be used in low-performance applications with a simple position feedback system like digital hall sensors. 4.9.3 feed-forward control structure the tmc4671 provides a feed-forward control structure for torque target value and velocity target value. the structure is intended to support controllers at high dynamic input pro 1 les. i t can be switched on when using the advanced p i controller structure. the feed-forward value is calculated with a dt1 ( 30 ) element. each dt1 element can be parametrized with two parameters. figure 30: dt1 element structure equations: e = x int_val (36) int_val = z e dt (37) y = b_1  e (38) the coe z cients a_0 and b_1 are represented in q2.30 format. registers for parametrization of feed-forward control structure are feed_forward_velocity_gain, feed_forward_velocity_ 1 lter_constant, feed_forward_torque_gain, and feed_forward_torque_ 1 lter_constant. the input target value to the velocity feed-forward entity is the 1 ltered position target value. for the torque feed-forward entity the output of the velocity feed-forward entity is used. sampling time for both entities integrators is 1 xed to the pwm frequency. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 52 / 157 the feed-forward control structure can be activated via register mode_ff. with mode_ff set to zero, the control structure is deactivated, value 1 activates feed-forward control from position target to velocity target and value 2 activates additionally the torque feed-forward path. registers ff_veloc i ty and ff_torque display internally calculated feed-forward values. 4.10 pwm engine the pwm engine takes care of converting voltage vectors to pulse width modulated (pwm) control signals. these digital pwm signals control the gate drivers of the power stage. for a detailed description of the pwm control registers and pwm register control bits pls. refer section 6 page 56 . the ease-of-use pwm engine requires just a couple of parameter settings. primarily, the polarities for the gate control signal of high-side and low-side must be set. the power on default pwm mode is 0, meaning pwm = off. for operation, the centered pwm mode must be switched on by setting the pwm mode to 7. a single bit switches the space vector pwm (svpwm) on. for 3-phase pmsm, the svpwm = on gives more e ? ective voltage. nevertheless, for some applications it makes sense to switch the svpwm = off to keep the star point voltage of a motor almost at rest. 4.10.1 pwm polarities the pwm polarities register (pwm_polar i t i es) controls the polarities of the control signals. positive polarity for gate control means 1 represents on and 0 represents off. the gate control signal polarities are individually programmable for low-side gate control and for high-side gate control. the pwm polarities register controls the polarity of other control signals as well. 4.10.2 pwm frequency the pwm counter maximum length register pwm_maxcnt controls the pwm frequency. for a clock frequency fclk = 25 mhz, the pwm frequency fpwm[hz] = (4.0  fclk [hz]) / (pwm_maxcnt + 1). with fclk = 25 mhz and power-on reset (por) default of pwm_maxcnt=3999, the pwm frequency fpwm = 25 khz. the pwm frequency fpwm is recommended to be in the range of 25 khz to 100 khz by setting pwm_maxcnt between 3999 to 999. note the pwm frequency is the fundamental frequency of the control system. i t can be changed at any time, also during motion for the classic p i controller structure. the advanced p i controller structure is tied to the pwm frequency and integrator gains have to be changed. please make sure to set current measurement decimation rates to 1 t pwm period in high performance applications. i nfo please be informed that later versions of the chip will support lower pwm fre- quencies. this might a ? ect the user s software. 4.10.3 pwm resolution the base resolution of the pwm is 12 bit internally mapped to 16 bit range. the minimal pwm increment is 20ns due to the symmetrical pwm with 100 mhz counter frequency. max_pwmcnt = 4095 gives the full resolution of 12 bit with  25 khz w/ fclk=25 mhz. max_pwmcnt=2047 results in 11 bit resolution, but with  50khz w/ fclk=25 mhz. so the pwm_maxcnt de 1 nes the pwm frequency, but also a ? ects the resolution of the pwm. i nfo the pwm resolution might be increased in a future version of the chip. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 53 / 157 4.10.4 pwm modes the power-on reset (por) default of the pwm is off. the standard pwm scheme is the centered pwm. passive braking and freewheeling modes are available on demand. please refer to section 6 concerning the settings. i nfo the pwm modes might be changed in a future version of the chip to support so-called two-switch modulation or 2 at-bottom modulation. 4.10.5 break-before-make (bbm) one register controls bbm time for the high side, another register controls bbm time for the low side. the bbm times are programmable in 10 ns steps. the bbm time can be set to zero for gate drivers that have their own integrated bbm timers. figure 31: bbm timing i nfo measured bbm times at mos-fet gates di ? er from programmed bbm times due to driver delays and possible additional gate driver bbm times. the programmed bbm times are for the digital control signals. note too short bbm times cause electrical shortcuts of the mos-fet bridges - so called shoot through - that short the power supply and might damage the power stage and the power supply. i nfo bbm time registers might be changed in a future version of this chip to support longer bbm times then 2.55 us. 4.10.6 space vector pwm (svpwm) note the space vector pwm does not allow higher voltage utilization. this will be 1 xed in next version of the chip. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 54 / 157 a single bit enables the space vector pwm (svpwm). no further settings are required for the space vector pwm - just on or off. the power on default for the svpwm is off. space vector pwm can be enabled to maximize voltage utilization in the case of an isolated star point of the motor. i f the star point is not isolated, unintended current 2 ows through the star point. space vector pwm is only used for three-phase motors. for other motors the svpwm must be switched o ? . 5 safety functions di ? erent safety functions are integrated and mapped to status bits. a programmable mask register selects bits for activation of the status output. i nternal hardware limiters for real time clipping and monitoring of interim values are available. l i m i t or l i m i ts is part of register names of registers associated to internal limiters. please refer to table 17 . bit source 0 pid_x_target_limit 1 pid_x_target_ddt_limit 2 pid_x_errsum_limit 3 pid_x_output_limit 4 pid_v_target_limit 5 pid_v_target_ddt_limit 6 pid_v_errsum_limit 7 pid_v_output_limit 8 pid_id_target_limit 9 pid_id_target_ddt_limit 10 pid_id_errsum_limit 11 pid_id_output_limit 12 pid_iq_target_limit 13 pid_iq_target_ddt_limit 14 pid_iq_errsum_limit 15 pid_iq_output_limit 16 ipark_cirlim_limit_u_d 17 ipark_cirlim_limit_u_q 18 ipark_cirlim_limit_u_r 19 not_pll_locked 20 ref_sw_r 21 ref_sw_h 22 ref_sw_l 23 - ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 55 / 157 24 pwm_min 25 pwm_max 26 adc_i_clipped 27 adc_aenc_clipped 28 enc_n 29 enc2_n 30 aenc_n 31 wd_error table 17: status flags register all controllers have input limiters as o ? sets can be added to target values and they can be limited to remain in certain ranges. also all controller outputs can be limited and the integrating parts (error sums) of the p i controllers are also limited to controller outputs. i f d/dt-limiters are enabled they are also capable of limiting target values. i f one of these limiters gets active, the 2 ag will go to high state. this is usually a normal operation, when controllers are working on the borders of their working area. with status_mask register corresponding 2 ags can be activated. other status 2 ags go to high state whether the voltage limitation is reached (circular limiter in ipark transformation) or pwm is saturated (pwm_min and pwm_max). this is also usual operation as the current controller has to deal with voltage limitation at high velocity operation. the user can also use the status output to generate an i rq on reference switch or n-channel of encoder. also adc clipping can be monitored which is a good indicator of wrong or faulty behaviour. remaining wd_error status 2 ag indicates an error on the clock input of the tmc4671 (see following section). 5.1 watchdog the tmc4671 uses an internal rc oscillator to monitor the clock input signal clk. i f during operation the clk signal is lost, the user can program the tmc4671 for di ? erent responses via register watchdog_cfg. power on default action is: no action, otherwise the enable_out signal can be removed to disable the power stage or the tmc4671 can be reset. i nfo the reset option does not work in the tmc4671-es. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 56 / 157 6 register map the tmc4671 has an register address range of 128 addresses with registers up to 32 bit data width. some registers hold 32 bit data, some hold 2 x 16 bit data and other hold combinations of data de 1 ned by data masks. this section descibes the register bank of the tmc4671. section 6.1 gives an overview over all registers and section 6.2 gives the detailed description of all registers. 6.1 register map overview address registername access 0x00 h ch i p i nfo_data r 0x01 h ch i p i nfo_addr rw 0x02 h adc_raw_data r 0x03 h adc_raw_addr rw 0x04 h dsadc_mcfg_b_mcfg_a rw 0x05 h dsadc_mclk_a rw 0x06 h dsadc_mclk_b rw 0x07 h dsadc_mdec_b_mdec_a rw 0x08 h adc_ i 1_scale_offset rw 0x09 h adc_ i 0_scale_offset rw 0x0a h adc_ i _select rw 0x0b h adc_ i 1_ i 0_ext rw 0x0c h ds_analog_ i nput_stage_cfg rw 0x0d h aenc_0_scale_offset rw 0x0e h aenc_1_scale_offset rw 0x0f h aenc_2_scale_offset rw 0x11 h aenc_select rw 0x12 h adc_ i wy_ i ux r 0x13 h adc_ i v r 0x15 h aenc_wy_ux r 0x16 h aenc_vn r 0x17 h pwm_polar i t i es rw 0x18 h pwm_maxcnt rw 0x19 h pwm_bbm_h_bbm_l rw 0x1a h pwm_sv_chop rw 0x1b h motor_type_n_pole_pa i rs rw 0x1c h ph i _e_ext rw ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 57 / 157 address registername access 0x1d h ph i _m_ext rw 0x1e h pos i t i on_ext rw 0x1f h openloop_mode rw 0x20 h openloop_accelerat i on rw 0x21 h openloop_veloc i ty_target rw 0x22 h openloop_veloc i ty_actual rw 0x23 h openloop_ph i rw i 0x24 h uq_ud_ext rw 0x25 h abn_decoder_mode rw 0x26 h abn_decoder_ppr rw 0x27 h abn_decoder_count rw 0x28 h abn_decoder_count_n rw 0x29 h abn_decoder_ph i _e_ph i _m_offset rw 0x2a h abn_decoder_ph i _e_ph i _m r 0x2c h abn_2_decoder_mode rw 0x2d h abn_2_decoder_ppr rw 0x2e h abn_2_decoder_count rw 0x2f h abn_2_decoder_count_n rw 0x30 h abn_2_decoder_ph i _m_offset rw 0x31 h abn_2_decoder_ph i _m r 0x33 h hall_mode rw 0x34 h hall_pos i t i on_060_000 rw 0x35 h hall_pos i t i on_180_120 rw 0x36 h hall_pos i t i on_300_240 rw 0x37 h hall_ph i _e_ph i _m_offset rw 0x38 h hall_dph i _max rw 0x39 h hall_ph i _e_ i nterpolated_ph i _e r 0x3a h hall_ph i _m r 0x3b h aenc_decoder_mode rw 0x3c h aenc_decoder_n_threshold rw 0x3d h aenc_decoder_ph i _a_raw r 0x3e h aenc_decoder_ph i _a_offset rw 0x3f h aenc_decoder_ph i _a r 0x40 h aenc_decoder_ppr rw ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 58 / 157 address registername access 0x41 h aenc_decoder_count r 0x42 h aenc_decoder_count_n rw 0x45 h aenc_decoder_ph i _e_ph i _m_offset rw 0x46 h aenc_decoder_ph i _e_ph i _m r 0x47 h aenc_decoder_pos i t i on r 0x4d h conf i g_data rw 0x4e h conf i g_addr rw 0x50 h veloc i ty_select i on rw 0x51 h pos i t i on_select i on rw 0x52 h ph i _e_select i on rw 0x53 h ph i _e r 0x54 h p i d_flux_p_flux_ i rw 0x56 h p i d_torque_p_torque_ i rw 0x58 h p i d_veloc i ty_p_veloc i ty_ i rw 0x5a h p i d_pos i t i on_p_pos i t i on_ i rw 0x5c h p i d_torque_flux_target_ddt_l i m i ts rw 0x5d h p i dout_uq_ud_l i m i ts rw 0x5e h p i d_torque_flux_l i m i ts rw 0x5f h p i d_accelerat i on_l i m i t rw 0x60 h p i d_veloc i ty_l i m i t rw 0x61 h p i d_pos i t i on_l i m i t_low rw 0x62 h p i d_pos i t i on_l i m i t_h i gh rw 0x63 h mode_ramp_mode_mot i on rw 0x64 h p i d_torque_flux_target rw 0x65 h p i d_torque_flux_offset rw 0x66 h p i d_veloc i ty_target rw 0x67 h p i d_veloc i ty_offset rw 0x68 h p i d_pos i t i on_target rw 0x69 h p i d_torque_flux_actual r 0x6a h p i d_veloc i ty_actual r 0x6b h p i d_pos i t i on_actual rw 0x6c h p i d_error_data r 0x6d h p i d_error_addr rw 0x6e h i nter i m_data rw ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 59 / 157 address registername access 0x6f h i nter i m_addr rw 0x74 h watchdog_cfg rw 0x75 h adc_vm_l i m i ts rw 0x76 h tmc4671_ i nputs_raw r 0x77 h tmc4671_outputs_raw r 0x78 h step_w i dth rw 0x79 h uart_bps rw 0x7a h uart_addrs rw 0x7b h gp i o_dsadc i _conf i g rw 0x7c h status_flags rw 0x7d h status_mask rw table 18: tmc4671 registers ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 60 / 157 6.2 register map full register map for tmc4671 address registername access 0x00 h ch i p i nfo_data r variant 0 mask name type 0xffffffff h s i _type asc ii min max default unit 0 4294967295 0 hardware type (asc ii ). variant 1 mask name type 0xffffffff h s i _vers i on version min max default unit 0 4294967295 0 hardware version (u16.u16). variant 2 mask name type 0xffffffff h s i _date date min max default unit 0 4294967295 0 hardware date (nibble wise date stamp yyyymmdd). variant 3 mask name type 0xffffffff h s i _t i me time min max default unit 0 16777215 0 hardware time (nibble wise time stamp C hhmmss) variant 4 mask name type 0xffffffff h s i _var i ant unsigned min max default unit 0 4294967295 0 variant 5 mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 61 / 157 address registername access 0xffffffff h s i _bu i ld unsigned min max default unit 0 4294967295 0 0x01 h ch i p i nfo_addr rw mask name type 0x000000ff h ch i p_ i nfo_address choice min max default unit 0 5 0 0: s i _type 1: s i _vers i on 2: s i _date 3: s i _t i me 4: s i _var i ant 5: s i _bu i ld 0x02 h adc_raw_data r variant 0 mask name type 0x0000ffff h adc_ i 0_raw unsigned min max default unit 0 65535 0 raw phase current i 0 mask name type 0xffff0000 h adc_ i 1_raw unsigned min max default unit 0 65535 0 raw phase current i 1 variant 1 mask name type 0x0000ffff h adc_vm_raw unsigned min max default unit 0 65535 0 aw supply voltage value. mask name type 0xffff0000 h adc_agp i _a_raw unsigned min max default unit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 62 / 157 address registername access 0 65535 0 raw analog gpi a value. variant 2 mask name type 0x0000ffff h adc_agp i _b_raw unsigned min max default unit 0 65535 0 raw analog gpi b value. mask name type 0xffff0000 h adc_aenc_ux_raw unsigned min max default unit 0 65535 0 raw analog encoder signal. variant 3 mask name type 0x0000ffff h adc_aenc_vn_raw unsigned min max default unit 0 65535 0 raw analog encoder signal. mask name type 0xffff0000 h adc_aenc_wy_raw unsigned min max default unit 0 65535 0 raw analog encoder signal. 0x03 h adc_raw_addr rw mask name type 0x000000ff h adc_raw_addr choice min max default unit 0 3 0 0: adc_ i 1_raw & adc_ i 0_raw 1: adc_agp i _a_raw & adc_vm_raw 2: adc_aenc_ux_raw & adc_agp i _b_raw 3: adc_aenc_wy_raw & adc_aenc_vn_raw 0x04 h dsadc_mcfg_b_mcfg_a rw mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 63 / 157 address registername access 0x00000003 h cfg_dsmodulator_a choice min max default unit 0 3 0 0: int. dsmod 1: ext. dsmod with mclk input 2: ext. dsmod with mclk output 3: ext. dsmod with ext. cmp mask name type 0x00000004 h mclk_polarity_a bool min max default unit 0 1 0 0: data is sampled on rising edge 1: data is sampled on falling edge mask name type 0x00000008 h mdat_polarity_a bool min max default unit 0 1 0 0: mdat is not inverted 1: mdat is inverted mask name type 0x00000010 h sel_nclk_mclk_i_a bool min max default unit 0 1 0 0: mclk is used (divided clock) 1: clk (100 mhz) is used mask name type 0x000000ff00 h blanking_a unsigned min max default unit 0 255 0 mask name type 0x00030000 h cfg_dsmodulator_b choice min max default unit 0 3 0 0: int. dsmod 1: ext. dsmod with mclk input ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 64 / 157 address registername access 2: ext. dsmod with mclk output 3: ext. dsmod with ext. cmp mask name type 0x00040000 h mclk_polarity_b bool min max default unit 0 1 0 0: data is sampled on rising edge 1: data is sampled on falling edge mask name type 0x00080000 h mdat_polarity_b bool min max default unit 0 1 0 0: mdat is not inverted 1: mdat is inverted mask name type 0x00100000 h sel_nclk_mclk_i_b bool min max default unit 0 1 0 0: mclk is used (divided clock) 1: clk (100 mhz) is used mask name type 0xff000000 h blanking_b unsigned min max default unit 0 255 0 0x05 h dsadc_mclk_a rw mask name type 0xffffffff h dsadc_mclk_a unsigned min max default unit 0 4294967295 214748365 fmclk_a = 2 31 / (fclk * (dsadc_mclk_a+1)), dsadc_mclk_a = ( 2 31 / (fmclk * fclk)) - 1 0x06 h dsadc_mclk_b rw mask name type 0xffffffff h dsadc_mclk_b unsigned min max default unit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 65 / 157 address registername access 0 4294967295 214748365 fmclk_b = 2 31 / (fclk * (dsadc_mclk_b+1)), dsadc_mclk_b = ( 2 31 / (fmclk * fclk)) - 1 0x07 h dsadc_mdec_b_mdec_a rw mask name type 0x0000ffff h dsadc_mdec_a unsigned min max default unit 0 65535 256 mask name type 0xffff0000 h dsadc_mdec_b unsigned min max default unit 0 65535 256 0x08 h adc_ i 1_scale_offset rw mask name type 0x0000ffff h adc_ i 1_offset unsigned min max default unit 0 65535 0 o ? set for current adc channel 1. mask name type 0xffff0000 h adc_ i 1_scale signed min max default unit -32768 32767 256 scaling factor for current adc channel 1. 0x09 h adc_ i 0_scale_offset rw mask name type 0x0000ffff h adc_ i 0_offset unsigned min max default unit 0 65535 0 o ? set for current adc channel 0. mask name type 0xffff0000 h adc_ i 0_scale signed min max default unit -32768 32767 256 scaling factor for current adc channel 0. 0x0a h adc_ i _select rw ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 66 / 157 address registername access mask name type 0x000000ff h adc_ i 0_select choice min max default unit 0 3 0 select input for raw current adc_ i 0_raw. 0: adcsd_ i 0_raw (sigma delta adc) 1: adcsd_ i 1_raw (sigma delta adc) 2: adc_ i 0_ext (from register) 3: adc_ i 1_ext (from register) mask name type 0x0000ff00 h adc_ i 1_select choice min max default unit 0 3 1 select input for raw current adc_ i 1_raw. 0: adcsd_ i 0_raw (sigma delta adc) 1: adcsd_ i 1_raw (sigma delta adc) 2: adc_ i 0_ext (from register) 3: adc_ i 1_ext (from register) mask name type 0x03000000 h adc_ i _ux_select choice min max default unit 0 2 0 0: ux = adc_ i 0 (default) 1: ux = adc_ i 1 2: ux = adc_ i 2 mask name type 0x0c000000 h adc_ i _v_select choice min max default unit 0 2 1 0: v = adc_ i 0 1: v = adc_ i 1 (default) 2: v = adc_ i 2 mask name type 0x30000000 h adc_ i _wy_select choice min max default unit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 67 / 157 address registername access 0 2 2 0: wy = adc_ i 0 1: wy = adc_ i 1 2: wy = adc_ i 2 (default) 0x0b h adc_ i 1_ i 0_ext rw mask name type 0x0000ffff h adc_ i 0_ext unsigned min max default unit 0 65535 0 register for write of adc_ i 0 value from external source (eg. cpu). mask name type 0xffff0000 h adc_ i 1_ext unsigned min max default unit 0 65535 0 register for write of adc_ i 1 value from external source (eg. cpu). 0x0c h ds_analog_ i nput_stage_cfg rw mask name type 0x0000000f h adc_ i 0 choice min max default unit 0 7 0 0: i np vs. i nn 1: gnd vs. i nn 2: vdd/4 3: 3*vdd/4 4: i np vs. gnd 5: vdd/2 6: vdd/4 7: 3*vdd/4 mask name type 0x000000f0 h adc_ i 1 choice min max default unit 0 7 0 0: i np vs. i nn 1: gnd vs. i nn ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 68 / 157 address registername access 2: vdd/4 3: 3*vdd/4 4: i np vs. gnd 5: vdd/2 6: vdd/4 7: 3*vdd/4 mask name type 0x00000f00 h adc_vm choice min max default unit 0 7 0 0: i np vs. i nn 1: gnd vs. i nn 2: vdd/4 3: 3*vdd/4 4: i np vs. gnd 5: vdd/2 6: vdd/4 7: 3*vdd/4 mask name type 0x0000f000 h adc_agp i _a choice min max default unit 0 7 0 0: i np vs. i nn 1: gnd vs. i nn 2: vdd/4 3: 3*vdd/4 4: i np vs. gnd 5: vdd/2 6: vdd/4 7: 3*vdd/4 mask name type 0x000f0000 h adc_agp i _b choice min max default unit 0 7 0 0: i np vs. i nn ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 69 / 157 address registername access 1: gnd vs. i nn 2: vdd/4 3: 3*vdd/4 4: i np vs. gnd 5: vdd/2 6: vdd/4 7: 3*vdd/4 mask name type 0x00f00000 h adc_aenc_ux choice min max default unit 0 7 0 0: i np vs. i nn 1: gnd vs. i nn 2: vdd/4 3: 3*vdd/4 4: i np vs. gnd 5: vdd/2 6: vdd/4 7: 3*vdd/4 mask name type 0x0f000000 h adc_aenc_vn choice min max default unit 0 7 0 0: i np vs. i nn 1: gnd vs. i nn 2: vdd/4 3: 3*vdd/4 4: i np vs. gnd 5: vdd/2 6: vdd/4 7: 3*vdd/4 mask name type 0xf0000000 h adc_aenc_wy choice min max default unit 0 7 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 70 / 157 address registername access 0: i np vs. i nn 1: gnd vs. i nn 2: vdd/4 3: 3*vdd/4 4: i np vs. gnd 5: vdd/2 6: vdd/4 7: 3*vdd/4 0x0d h aenc_0_scale_offset rw mask name type 0x0000ffff h aenc_0_offset unsigned min max default unit 0 65535 0 o ? set for analog encoder adc channel 0. mask name type 0xffff0000 h aenc_0_scale signed min max default unit -32768 32767 256 scaling factor for analog encoder adc channel 0. 0x0e h aenc_1_scale_offset rw mask name type 0x0000ffff h aenc_1_offset unsigned min max default unit 0 65535 0 o ? set for analog encoder adc channel 1. mask name type 0xffff0000 h aenc_1_scale signed min max default unit -32768 32767 256 scaling factor for analog encoder adc channel 1. 0x0f h aenc_2_scale_offset rw mask name type 0x0000ffff h aenc_2_offset unsigned min max default unit 0 65535 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 71 / 157 address registername access o ? set for analog encoder adc channel 2. mask name type 0xffff0000 h aenc_2_scale signed min max default unit -32768 32767 256 scaling factor for analog encoder adc channel 2. 0x11 h aenc_select rw mask name type 0x000000ff h aenc_0_select choice min max default unit 0 2 0 select analog encoder adc channel for raw analog encoder signal aenc_0_raw. 0: aenc_ux_raw (default) 1: aenc_vn_raw 2: aenc_wy_raw mask name type 0x0000ff00 h aenc_1_select choice min max default unit 0 2 1 select analog encoder adc channel for raw analog encoder signal aenc_1_raw. 0: aenc_ux_raw 1: aenc_vn_raw (default) 2: aenc_wy_raw mask name type 0x00ff0000 h aenc_2_select choice min max default unit 0 2 2 select analog encoder adc channel for raw analog encoder signal aenc_2_raw. 0: aenc_ux_raw 1: aenc_vn_raw 2: aenc_wy_raw (default) 0x12 h adc_ i wy_ i ux r mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 72 / 157 address registername access 0x0000ffff h adc_ i ux signed min max default unit -32768 32767 0 register of scaled current adc value including signed added o ? set as input for the foc. mask name type 0xffff0000 h adc_ i wy signed min max default unit -32768 32767 0 register of scaled current adc value including signed added o ? set as input for the foc. 0x13 h adc_ i v r mask name type 0x0000ffff h adc_ i v signed min max default unit -32768 32767 0 register of scaled current adc value including signed added o ? set as input for the foc. 0x15 h aenc_wy_ux r mask name type 0x0000ffff h aenc_ux signed min max default unit -32768 32767 0 register of scaled analog encoder value including signed added o ? set as input for the interpolator. mask name type 0xffff0000 h aenc_wy signed min max default unit -32768 32767 0 register of scaled analog encoder value including signed added o ? set as input for the interpolator. 0x16 h aenc_vn r mask name type 0x0000ffff h aenc_vn signed min max default unit -32768 32767 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 73 / 157 address registername access register of scaled analog encoder value including signed added o ? set as input for the interpolator. 0x17 h pwm_polar i t i es rw mask name type 0x00000001 h pwm_polar i t i es[0] bool min max default unit 0 1 0 polarity of low side (ls) gate control signal 0: o ? 1: on mask name type 0x00000002 h pwm_polar i t i es[1] bool min max default unit 0 1 0 polarity of high side (hs) gate control signal 0: o ? 1: on 0x18 h pwm_maxcnt rw mask name type 0x0000ffff h pwm_maxcnt unsigned min max default unit 0 65535 3999 pwm maximum (count-1), pwm frequency is fpwm[hz] = 100mhz/(pwm_maxcnt+1) 0x19 h pwm_bbm_h_bbm_l rw mask name type 0x000000ff h pwm_bbm_l unsigned min max default unit 0 255 20 break before make time tbbm_l[10ns] for low side mos-fet gate control mask name type 0x0000ff00 h pwm_bbm_h unsigned min max default unit 0 255 20 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 74 / 157 address registername access break before make time tbbm_h[10ns] for high side mos-fet gate control 0x1a h pwm_sv_chop rw mask name type 0x000000ff h pwm_chop choice min max default unit 0 7 0 pwm chopper mode, de 1 ning how to chopper 0: pwm = off, free running 1: pwm = off, low side (ls) permanent = on 2: pwm = off, high side (hs) permanent = on 3: pwm o ? , free running 4: pwm o ? , free running 5: pwm low side (ls) chopper only, high side (hs) o ? ; not suitable for foc 6: pwm high side (hs) chopper only, low side (ls) o ? ; not suitable for foc 7: centered pwm for foc mask name type 0x00000100 h pwm_sv bool min max default unit 0 1 0 use space vector pwm 0: space vector pwm disabled 1: space vector pwm enabled 0x1b h motor_type_n_pole_pa i rs rw mask name type 0x0000ffff h n_pole_pa i rs unsigned min max default unit 1 65535 1 number n of pole pairs of the motor for calcualtion phi_e = phi_m / n_pole_pa i rs. mask name type 0x00ff0000 h motor_type choice min max default unit 0 3 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 75 / 157 address registername access 0: no motor 1: single phase dc motor 2: two phase stepper motor 3: three phase bldc motor 0x1c h ph i _e_ext rw mask name type 0x0000ffff h ph i _e_ext signed min max default unit -32768 32767 0 electrical angle phi_e_ext for external writing into this register. 0x1d h ph i _m_ext rw mask name type 0x0000ffff h ph i _m_ext signed min max default unit -32768 32767 0 mechanical angle phi_m_ext for external writing into this regis- ter. 0x1e h pos i t i on_ext rw mask name type 0xffffffff h pos i t i on_ext signed min max default unit -2147483648 2147483647 0 mechanical (multi turn) position for external writing into this register. 0x1f h openloop_mode rw mask name type 0x00001000 h openloop_ph i _d i rect i on bool min max default unit 0 1 0 open loop phi direction. 0: positive 1: negative 0x20 h openloop_accelerat i on rw mask name type 0xffffffff h openloop_accelerat i on unsigned ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 76 / 157 address registername access min max default unit 0 4294967295 0 acceleration of open loop phi. 0x21 h openloop_veloc i ty_target rw mask name type 0xffffffff h openloop_veloc i ty_target signed min max default unit -2147483648 2147483647 0 target velocity of open loop phi. 0x22 h openloop_veloc i ty_actual rw mask name type 0xffffffff h openloop_veloc i ty_actual signed min max default unit -2147483648 2147483647 0 actual velocity of open loop generator. 0x23 h openloop_ph i rw i mask name type 0x0000ffff h openloop_ph i signed min max default unit -32768 32767 0 angle phi open loop (either mapped to electrical angel phi_e or mechanical angle phi_m). 0x24 h uq_ud_ext rw mask name type 0x0000ffff h ud_ext signed min max default unit -32768 32767 0 external writable parameter for open loop voltage control mode, usefull during system setup, u_d component. mask name type 0xffff0000 h uq_ext signed min max default unit -32768 32767 0 external writable parameter for open loop voltage control mode, usefull during system setup, u_q component. 0x25 h abn_decoder_mode rw ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 77 / 157 address registername access mask name type 0x00000001 h apol bool min max default unit 0 1 0 polarity of a pulse. 0: o ? 1: on mask name type 0x00000002 h bpol bool min max default unit 0 1 0 polarity of b pulse. 0: o ? 1: on mask name type 0x00000004 h npol bool min max default unit 0 1 0 polarity of n pulse. 0: o ? 1: on mask name type 0x00000008 h use_abn_as_n bool min max default unit 0 1 0 0: i gnore a and b polarity with npulse = n, 1 : npulse = n and a and b 0: i gnore a and b polarity with npulse = n 1: npulse = n and a and b mask name type 0x00000100 h cln bool min max default unit 0 1 0 clear writes abn_decoder_count_n into decoder count at npulse. 0: o ? ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 78 / 157 address registername access 1: on mask name type 0x00001000 h direction bool min max default unit 0 1 0 decoder count direction. 0: positive 1: negative 0x26 h abn_decoder_ppr rw mask name type 0x00ffffff h abn_decoder_ppr unsigned min max default unit 0 16777215 65536 decoder pules per mechanical revolution. 0x27 h abn_decoder_count rw mask name type 0x00ffffff h abn_decoder_count unsigned min max default unit 0 16777215 0 raw decoder count; the digital decoder engine counts modulo (decoder_ppr). 0x28 h abn_decoder_count_n rw mask name type 0x00ffffff h abn_decoder_count_n unsigned min max default unit 0 16777215 0 decoder count latched on n pulse, when n pulse clears de- coder_count also decoder_count_n is 0. 0x29 h abn_decoder_ph i _e_ph i _m_offset rw mask name type 0x0000ffff h abn_decoder_ph i _m_offset signed min max default unit -32768 32767 0 abn_decoder_ph i _m_offset to shift (rotate) angle de- coder_ph i _m. mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 79 / 157 address registername access 0xffff0000 h abn_decoder_ph i _e_offset signed min max default unit -32768 32767 0 abn_decoder_ph i _e_offset to shift (rotate) angle de- coder_ph i _e. 0x2a h abn_decoder_ph i _e_ph i _m r mask name type 0x0000ffff h abn_decoder_ph i _m signed min max default unit -32768 32767 0 abn_decoder_ph i _m = abn_decoder_count * 2 ? 16 / abn_decoder_ppr + abn_decoder_ph i _m_offset; mask name type 0xffff0000 h abn_decoder_ph i _e signed min max default unit -32768 32767 0 abn_decoder_ph i _e = (abn_decoder_ph i _m * n_pole_pa i rs_) + abn_decoder_ph i _e_offset 0x2c h abn_2_decoder_mode rw mask name type 0x00000001 h apol bool min max default unit 0 1 0 polarity of a pulse. 0: o ? 1: on mask name type 0x00000002 h bpol bool min max default unit 0 1 0 polarity of b pulse. 0: o ? 1: on mask name type 0x00000004 h npol bool min max default unit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 80 / 157 address registername access 0 1 0 polarity of n pulse. 0: o ? 1: on mask name type 0x00000008 h use_abn_as_n bool min max default unit 0 1 0 0: i gnore a and b polarity with npulse = n, 1 : npulse = n and a and b 0: i gnore a and b polarity with npulse = n 1: npulse = n and a and b mask name type 0x00000100 h cln bool min max default unit 0 1 0 clear writes abn_2_decoder_count_n into decoder count at npulse. 0: o ? 1: on mask name type 0x00001000 h direction bool min max default unit 0 1 0 decoder count direction. 0: positive 1: negative 0x2d h abn_2_decoder_ppr rw mask name type 0x00ffffff h abn_2_decoder_ppr unsigned min max default unit 1 16777215 65536 decoder_2 pules per mechanical revolution. this 2nd abn encoder interface is for positioning or velocity control but not for motor commutation. 0x2e h abn_2_decoder_count rw ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 81 / 157 address registername access mask name type 0x00ffffff h abn_2_decoder_count unsigned min max default unit 0 16777215 0 raw decoder_2 count; the digital decoder engine counts mod- ulo (decoder_2_ppr). 0x2f h abn_2_decoder_count_n rw mask name type 0x00ffffff h abn_2_decoder_count_n unsigned min max default unit 0 16777215 0 decoder_2 count latched on n pulse, when n pulse clears decoder_2_count also decoder_2_count_n is 0. 0x30 h abn_2_decoder_ph i _m_offset rw mask name type 0x0000ffff h abn_2_decoder_ph i _m_offset signed min max default unit -32768 32767 0 abn_2_decoder_ph i _m_offset to shift (rotate) angle de- coder_2_ph i _m. 0x31 h abn_2_decoder_ph i _m r mask name type 0x0000ffff h abn_2_decoder_ph i _m signed min max default unit -32768 32767 0 abn_2_decoder_ph i _m = abn_2_decoder_count * 2 ? 16 / abn_2_decoder_ppr + abn_2_decoder_ph i _m_offset; 0x33 h hall_mode rw mask name type 0x00000001 h polarity bool min max default unit 0 1 0 polarity 0: o ? 1: on mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 82 / 157 address registername access 0x00000100 h interpolation bool min max default unit 0 1 0 interpolation 0: o ? 1: on mask name type 0x00001000 h direction bool min max default unit 0 1 0 direction 0: o ? 1: on mask name type 0x0fff0000 h hall_blank unsigned min max default unit 0 4095 0 tblank = 10ns * hall_blank 0x34 h hall_pos i t i on_060_000 rw mask name type 0x0000ffff h hall_pos i t i on_000 signed min max default unit -32768 32767 0 s16 hall sensor position at 0 mask name type 0xffff0000 h hall_pos i t i on_060 signed min max default unit -32768 32767 10922 s16 hall sensor position at 60. 0x35 h hall_pos i t i on_180_120 rw mask name type 0x0000ffff h hall_pos i t i on_120 signed min max default unit -32768 32767 21845 s16 hall sensor position at 120. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 83 / 157 address registername access mask name type 0xffff0000 h hall_pos i t i on_180 signed min max default unit -32768 32767 -32768 s16 hall sensor position at 180. 0x36 h hall_pos i t i on_300_240 rw mask name type 0x0000ffff h hall_pos i t i on_240 signed min max default unit -32768 32767 -21846 s16 hall sensor position at 240. mask name type 0xffff0000 h hall_pos i t i on_300 signed min max default unit -32768 32767 -10923 s16 hall sensor position at 300. 0x37 h hall_ph i _e_ph i _m_offset rw mask name type 0x0000ffff h hall_ph i _m_offset signed min max default unit -32768 32767 0 o ? set of mechanical angle hall_phi_m of hall decoder. mask name type 0xffff0000 h hall_ph i _e_offset signed min max default unit -32768 32767 0 o ? set for electrical angle hall_phi_e of hall decoder. 0x38 h hall_dph i _max rw mask name type 0x0000ffff h hall_dph i _max unsigned min max default unit 0 65535 10922 maximum dx for interpolation (default for digital hall: u16/6). 0x39 h hall_ph i _e_ i nterpolated_ph i _e r mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 84 / 157 address registername access 0x0000ffff h hall_ph i _e signed min max default unit -32768 32767 0 raw electrical angle hall_phi_e of hall decoder, selection pro- grammed via hall_mode control bit. mask name type 0xffff0000 h hall_ph i _e_ i nterpolated signed min max default unit -32768 32767 0 i nterpolated electrical angle hall_phi_e_interpolated, selection programmed via hall_mode control bit. 0x3a h hall_ph i _m r mask name type 0x0000ffff h hall_ph i _m signed min max default unit -32768 32767 0 mechanical angle hall_phi_m of hall decoder. 0x3b h aenc_decoder_mode rw mask name type 0x00000001 h aenc_decoder_mode[0] bool min max default unit 0 1 0 nxy_uvw : 0: sincos mode // 1: 0 120 240 mode 0: o ? 1: on mask name type 0x00001000 h aenc_decoder_mode[12] bool min max default unit 0 1 0 decoder count direction 0: positive 1: negative 0x3c h aenc_decoder_n_threshold rw mask name type 0x0000ffff h aenc_decoder_n_threshold unsigned ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 85 / 157 address registername access min max default unit 0 65535 0 threshold for generating of n pulse from analog aenc_n signal (only needed for analog sincos encoders with analog n signal). mask name type 0xffff0000 h aenc_decoder_n_mask signed min max default unit -32768 32767 0 optional position mask (position) for the analog n pulse within phi_a period to be and-ed with the digital n pulse generated via aenc_decoder_n_threshold. 0x3d h aenc_decoder_ph i _a_raw r mask name type 0x0000ffff h aenc_decoder_ph i _a_raw signed min max default unit -32768 32767 0 raw analog angle phi calculated from analog aenc inputs (analog hall, analog sincos, ...). 0x3e h aenc_decoder_ph i _a_offset rw mask name type 0x0000ffff h aenc_decoder_ph i _a_offset signed min max default unit -32768 32767 0 o ? set for angle phi from analog decoder (analog hall, analog sincos, ...). 0x3f h aenc_decoder_ph i _a r mask name type 0x0000ffff h aenc_decoder_ph i _a signed min max default unit -2147483648 2147483647 0 resulting phi available for the foc (phi_e might need to be calculated from this angle via aenc_decoder_ppr, for analog hall sensors phi_a might be used directly as phi_e depends on analog hall signal type). 0x40 h aenc_decoder_ppr rw mask name type 0x0000ffff h aenc_decoder_ppr signed ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 86 / 157 address registername access min max default unit -32768 32767 1 number of periods per revolution also called lines per revolu- tion (di ? erent nomenclatur compared to digital abn encoders). 0x41 h aenc_decoder_count r mask name type 0xffffffff h aenc_decoder_count signed min max default unit -2147483648 2147483647 0 decoder position, raw unscaled. 0x42 h aenc_decoder_count_n rw mask name type 0xffffffff h aenc_decoder_count_n signed min max default unit -2147483648 2147483647 0 latched decoder position on analog n pulse event. 0x45 h aenc_decoder_ph i _e_ph i _m_offset rw mask name type 0x0000ffff h aenc_decoder_ph i _m_offset signed min max default unit -32768 32767 0 o ? set for mechanical angle phi_m. mask name type 0xffff0000 h aenc_decoder_ph i _e_offset signed min max default unit -32768 32767 0 o ? set for electrical angle phi_e. 0x46 h aenc_decoder_ph i _e_ph i _m r mask name type 0x0000ffff h aenc_decoder_ph i _m signed min max default unit -32768 32767 0 resulting angle phi_m. mask name type 0xffff0000 h aenc_decoder_ph i _e signed ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 87 / 157 address registername access min max default unit -32768 32767 0 resulting angle phi_e. 0x47 h aenc_decoder_pos i t i on r mask name type 0xffffffff h aenc_decoder_pos i t i on signed min max default unit -2147483648 2147483647 0 multi-turn position. 0x4d h conf i g_data rw variant 1 mask name type 0xffffffff h biquad_x_a_1 signed min max default unit -2147483648 2147483647 0 variant 2 mask name type 0xffffffff h biquad_x_a_2 signed min max default unit -2147483648 2147483647 0 variant 4 mask name type 0xffffffff h biquad_x_b_0 signed min max default unit -2147483648 2147483647 0 variant 5 mask name type 0xffffffff h biquad_x_b_1 signed min max default unit -2147483648 2147483647 0 variant 6 mask name type 0xffffffff h biquad_x_b_2 signed min max default unit -2147483648 2147483647 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 88 / 157 address registername access variant 7 mask name type 0xffffffff h biquad_x_enable bool min max default unit 0 1 0 0: o ? 1: on variant 9 mask name type 0xffffffff h biquad_v_a_1 signed min max default unit -2147483648 2147483647 0 variant 10 mask name type 0xffffffff h biquad_v_a_2 signed min max default unit -2147483648 2147483647 0 variant 12 mask name type 0xffffffff h biquad_v_b_0 signed min max default unit -2147483648 2147483647 0 variant 13 mask name type 0xffffffff h biquad_v_b_1 signed min max default unit -2147483648 2147483647 0 variant 14 mask name type 0xffffffff h biquad_v_b_2 signed min max default unit -2147483648 2147483647 0 variant 15 mask name type 0xffffffff h biquad_v_enable bool ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 89 / 157 address registername access min max default unit 0 1 0 0: o ? 1: on variant 17 mask name type 0xffffffff h biquad_t_a_1 signed min max default unit -2147483648 2147483647 0 variant 18 mask name type 0xffffffff h biquad_t_a_2 signed min max default unit -2147483648 2147483647 0 variant 20 mask name type 0xffffffff h biquad_t_b_0 signed min max default unit -2147483648 2147483647 0 variant 21 mask name type 0xffffffff h biquad_t_b_1 signed min max default unit -2147483648 2147483647 0 variant 22 mask name type 0xffffffff h biquad_t_b_2 signed min max default unit -2147483648 2147483647 0 variant 23 mask name type 0xffffffff h biquad_t_enable bool min max default unit 0 1 0 0: o ? ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 90 / 157 address registername access 1: on variant 25 mask name type 0xffffffff h biquad_f_a_1 signed min max default unit -2147483648 2147483647 0 variant 26 mask name type 0xffffffff h biquad_f_a_2 signed min max default unit -2147483648 2147483647 0 variant 28 mask name type 0xffffffff h biquad_f_b_0 signed min max default unit -2147483648 2147483647 0 variant 29 mask name type 0xffffffff h biquad_f_b_1 signed min max default unit -2147483648 2147483647 0 variant 30 mask name type 0xffffffff h biquad_f_b_2 signed min max default unit -2147483648 2147483647 0 variant 31 mask name type 0xffffffff h biquad_f_enable bool min max default unit 0 1 0 0: o ? 1: on variant 32 mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 91 / 157 address registername access 0xffffffff h prbs_amplitude signed min max default unit -2147483648 2147483647 0 variant 33 mask name type 0xffffffff h prbs_down_sampling_ratio signed min max default unit -2147483648 2147483647 0 variant 40 mask name type 0xffffffff h feed_forward_velocity_gain signed min max default unit -2147483648 2147483647 0 variant 41 mask name type 0xffffffff h feed_forward_velocity_ 1 lter_constant signed min max default unit -2147483648 2147483647 0 variant 42 mask name type 0xffffffff h feed_forward_torque_gain signed min max default unit -2147483648 2147483647 0 variant 43 mask name type 0xffffffff h feed_forward_torgue_ 1 lter_constant signed min max default unit -2147483648 2147483647 0 variant 50 mask name type 0x0000ffff h veloc i ty_meter_pptm_m i n_pos_dev unsigned min max default unit 0 65535 0 variant 51 mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 92 / 157 address registername access 0x0000ffff h ref_switch_con 1 g unsigned min max default unit 0 65535 0 variant 52 mask name type 0x00000001 h encoder_ i nit_hall_enable bool min max default unit 0 1 0 0: o ? 1: on variant 60 mask name type 0x000000ff h s i ngle_p i n_ i f_cfg unsigned min max default unit 0 255 0 mask name type 0xffff0000 h s i ngle_p i n_ i f_status unsigned min max default unit 0 65535 0 variant 61 mask name type 0x0000ffff h s i ngle_p i n_ i f_offset unsigned min max default unit 0 65535 0 o ? set for scaling of single pin i nterface input mask name type 0xffff0000 h s i ngle_p i n_ i f_scale signed min max default unit -32767 32767 0 gain factor of single pin i nterface input 0x4e h conf i g_addr rw mask name type 0xffffffff h conf i g_addr choice min max default unit 1 52 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 93 / 157 address registername access 1: biquad_x_a_1 2: biquad_x_a_2 4: biquad_x_b_0 5: biquad_x_b_1 6: biquad_x_b_2 7: biquad_x_enable 9: biquad_v_a_1 10: biquad_v_a_2 12: biquad_v_b_0 13: biquad_v_b_1 14: biquad_v_b_2 15: biquad_v_enable 17: biquad_t_a_1 18: biquad_t_a_2 20: biquad_t_b_0 21: biquad_t_b_1 22: biquad_t_b_2 23: biquad_t_enable 25: biquad_f_a_1 26: biquad_f_a_2 28: biquad_f_b_0 29: biquad_f_b_1 30: biquad_f_b_2 31: biquad_f_enable 32: prbs_amplitude 33: prbs_down_sampling_ratio 40: feed_forward_velocity_gain 41: feed_forward_velicity_ 1 lter_constant 42: feed_forward_torque_gain 43: feed_forward_torgue_ 1 lter_constant 50: veloc i ty_meter_pptm_m i n_pos_dev 51: ref_switch_con 1 g 52: encoder_ i nit_hall_enable 60: s i ngle_p i n_ i f_status_cfg 61: s i ngle_p i n_ i f_scale_offset ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 94 / 157 address registername access 0x50 h veloc i ty_select i on rw mask name type 0x000000ff h veloc i ty_select i on choice min max default unit 0 12 0 selects the source of the velocity source for velocity measure- ment. 0: phi_e selected via ph i _e_select i on 1: phi_e_ext 2: phi_e_openloop 3: phi_e_abn 4: reserved 5: phi_e_hal 6: phi_e_aenc 7: phi_a_aenc 8: reserved 9: phi_m_abn 10: phi_m_abn_2 11: phi_m_aenc 12: phi_m_hal mask name type 0x0000ff00 h veloc i ty_meter_select i on choice min max default unit 0 1 0 0: default velocity meter ( 1 xed frequency sampling) 1: advanced velocity meter (time di ? erence measurement) 0x51 h pos i t i on_select i on rw mask name type 0x000000ff h pos i t i on_select i on choice min max default unit 0 12 0 0: phi_e selected via ph i _e_select i on 1: phi_e_ext 2: phi_e_openloop 3: phi_e_abn ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 95 / 157 address registername access 4: reserved 5: phi_e_hal 6: phi_e_aenc 7: phi_a_aenc 8: reserved 9: phi_m_abn 10: phi_m_abn_2 11: phi_m_aenc 12: phi_m_hal 0x52 h ph i _e_select i on rw mask name type 0x000000ff h ph i _e_select i on choice min max default unit 0 7 0 0: reserved 1: phi_e_ext 2: phi_e_openloop 3: phi_e_abn 4: reserved 5: phi_e_hal 6: phi_e_aenc 7: phi_a_aenc 0x53 h ph i _e r mask name type 0x0000ffff h ph i _e signed min max default unit -32768 32767 0 angle used for the inner foc loop. 0x54 h p i d_flux_p_flux_ i rw mask name type 0x0000ffff h p i d_flux_ i signed min max default unit 0 32767 0 mask name type 0xffff0000 h p i d_flux_p signed ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 96 / 157 address registername access min max default unit 0 32767 0 0x56 h p i d_torque_p_torque_ i rw mask name type 0x0000ffff h p i d_torque_ i signed min max default unit 0 32767 0 mask name type 0xffff0000 h p i d_torque_p signed min max default unit 0 32767 0 0x58 h p i d_veloc i ty_p_veloc i ty_ i rw mask name type 0x0000ffff h p i d_veloc i ty_ i signed min max default unit 0 32767 0 mask name type 0xffff0000 h p i d_veloc i ty_p signed min max default unit 0 32767 0 0x5a h p i d_pos i t i on_p_pos i t i on_ i rw mask name type 0x0000ffff h p i d_pos i t i on_ i signed min max default unit 0 32767 0 mask name type 0xffff0000 h p i d_pos i t i on_p signed min max default unit 0 32767 0 0x5c h p i d_torque_flux_target_ddt_l i m i ts rw mask name type 0xffffffff h p i d_torque_flux_target_ddt_l i m i ts unsigned min max default unit 0 32767 32767 [1/us] ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 97 / 157 address registername access limits of change in time [d/dt] of the target torque and target 2 ux. 0x5d h p i dout_uq_ud_l i m i ts rw mask name type 0x0000ffff h p i dout_uq_ud_l i m i ts unsigned min max default unit 0 32767 23169 two dimensional circular limiter for inputs of ipark. 0x5e h p i d_torque_flux_l i m i ts rw mask name type 0x0000ffff h p i d_torque_flux_l i m i ts unsigned min max default unit 0 32767 32767 p i d torque limt and p i d 2 ux limit, limits the target values com- ing from the target registers. 0x5f h p i d_accelerat i on_l i m i t rw mask name type 0xffffffff h p i d_accelerat i on_l i m i t unsigned min max default unit 0 4294967295 2147483647 acceleration limit. 0x60 h p i d_veloc i ty_l i m i t rw mask name type 0xffffffff h p i d_veloc i ty_l i m i t unsigned min max default unit 0 4294967295 2147483647 velocity limit. 0x61 h p i d_pos i t i on_l i m i t_low rw mask name type 0xffffffff h p i d_pos i t i on_l i m i t_low signed min max default unit -2147483648 2147483647 -2147483647 position limit low, programmable positon barrier. 0x62 h p i d_pos i t i on_l i m i t_h i gh rw mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 98 / 157 address registername access 0xffffffff h p i d_pos i t i on_l i m i t_h i gh signed min max default unit -2147483648 2147483647 2147483647 position limit high, programmable positon barrier. 0x63 h mode_ramp_mode_mot i on rw mask name type 0x000000ff h mode_mot i on choice min max default unit 0 15 0 0: stopped_mode 1: torque_mode 2: velocity_mode 3: position_mode 4: prbs_ 2 ux_mode 5: prbs_torque_mode 6: prbs_velocity_mode 7: prbs_position_mode 8: uq_ud_ext 9: enc_init_mini_move 10: agp i _a torque_mode 11: agp i _a velocity_mode 12: agp i _a position_mode 13: pwm_ i torque_mode 14: pwm_ i velocity_mode 15: pwm_ i position_mode mask name type 0x0000ff00 h mode_ramp choice min max default unit 0 7 0 0: no velocity ramping 1: reserved 2: reserved 3: reserved 4: reserved 5: reserved ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 99 / 157 address registername access 6: reserved 7: reserved mask name type 0x00ff0000 h mode_ff choice min max default unit 0 2 0 0: disabled 1: feed forward velocity control 2: feed forward torque control mask name type 0x7f000000 h mode_p i d_smpl unsigned min max default unit 0 127 0 controller downsampling factor for advanced velocity and po- sition controller mask name type 0x80000000 h mode_p i d_type choice min max default unit 0 1 0 0: classic p i architecture 1: advanced p i architecture 0x64 h p i d_torque_flux_target rw mask name type 0x0000ffff h p i d_flux_target signed min max default unit -32768 32767 0 mask name type 0xffff0000 h p i d_torque_target signed min max default unit -32768 32767 0 0x65 h p i d_torque_flux_offset rw mask name type 0x0000ffff h p i d_flux_offset signed min max default unit -32768 32767 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 100 / 157 address registername access flux o ? set for feed forward control. mask name type 0xffff0000 h p i d_torque_offset signed min max default unit -32768 32767 0 torque o ? set for feed forward control. 0x66 h p i d_veloc i ty_target rw mask name type 0xffffffff h p i d_veloc i ty_target signed min max default unit -2147483648 2147483647 0 target velocity register (for velocity mode). 0x67 h p i d_veloc i ty_offset rw mask name type 0xffffffff h p i d_veloc i ty_offset signed min max default unit -2147483648 2147483647 0 velocity o ? set for feed forward control. 0x68 h p i d_pos i t i on_target rw mask name type 0xffffffff h p i d_pos i t i on_target signed min max default unit -2147483648 2147483647 0 target position register (for position mode). 0x69 h p i d_torque_flux_actual r mask name type 0x0000ffff h p i d_flux_actual signed min max default unit -32768 32767 0 mask name type 0xffff0000 h p i d_torque_actual signed min max default unit -32768 32767 0 0x6a h p i d_veloc i ty_actual r mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 101 / 157 address registername access 0xffffffff h p i d_veloc i ty_actual signed min max default unit -2147483648 2147483647 0 actual velocity. 0x6b h p i d_pos i t i on_actual rw mask name type 0xffffffff h p i d_pos i t i on_actual signed min max default unit -2147483648 2147483647 0 actual multi turn position for positioning. wr i te on p i d_pos i t i on_actual writes same value into p i d_pos i t i on_target to avoid unwanted move. 0x6c h p i d_error_data r variant 0 mask name type 0xffffffff h p i d_torque_error signed min max default unit -2147483648 2147483647 0 p i d torque error. variant 1 mask name type 0xffffffff h p i d_flux_error signed min max default unit -2147483648 2147483647 0 p i d 2 ux error. variant 2 mask name type 0xffffffff h p i d_veloc i ty_error signed min max default unit -2147483648 2147483647 0 p i d velocity error. variant 3 mask name type 0xffffffff h p i d_pos i t i on_error signed min max default unit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 102 / 157 address registername access -2147483648 2147483647 0 p i d position error. variant 4 mask name type 0xffffffff h p i d_torque_error_sum signed min max default unit -2147483648 2147483647 0 p i d torque error. variant 5 mask name type 0xffffffff h p i d_flux_error_sum signed min max default unit -2147483648 2147483647 0 p i d 2 ux error sum. variant 6 mask name type 0xffffffff h p i d_veloc i ty_error_sum signed min max default unit -2147483648 2147483647 0 p i d velocity error sum. variant 7 mask name type 0xffffffff h p i d_pos i t i on_error_sum signed min max default unit -2147483648 2147483647 0 p i d position error sum. 0x6d h p i d_error_addr rw mask name type 0x000000ff h p i d_error_addr choice min max default unit 0 7 0 0: p i d_torque_error 1: p i d_flux_error 2: p i d_veloc i ty_error 3: p i d_pos i t i on_error ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 103 / 157 address registername access 4: p i d_torque_error_sum 5: p i d_flux_error_sum 6: p i d_veloc i ty_error_sum 7: p i d_pos i t i on_error_sum 0x6e h i nter i m_data rw variant 0 mask name type 0xffffffff h p i d i n_target_torque signed min max default unit -2147483648 2147483647 0 p i d i n target torque. variant 1 mask name type 0xffffffff h p i d i n_target_flux signed min max default unit -2147483648 2147483647 0 p i d i n target 2 ux. variant 2 mask name type 0xffffffff h p i d i n_target_veloc i ty signed min max default unit -2147483648 2147483647 0 p i d i n target velocity. variant 3 mask name type 0xffffffff h p i d i n_target_pos i t i on signed min max default unit -2147483648 2147483647 0 p i d i n target position. variant 4 mask name type 0xffffffff h p i dout_target_torque signed min max default unit -2147483648 2147483647 0 p i dout target torque. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 104 / 157 address registername access variant 5 mask name type 0xffffffff h p i dout_target_flux signed min max default unit -2147483648 2147483647 0 p i dout target 2 ux. variant 6 mask name type 0xffffffff h p i dout_target_veloc i ty signed min max default unit -2147483648 2147483647 0 p i dout target velocity. variant 7 mask name type 0xffffffff h p i dout_target_pos i t i on signed min max default unit -2147483648 2147483647 0 p i dout target position. variant 8 mask name type 0x0000ffff h foc_ i ux signed min max default unit -32768 32767 0 mask name type 0xffff0000 h foc_ i wy signed min max default unit -32768 32767 0 variant 9 mask name type 0x0000ffff h foc_ i v signed min max default unit -32768 32767 0 variant 10 mask name type 0x0000ffff h foc_ i a signed ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 105 / 157 address registername access min max default unit -32768 32767 0 mask name type 0xffff0000 h foc_ i b signed min max default unit -32768 32767 0 variant 11 mask name type 0x0000ffff h foc_ i d signed min max default unit -32768 32767 0 mask name type 0xffff0000 h foc_ i q signed min max default unit -32768 32767 0 variant 12 mask name type 0x0000ffff h foc_ud signed min max default unit -32768 32767 0 mask name type 0xffff0000 h foc_uq signed min max default unit -32768 32767 0 variant 13 mask name type 0x0000ffff h foc_ud_l i m i ted signed min max default unit -32768 32767 0 mask name type 0xffff0000 h foc_uq_l i m i ted signed min max default unit -32768 32767 0 variant 14 mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 106 / 157 address registername access 0x0000ffff h foc_ua signed min max default unit -32768 32767 0 mask name type 0xffff0000 h foc_ub signed min max default unit -32768 32767 0 variant 15 mask name type 0x0000ffff h foc_uux signed min max default unit -32768 32767 0 mask name type 0xffff0000 h foc_uwy signed min max default unit -32768 32767 0 variant 16 mask name type 0x0000ffff h foc_uv signed min max default unit -32768 32767 0 variant 17 mask name type 0x0000ffff h pwm_ux signed min max default unit -32768 32767 0 mask name type 0xffff0000 h pwm_wy signed min max default unit -32768 32767 0 variant 18 mask name type 0x0000ffff h pwm_v signed min max default unit -32768 32767 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 107 / 157 address registername access variant 19 mask name type 0x0000ffff h adc_ i _0 signed min max default unit -32768 32767 0 mask name type 0xffff0000 h adc_ i _1 signed min max default unit -32768 32767 0 variant 20 mask name type 0x000000ff h p i d_flux_actual_d i v256 signed min max default unit -128 127 0 mask name type 0x0000ff00 h p i d_torque_actual_d i v256 signed min max default unit -128 127 0 mask name type 0x00ff0000 h p i d_flux_target_d i v256 signed min max default unit -128 127 0 mask name type 0xff000000 h p i d_torque_target_d i v256 signed min max default unit -128 127 0 variant 21 mask name type 0x0000ffff h p i d_torque_actual signed min max default unit -32768 32767 0 mask name type 0xffff0000 h p i d_torque_target signed min max default unit -32768 32767 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 108 / 157 address registername access variant 22 mask name type 0x0000ffff h p i d_flux_actual signed min max default unit -32768 32767 0 mask name type 0xffff0000 h p i d_flux_target signed min max default unit -32768 32767 0 variant 23 mask name type 0x0000ffff h p i d_veloc i ty_actual_d i v256 signed min max default unit -32768 32767 0 mask name type 0xffff0000 h p i d_veloc i ty_target_d i v256 signed min max default unit -32768 32767 0 variant 24 mask name type 0x0000ffff h p i d_veloc i ty_actual_lsb signed min max default unit -32768 32767 0 mask name type 0xffff0000 h p i d_veloc i ty_target_lsb signed min max default unit -32768 32767 0 variant 25 mask name type 0x0000ffff h p i d_pos i t i on_actual_d i v256 signed min max default unit -32768 32767 0 mask name type 0xffff0000 h p i d_pos i t i on_target_d i v256 signed min max default unit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 109 / 157 address registername access -32768 32767 0 variant 26 mask name type 0x0000ffff h p i d_pos i t i on_actual_lsb signed min max default unit -32768 32767 0 mask name type 0xffff0000 h p i d_pos i t i on_target_lsb signed min max default unit -32768 32767 0 variant 27 mask name type 0xffffffff h ff_veloc i ty signed min max default unit -2147483648 2147483647 0 variant 28 mask name type 0x0000ffff h ff_torque signed min max default unit -32768 32767 0 variant 29 mask name type 0xffffffff h actual_veloc i ty_pptm signed min max default unit -2147483648 2147483647 0 variant 30 mask name type 0x0000ffff h ref_sw i tch_status unsigned min max default unit 0 65535 0 variant 31 mask name type 0xffffffff h home_pos i t i on signed min max default unit -2147483648 2147483647 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 110 / 157 address registername access variant 32 mask name type 0xffffffff h left_pos i t i on signed min max default unit -2147483648 2147483647 0 variant 33 mask name type 0xffffffff h r i ght_pos i t i on signed min max default unit -2147483648 2147483647 0 variant 34 mask name type 0x0000ffff h enc_ i n i t_hall_status unsigned min max default unit 0 65535 0 variant 35 mask name type 0x0000ffff h enc_ i n i t_hall_ph i _e_abn_offset unsigned min max default unit 0 65535 0 variant 36 mask name type 0x0000ffff h enc_ i n i t_hall_ph i _e_aenc_offset unsigned min max default unit 0 65535 0 variant 37 mask name type 0x0000ffff h enc_ i n i t_hall_ph i _a_aenc_offset unsigned min max default unit 0 65535 0 variant 40 mask name type 0x0000ffff h enc_ i n i t_m i n i _move_status unsigned min max default unit 0 65535 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 111 / 157 address registername access mask name type 0xffff0000 h enc_ i n i t_m i n i _move_u_d signed min max default unit -32768 32767 0 variant 41 mask name type 0x0000ffff h enc_ i n i t_m i n i _move_ph i _e_offset unsigned min max default unit 0 65535 0 mask name type 0xffff0000 h enc_ i n i t_m i n i _move_ph i _e unsigned min max default unit 0 65535 0 variant 42 mask name type 0x0000ffff h s i ngle_p i n_ i f_target_torque signed min max default unit -32768 32767 0 mask name type 0xffff0000 h s i ngle_p i n_ i f_raw_value unsigned min max default unit -32768 32767 0 variant 43 mask name type 0xffffffff h s i ngle_p i n_ i f_target_veloc i ty signed min max default unit -2147483648 2147483647 0 variant 44 mask name type 0xffffffff h s i ngle_p i n_ i f_target_pos i t i on signed min max default unit -2147483648 2147483647 0 variant 192 mask name type 0x0000ffff h debug_value_0 signed ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 112 / 157 address registername access min max default unit -32768 32767 0 mask name type 0xffff0000 h debug_value_1 signed min max default unit -32768 32767 0 variant 193 mask name type 0x0000ffff h debug_value_2 signed min max default unit -32768 32767 0 mask name type 0xffff0000 h debug_value_3 signed min max default unit -32768 32767 0 variant 194 mask name type 0x0000ffff h debug_value_4 signed min max default unit -32768 32767 0 mask name type 0xffff0000 h debug_value_5 signed min max default unit -32768 32767 0 variant 195 mask name type 0x0000ffff h debug_value_6 signed min max default unit -32768 32767 0 mask name type 0xffff0000 h debug_value_7 signed min max default unit -32768 32767 0 variant 196 mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 113 / 157 address registername access 0x0000ffff h debug_value_8 unsigned min max default unit 0 65535 0 mask name type 0xffff0000 h debug_value_9 unsigned min max default unit 0 65535 0 variant 197 mask name type 0x0000ffff h debug_value_10 unsigned min max default unit 0 65535 0 mask name type 0xffff0000 h debug_value_11 unsigned min max default unit 0 65535 0 variant 198 mask name type 0x0000ffff h debug_value_12 unsigned min max default unit 0 65535 0 mask name type 0xffff0000 h debug_value_13 unsigned min max default unit 0 65535 0 variant 199 mask name type 0x0000ffff h debug_value_14 unsigned min max default unit 0 65535 0 mask name type 0xffff0000 h debug_value_15 unsigned min max default unit 0 65535 0 variant 200 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 114 / 157 address registername access mask name type 0xffffffff h debug_value_16 signed min max default unit -2147483648 2147483647 0 variant 201 mask name type 0xffffffff h debug_value_17 signed min max default unit -2147483648 2147483647 0 variant 202 mask name type 0xffffffff h debug_value_18 signed min max default unit -2147483648 2147483647 0 variant 203 mask name type 0xffffffff h debug_value_19 signed min max default unit -2147483648 2147483647 0 variant 208 mask name type 0xffffffff h conf i g_reg_0 unsigned min max default unit 0 4294967295 0 variant 209 mask name type 0xffffffff h conf i g_reg_1 unsigned min max default unit 0 4294967295 0 variant 210 mask name type 0x0000ffff h ctrl_param_0 signed min max default unit -32768 32767 0 mask name type ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 115 / 157 address registername access 0xffff0000 h ctrl_param_1 signed min max default unit -32768 32767 0 variant 211 mask name type 0x0000ffff h ctrl_param_2 signed min max default unit -32768 32767 0 mask name type 0xffff0000 h ctrl_param_3 signed min max default unit -32768 32767 0 variant 212 mask name type 0xffffffff h status_reg_0 unsigned min max default unit 0 4294967295 0 variant 213 mask name type 0xffffffff h status_reg_1 unsigned min max default unit 0 4294967295 0 variant 214 mask name type 0x0000ffff h status_param_0 unsigned min max default unit 0 65535 0 mask name type 0xffff0000 h status_param_1 unsigned min max default unit 0 65535 0 variant 215 mask name type 0x0000ffff h status_param_2 unsigned min max default unit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 116 / 157 address registername access 0 65535 0 mask name type 0xffff0000 h status_param_3 unsigned min max default unit 0 65535 0 0x6f h i nter i m_addr rw mask name type 0x000000ff h i nter i m_addr choice min max default unit 0 215 0 0: p i d i n_target_torque 1: p i d i n_target_flux 2: p i d i n_target_veloc i ty 3: p i d i n_target_pos i t i on 4: p i dout_target_torque 5: p i dout_target_flux 6: p i dout_target_veloc i ty 7: p i dout_target_pos i t i on 8: foc_ i wy_ i ux 9: foc_ i v 10: foc_ i b_ i a 11: foc_ i q_ i d 12: foc_uq_ud 13: foc_uq_ud_l i m i ted 14: foc_ub_ua 15: foc_uwy_uux 16: foc_uv 17: pwm_wy_ux 18: pwm_uv 19: adc_ i 1_ i 0 20: p i d_torque_target_flux_target_torque_actual_flux_actual_d i v256 21: p i d_torque_target_torque_actual 22: p i d_flux_target_flux_actual 23: p i d_veloc i ty_target_veloc i ty_actual_d i v256 24: p i d_veloc i ty_target_veloc i ty_actual ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 117 / 157 address registername access 25: p i d_pos i t i on_target_pos i t i on_actual_d i v256 26: p i d_pos i t i on_target_pos i t i on_actual 27: ff_veloc i ty 28: ff_torque 29: actual_veloc i ty_pptm 30: ref_sw i tch_status 31: home_pos i t i on 32: left_pos i t i on 33: r i ght_pos i t i on 34: enc_ i n i t_hall_status 35: enc_ i n i t_hall_ph i _e_abn_offset 36: enc_ i n i t_hall_ph i _e_aenc_offset 37: enc_ i n i t_hall_ph i _a_aenc_offset 40: enc_init_mini_move_u_d_status 41: enc_init_mini_move_phi_e_phi_e_o ? set 42: s i ngle_p i n_ i f_raw_value_target_torque 43: s i ngle_p i n_ i f_target_veloc i ty 44: s i ngle_p i n_ i f_target_pos i t i on 192: debug_value_1_0 193: debug_value_3_2 194: debug_value_5_4 195: debug_value_7_6 196: debug_value_9_8 197: debug_value_11_10 198: debug_value_13_12 199: debug_value_15_14 200: debug_value_16 201: debug_value_17 202: debug_value_18 203: debug_value_19 208: conf i g_reg_0 209: conf i g_reg_1 210: ctrl_param_10 211: ctrl_param_32 212: status_reg_0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 118 / 157 address registername access 213: status_reg_1 214: status_param_10 215: status_param_32 0x74 h watchdog_cfg rw mask name type 0x00000003 h watchdog_cfg choice min max default unit 0 3 0 0: no action on watchdog error 1: pwm and power stage disable on watchdog error 2: global reset on watchdog error 3: reserved 0x75 h adc_vm_l i m i ts rw mask name type 0x0000ffff h adc_vm_l i m i t_low unsigned min max default unit 0 65535 65535 low limit for brake chopper output brake_out. mask name type 0xffff0000 h adc_vm_l i m i t_h i gh unsigned min max default unit 0 65535 65535 high limit for brake chopper output brake_out. 0x76 h tmc4671_ i nputs_raw r mask name type 0x00000001 h a of abn_raw bool min max default unit 0 1 0 a of abn_raw 0: o ? 1: on mask name type 0x00000002 h b of abn_raw bool min max default unit 0 1 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 119 / 157 address registername access b of abn_raw 0: o ? 1: on mask name type 0x00000004 h n of abn_raw bool min max default unit 0 1 0 n of abn_raw 0: o ? 1: on mask name type 0x00000008 h - bool min max default unit 0 1 0 0: o ? 1: on mask name type 0x00000010 h a of abn_2_raw bool min max default unit 0 1 0 a of abn_2_raw 0: o ? 1: on mask name type 0x00000020 h b of abn_2_raw bool min max default unit 0 1 0 b of abn_2_raw 0: o ? 1: on mask name type 0x00000040 h n of abn_2_raw bool min max default unit 0 1 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 120 / 157 address registername access n of abn_2_raw 0: o ? 1: on mask name type 0x00000080 h - bool min max default unit 0 1 0 0: o ? 1: on mask name type 0x00000100 h hall_ux of hall_raw bool min max default unit 0 1 0 hall_ux of hall_raw 0: o ? 1: on mask name type 0x00000200 h hall_v of hall_raw bool min max default unit 0 1 0 hall_v of hall_raw 0: o ? 1: on mask name type 0x00000400 h hall_wy of hall_raw bool min max default unit 0 1 0 hall_wy of hall_raw 0: o ? 1: on mask name type 0x00000800 h - bool min max default unit 0 1 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 121 / 157 address registername access 0: o ? 1: on mask name type 0x00001000 h ref_sw_r_raw bool min max default unit 0 1 0 ref_sw_r_raw 0: o ? 1: on mask name type 0x00002000 h ref_sw_h_raw bool min max default unit 0 1 0 ref_sw_h_raw 0: o ? 1: on mask name type 0x00004000 h ref_sw_l_raw bool min max default unit 0 1 0 ref_sw_l_raw 0: o ? 1: on mask name type 0x00008000 h enable_ i n_raw bool min max default unit 0 1 0 enable_ i n_raw 0: o ? 1: on mask name type 0x00010000 h stp of d i rstp_raw bool min max default unit 0 1 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 122 / 157 address registername access stp of d i rstp_raw 0: o ? 1: on mask name type 0x00020000 h d i r of d i rstp_raw bool min max default unit 0 1 0 d i r of d i rstp_raw 0: o ? 1: on mask name type 0x00040000 h pwm_ i n_raw bool min max default unit 0 1 0 pwm_ i n_raw 0: o ? 1: on mask name type 0x00080000 h - bool min max default unit 0 1 0 0: o ? 1: on mask name type 0x00100000 h hall_ux_f i lt bool min max default unit 0 1 0 es i _0 of es i _raw 0: o ? 1: on mask name type 0x00200000 h hall_v_f i lt bool min max default unit 0 1 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 123 / 157 address registername access es i _1 of es i _raw 0: o ? 1: on mask name type 0x00400000 h hall_wy_f i lt bool min max default unit 0 1 0 es i _2 of es i _raw 0: o ? 1: on mask name type 0x00800000 h - bool min max default unit 0 1 0 0: o ? 1: on mask name type 0x01000000 h - bool min max default unit 0 1 0 cfg_0 of cfg 0: o ? 1: on mask name type 0x02000000 h - bool min max default unit 0 1 0 cfg_1 of cfg 0: o ? 1: on mask name type 0x04000000 h - bool min max default unit 0 1 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 124 / 157 address registername access cfg_2 of cfg 0: o ? 1: on mask name type 0x08000000 h - bool min max default unit 0 1 0 cfg_3 of cfg 0: o ? 1: on mask name type 0x10000000 h pwm_ i dle_l_raw bool min max default unit 0 1 0 pwm_ i dle_l_raw 0: o ? 1: on mask name type 0x20000000 h pwm_ i dle_h_raw bool min max default unit 0 1 0 pwm_ i dle_h_raw 0: o ? 1: on mask name type 0x40000000 h - bool min max default unit 0 1 0 drv_err_ i n_raw 0: o ? 1: on mask name type 0x80000000 h - bool min max default unit 0 1 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 125 / 157 address registername access 0: o ? 1: on 0x77 h tmc4671_outputs_raw r mask name type 0x00000001 h tmc4671_outputs_raw[0] bool min max default unit 0 1 0 pwm_ux1_l 0: o ? 1: on mask name type 0x00000002 h tmc4671_outputs_raw[1] bool min max default unit 0 1 0 pwm_ux1_h 0: o ? 1: on mask name type 0x00000004 h tmc4671_outputs_raw[2] bool min max default unit 0 1 0 pwm_vx2_l 0: o ? 1: on mask name type 0x00000008 h tmc4671_outputs_raw[3] bool min max default unit 0 1 0 pwm_vx2_h 0: o ? 1: on mask name type 0x00000010 h tmc4671_outputs_raw[4] bool min max default unit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 126 / 157 address registername access 0 1 0 pwm_wy1_l 0: o ? 1: on mask name type 0x00000020 h tmc4671_outputs_raw[5] bool min max default unit 0 1 0 pwm_wy1_h 0: o ? 1: on mask name type 0x00000040 h tmc4671_outputs_raw[6] bool min max default unit 0 1 0 pwm_y2_l 0: o ? 1: on mask name type 0x00000080 h tmc4671_outputs_raw[7] bool min max default unit 0 1 0 pwm_y2_h 0: o ? 1: on 0x78 h step_w i dth rw mask name type 0xffffffff h step_w i dth signed min max default unit -2147483648 2147483647 0 step w i dth = 0 => stp pulses ignored, resulting direction = d i r xor sign(step_w i dth), e ? ects p i d_pos i t i on_target 0x79 h uart_bps rw mask name type 0x00ffffff h uart_bps unsigned ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 127 / 157 address registername access min max default unit 0 16777215 9600 9600, 115200, 921600, 3000000 (default=9600) 0x7a h uart_addrs rw mask name type 0x000000ff h addr_a unsigned min max default unit 0 255 0 mask name type 0x0000ff00 h addr_b unsigned min max default unit 0 255 0 mask name type 0x00ff0000 h addr_c unsigned min max default unit 0 255 0 mask name type 0xff000000 h addr_d unsigned min max default unit 0 255 0 0x7b h gp i o_dsadc i _conf i g rw mask name type 0x00000001 h gp i o_dsadc i _conf i g[0] bool min max default unit 0 1 0 sel_ndbgsp i m_gp i o 0: o ? 1: on mask name type 0x00000002 h gp i o_dsadc i _conf i g[1] bool min max default unit 0 1 0 sel_ngp i o_dsadcs_a 0: o ? 1: on ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 128 / 157 address registername access mask name type 0x00000004 h gp i o_dsadc i _conf i g[2] bool min max default unit 0 1 0 sel_ngp i o_dsadcs_b 0: o ? 1: on mask name type 0x00000008 h gp i o_dsadc i _conf i g[3] bool min max default unit 0 1 0 sel_gp i o_group_a_n i n_out 0: o ? 1: on mask name type 0x00000010 h gp i o_dsadc i _conf i g[4] bool min max default unit 0 1 0 sel_gp i o_group_b_n i n_out 0: o ? 1: on mask name type 0x00000020 h gp i o_dsadc i _conf i g[5] bool min max default unit 0 1 0 sel_group_a_dsadcs_nclk i n_clkout 0: o ? 1: on mask name type 0x00000040 h gp i o_dsadc i _conf i g[6] bool min max default unit 0 1 0 sel_group_b_dsadcs_nclk i n_clkout 0: o ? 1: on ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 129 / 157 address registername access mask name type 0x00ff0000 h gpo unsigned min max default unit 0 255 0 mask name type 0xff000000 h gp i unsigned min max default unit 0 255 0 0x7c h status_flags rw mask name type 0x00000001 h status_flags[0] bool min max default unit 0 1 0 pid_x_target_limit 0: o ? 1: on mask name type 0x00000002 h status_flags[1] bool min max default unit 0 1 0 pid_x_target_ddt_limit 0: o ? 1: on mask name type 0x00000004 h status_flags[2] bool min max default unit 0 1 0 pid_x_errsum_limit 0: o ? 1: on mask name type 0x00000008 h status_flags[3] bool min max default unit 0 1 0 pid_x_output_limit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 130 / 157 address registername access 0: o ? 1: on mask name type 0x00000010 h status_flags[4] bool min max default unit 0 1 0 pid_v_target_limit 0: o ? 1: on mask name type 0x00000020 h status_flags[5] bool min max default unit 0 1 0 pid_v_target_ddt_limit 0: o ? 1: on mask name type 0x00000040 h status_flags[6] bool min max default unit 0 1 0 pid_v_errsum_limit 0: o ? 1: on mask name type 0x00000080 h status_flags[7] bool min max default unit 0 1 0 pid_v_output_limit 0: o ? 1: on mask name type 0x00000100 h status_flags[8] bool min max default unit 0 1 0 pid_id_target_limit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 131 / 157 address registername access 0: o ? 1: on mask name type 0x00000200 h status_flags[9] bool min max default unit 0 1 0 pid_id_target_ddt_limit 0: o ? 1: on mask name type 0x00000400 h status_flags[10] bool min max default unit 0 1 0 pid_id_errsum_limit 0: o ? 1: on mask name type 0x00000800 h status_flags[11] bool min max default unit 0 1 0 pid_id_output_limit 0: o ? 1: on mask name type 0x00001000 h status_flags[12] bool min max default unit 0 1 0 pid_iq_target_limit 0: o ? 1: on mask name type 0x00002000 h status_flags[13] bool min max default unit 0 1 0 pid_iq_target_ddt_limit ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 132 / 157 address registername access 0: o ? 1: on mask name type 0x00004000 h status_flags[14] bool min max default unit 0 1 0 pid_iq_errsum_limit 0: o ? 1: on mask name type 0x00008000 h status_flags[15] bool min max default unit 0 1 0 pid_iq_output_limit 0: o ? 1: on mask name type 0x00010000 h status_flags[16] bool min max default unit 0 1 0 ipark_cirlim_limit_u_d 0: o ? 1: on mask name type 0x00020000 h status_flags[17] bool min max default unit 0 1 0 ipark_cirlim_limit_u_q 0: o ? 1: on mask name type 0x00040000 h status_flags[18] bool min max default unit 0 1 0 ipark_cirlim_limit_u_r ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 133 / 157 address registername access 0: o ? 1: on mask name type 0x00080000 h status_flags[19] bool min max default unit 0 1 0 not_pll_locked 0: o ? 1: on mask name type 0x00100000 h status_flags[20] bool min max default unit 0 1 0 ref_sw_r 0: o ? 1: on mask name type 0x00200000 h status_flags[21] bool min max default unit 0 1 0 ref_sw_h 0: o ? 1: on mask name type 0x00400000 h status_flags[22] bool min max default unit 0 1 0 ref_sw_l 0: o ? 1: on mask name type 0x00800000 h status_flags[23] bool min max default unit 0 1 0 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 134 / 157 address registername access 0: o ? 1: on mask name type 0x01000000 h status_flags[24] bool min max default unit 0 1 0 pwm_min 0: o ? 1: on mask name type 0x02000000 h status_flags[25] bool min max default unit 0 1 0 pwm_max 0: o ? 1: on mask name type 0x04000000 h status_flags[26] bool min max default unit 0 1 0 adc_i_clipped 0: o ? 1: on mask name type 0x08000000 h status_flags[27] bool min max default unit 0 1 0 aenc_clipped 0: o ? 1: on mask name type 0x10000000 h status_flags[28] bool min max default unit 0 1 0 enc_n ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 135 / 157 address registername access 0: o ? 1: on mask name type 0x20000000 h status_flags[29] bool min max default unit 0 1 0 enc_2_n 0: o ? 1: on mask name type 0x40000000 h status_flags[30] bool min max default unit 0 1 0 aenc_n 0: o ? 1: on mask name type 0x80000000 h status_flags[31] bool min max default unit 0 1 0 wd_error 0: o ? 1: on 0x7d h status_mask rw mask name type 0xffffffff h warn i ng_mask unsigned min max default unit 0 4294967295 0 table 19: register map for tmc4671 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 136 / 157 7 pinning figure 32: tmc4671 pinout with 3 phase power stage and bldc motor figure 33: tmc4671 pinout with stepper motor ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 137 / 157 figure 34: tmc4671 pinout with dc motor or voice coil i nfo all power supply pins (vcc, vcc_core) must be connected. all ground pins (gnd, gnda, . . . ) must be connected. analog inputs (a i ) are 5v single ended or di ? erential inputs ( i nput range: gnda to v5). use voltage dividers or operational ampli 1 ers to scale down higher input voltages. digital inputs ( i ) resp. ( i o) are 3.3v single ended inputs. i o description a i analog input, 3.3v i digital input, 3.3v i o digital input or digital output, direction programmable, 3.3v o digital output, 3.3v table 20: pin type de 1 nition ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 138 / 157 8 tmc4671 pin table name pin i o description nrst 50 i active low reset input clk 51 i clock input; needs to be 25 mhz for correct timing test 54 i test input, must be connected to gnd en i 55 i enable input eno 32 o enable output status 12 o output for interrupt of cpu (warning & status change) sp i _nscs 6 i sp i active low chip select input sp i _sck 7 i sp i clock input sp i _mos i 8 i sp i master out slave input sp i _m i so 9 o sp i master in slave output, high impedance, when sp i _nscs = 1 uart_rxd 10 i uart receive data rxd for in-system-user commu- nication channel uart_txd 11 o uart transmit data txd for in-system-user com- munication channel pwm_ i 58 i pwm input for target value generation d i r 56 i direction input of step-direction interface stp 57 i step pulse input for step-direction interface hall_ux 38 i digital hall input h1 for 3-phase (u) or 2-phase (x) hall_v 37 i digital hall input h2 for 3-phase (v) hall_wy 36 i digital hall input h3 for 3-phase (w) or 2-phase (y) enc_a 35 i a input of incremental encoder enc_b 34 i b input of incremental encoder enc_n 33 i n input of incremental encoder enc2_a 64 i a input of incremental encoder enc2_b 65 i b input of incremental encoder enc2_n 66 i n input of incremental encoder ref_l 67 i left (l) reference switch ref_h 68 i home (h) reference switch ref_r 69 i right (r) reference switch adc_ i 0_pos 16 a i pos. input for phase current signal measurement i 0 ( i _u, i _x) ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 139 / 157 name pin i o description adc_ i 0_neg 17 a i neg. input for phase current signal measurement i 0 ( i _u, i _x) adc_ i 1_pos 18 a i pos. input for phase current signal measurement i 1 ( i _v, i _w, i _y) adc_ i 1_neg 19 a i neg. input for phase current signal measurement i 1 ( i _v, i _w, i _y) adc_vm 20 a i analog input for motor supply voltage divider (vm) measurement agp i _a 21 a i analog general purpose input a (analog gp i ) agp i _b 22 a i analog general purpose input b (analog gp i ) aenc_ux_pos 25 a i pos. analog input for hall or analog encoder signal, 3-phase (u) or 2-phase (x (cos)) aenc_ux_neg 26 a i neg. analog input for hall or analog encoder signal, 3-phase (u) or 2-phase (x (cos)) aenc_vn_pos 27 a i pos. analog input for hall or analog encoder signal, 3-phase (v) or 2-phase (n) aenc_vn_neg 28 a i neg. analog input for hall or analog encoder signal, 3-phase (v) or 2-phase (n) aenc_wy_pos 29 a i pos. analog input for hall or analog encoder signal, 3-phase (w) or 2-phase (y (sin)) aenc_wy_neg 30 a i neg. analog input for hall or analog encoder signal, 3-phase (w) or 2-phase (y (sin)) gp i o0 / adc_ i 0_mcd 70 i o gp i o or  -demodulator clock input mclk i , clock output mclko, or single bit dac output mdac for adc_ i _0 gp i o1 / adc_ i 1_mcd 71 i o gp i o or  -demodulator clock input mclk i , clock output mclko, or single bit dac output mdac for adc_ i _1 gp i o2 / adc_vm_mcd 74 i o gp i o or  -demodulator clock input mclk i , clock output mclko, or single bit dac output mdac for adc_vm_mcd gp i o3 / agp i _a_mcd / dbgsp i _nscs 75 i o gp i o or  -demodulator clock input mclk i , clock output mclko, or single bit dac output mdac for aenc_ux_mcd, sp i debug port pin dbgsp i _nscs gp i o4 / agp i _b_mcd / dbgsp i _sck 76 i o gp i o or  -demodulator clock input mclk i , clock output mclko, or single bit dac output mdac for aenc_vn_mcd, sp i debug port pin dbgsp i _sck gp i o5 / aenc_ux_mcd / dbgsp i _mos i 1 i o gp i o or  -demodulator clock input mclk i , clock output mclko, or single bit dac output mdac for aenc_wy_mcd, sp i debug port pin dbgsp i _mos i ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 140 / 157 name pin i o description gp i o6 / aenc_vn_mcd / dbgsp i _m i so 4 i o gp i o or  -demodulator clock input mclk i , clock output mclko, or single bit dac output mdac for agp i _a_mcd, sp i debug port pin dbgsp i _m i so gp i o7 / aenc_wy_mcd / dbgsp i _trg 5 i o gp i o or  -demodulator clock input mclk i , clock output mclko, or single bit dac output mdac for agp i _b_mcd, sp i debug port pin dbgsp i _trg pwm_ i dle_h 59 i idle level of high side gate control signals pwm_ i dle_l 60 i idle level of low side gate control signals pwm_ux1_h 39 o high side gate control output u (3-phase) resp. x1 (2-phase) pwm_ux1_l 40 o low side gate control output u (3-phase) resp. x1 (2-phase) pwm_vx2_h 41 o high side gate control output v (3-phase) resp. x2 (2-phase) pwm_vx2_l 42 o low side gate control output v (3-phase) resp. x2 (2-phase) pwm_wy1_h 46 o high side gate control output w (3-phase) resp. y1 (2-phase) pwm_wy1_l 47 o low side gate control output w (3-phase) resp. y1 (2-phase) pwm_y2_h 48 o high side gate control output y2 (2-phase only) pwm_y2_l 49 o low side gate control output y2 (2-phase only) brake 31 o brake chopper control output signal table 21: functional pin description ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 141 / 157 name pin i o description vcc i o1 2 3.3v digital i o supply voltage; use 100 nf decoupling capacitor vcc i o2 13 3.3v digital i o supply voltage; use 100 nf decoupling capacitor vcc i o3 43 3.3v digital i o supply voltage; use 100 nf decoupling capacitor vcc i o4 52 3.3v digital i o supply voltage; use 100 nf decoupling capacitor vcc i o5 61 3.3v digital i o supply voltage; use 100 nf decoupling capacitor vcc i o6 72 3.3v digital i o supply voltage; use 100 nf decoupling capacitor gnd i o1 3 0v digital i o ground gnd i o2 14 0v digital i o ground gnd i o3 44 0v digital i o ground gnd i o4 53 0v digital i o ground gnd i o5 62 0v digital i o ground gnd i o6 73 0v digital i o ground vcccore1 15 1.8v digital core supply voltage output; use 100 nf decoupling ca- pacitor vcccore2 45 1.8v digital core supply voltage output; use 100 nf decoupling ca- pacitor vcccore3 63 1.8v digital core supply voltage output; use 100 nf decoupling ca- pacitor v5 23 5v analog reference voltage gnda 24 0v analog reference ground gndpad C 0v bottom ground pad table 22: supply voltage pins and ground pins ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 142 / 157 9 electrical characteristics 9.1 absolute maximum ratings the maximum ratings may not be exceeded under any circumstances. operating the circuit at or near more than one maximum rating at a time for extended periods shall be avoided by application design. parameter symbol min max unit digital i /o supply voltage vcc i o 3.6 v logic input voltage v i 3.6 v maximum current drawn on vcc i o with no load on pins i _ i o 70 ma maximum current drawn on vcc i o with no load on pins and clock o ? i _ i o_0hz 3 ma maximum current drawn on v5 at fclk = 25mhz i _v5 25 ma maximum current to / from digital pins and analog low voltage i /os ii o 10 ma junction temperature tj -40 125 c storage temperature tstg -55 150 c esd-protection for interface pins (human body model, hbm) vesdap 2 kv esd-protection for handling (human body model, hbm) vesd1 2 kv adc input voltage va i 0 5 v table 23: absolute maximum ratings vcccore is generated internally from vcc i o and shall not be overpowered by external supply. 9.2 electrical characteristics 9.2.1 operational range parameter symbol min max unit junction temperature tj -40 125 c digital i /o 3.3v supply voltage v i o3v 3.15 3.45 v core supply voltage vcc_core 1.65 1.95 v table 24: operational range the  adcs can operate in di ? erential or single ended mode. i n di ? erential mode the di ? erential input voltage range must be in between -2.5v and +2.5v. however, it is recommended to use the input voltage range from -1.25v to 1.25v, due to non-linearity of  adcs. i n single ended mode the operational input range of the positive input channel should be between 0v and 2.5v. recommended maximum input voltage is 1.25v. adcs have ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 143 / 157 9.2.2 dc characteristics dc characteristics contain the spread of values guaranteed within the speci 1 ed supply voltage range unless otherwise speci 1 ed. typical values represent the average value of all parts measured at +25 c. temperature variation also causes stray to some values. a device with typical values will not leave min/max range within the full temperature range. parameter symbol condition min typ max unit i nput voltage low level v i nl vcc i o = 3.3v -0.3 0.8 v i nput voltage high level v i nh vcc i o = 3.3v 2.3 3.6 v i nput with pull-down v i n = 3.3v 5 30 110  a i nput with pull-up v i n = 0v -110 -30 -5  a i nput low current v i n = 0v -10 10  a i nput high current v i n = vcc i o -10 10  a output voltage low level voutl vcc i o = 3.3v 0.4 v output voltage high level vouth vcc i o = 3.3v 2.64 v output driver strength standard i out_drv 4 ma i nput impedance of analog i nput r_adc tj = 25c 85 100 115 k
table 25: dc characteristics all i /o lines include schmitt-trigger inputs to enhance noise margin. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 144 / 157 10 sample circuits please consider electrical characteristics while designing electrical circuitry. most sample circuits in this chapter were taken from the evalutation board for the tmc4671 (tmc4671-eval). 10.1 supply pins please provide vcc i o and v5 to the tmc4671. vcc_core is internally generated and needs just an external decoupling capacitor. place one 100nf decoupling capacitor at every supply pin. table 26 lists additional needed decoupling capacitors. pin name supply voltage additional cap. v5 5v 4.7uf vcc i o 3.3v 4.7uf & 470nf vcccore 1.8v none table 26: additional decoupling capacitors for supply voltages 10.2 clock and reset circuitry the tmc4671 needs an external oscillator for correct operation at 25 mhz. lower frequency results in respective scaling of timings. higher frequency is not supported. the internally generated active low reset can be externally overwritten. i f users want to toggle the reset, a pulse length of at least 500 ns is recommended. when not used, please apply a 10k pull up resistor and make sure all supply voltages are stable. 10.3 digital encoder, hall sensor i nterface and reference switches digital encoders, hall sensors and reference switches usually operate on a supply voltage of 5v. as the tmc4671 is usually operated at a vcc i o voltage of 3.3v, a protection circuit for the tmc4671 input pin is needed. i n 1 g. 35 a sample circuit for the enc_a signal is shown, which can be reused for all encoder and hall signals as well as for reference switch signals. parametrization of the components is given in table 27 for di ? erent operations. figure 35: sample circuit for i nterfacing of an encoder signal ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 145 / 157 application r p u r p d r ln c p 5 v encoder signal 4k7 n.c. 100r 100pf table 27: reference values for circuitry components the raw signal (enc_a_raw) is divided by a voltage divider and 1 ltered by a lowpass 1 lter. a pull up resistor is applied for open collector encoder output signals. diodes protect the input pin (enc_a) against over- and undervoltage. the cuto ? -frequency of the lowpass is: f c = 1 2  r p d c p (39) 10.4 analog frontend analog encoders are encoding the motor position into sinusoidal signals. these signals need to be digitalized by the tmc4671 in order to determine the rotor position. the input voltage range depends on v5 input, which is usually 5v and gnda (usually 0v). due to nonlinearity issues of the adc near input limits, an adc input value from 1v to 4v is recommended. for a single ended application, the sample circuit from 1 g. 36 can be used. all single ended analog input pins (agp i _a, agp i _b and adc_vm) have their negative input value tied to gnda internally, so this sample circuit can also be used for them. figure 36: sample circuit for i nterfacing of a single ended analog signal i f the power stage and the tmc4671 share a common ground, the adc_vm input signal can be generated by a voltage divider to scale the voltage down to the needed range. i f the analog encoder has di ? erential output signals, these can be used without signal conditioning (no op amps), when voltage range matches. di ? erential analog inputs can be used to digitize di ? erential analog input signals with high common mode voltage error suppression. 10.5 phase current measurement the tmc4671 requires two phase currents of a 2 or 3 phase motor to be measured. for a dc motor only one current in the phase needs to be measured (see fig. 38 ). i n the adc engine mapping of current signals to motor phases can be changed. default setting is i 0 to be the current running into the motor in phase u for a 3 phase motor. respectively the current running into the motor from half-bridge x1 of a 2 phase motor. figs. 37 and 38 illustrates the currents to be measured and their positive direction. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 146 / 157 figure 37: phase current measurement: current directions for 2 and 3 phase motors figure 38: phase current measurement: current direction for dc or voice coil motor there are two main options for measuring the phase currents as described above. first option is to use a shunt resistor and a shunt ampli 1 er like the lt1999 or the ad8418a . the other option is to use a real current sensor, which uses the hall e ? ect or other magnetic e ? ects to implement an isolated current measurement. shunt measurement might be the more cost-e ? ective solution for low voltage applications up to 100v, while current sensors are more useful at higher voltage levels. i n general the sample circuit in 1 g. 39 can be used for shunt measurement circuitry. please consider design guidelines of shunt ampli 1 er supplier additionally. tr i nam i c also supplies power stage boards with current shunt measurement circuitry (tmc-ups10a/70v-eval). for current measurement also current ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 147 / 157 sensors with voltage output can be used. these could use the hall e ? ect or other magnetic e ? ects. main concerns to take about is bandwidth, accuracy and measurement range. figure 39: current shunt ampli 1 er sample circuit 10.6 power stage i nterface the tmc4671 is equipped with a con 1 gurable pwm engine for control of various gate drivers. gate driver switch signals can be matched to power stage needs. this includes signal polarities, frequency, bbm-times for low and high side switches, and an enable signal. please consider gate driver circuitry, when connecting to the tmc4671. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 148 / 157 11 setup guidelines for easy setup of the tmc4671 on a given hardware platform like the tmc4671 evaluation-kit, the user should follow these general guidelines in order to safely set up the system for various modes of operation. i nfo these guidelines 1 t to hardware platforms which are comparable to the tmc4671- evaluation kit. i f system structure di ? ers, con 1 guration has to be adjusted. please also make use of the rtm i adapter and the tmcl i de to setup the system as it reduces commissioning time signi 1 cantly. step 0: setup of sp i communication as a 1 rst step of the con 1 guration of the tmc4671 the sp i communication should be tested by reading and writing for example to the 1 rst registers for identi 1 cation of the silicon. i f communication fails, please check clk and nrst signals. for easy software setup the tmc ap i provided on the tr i nam i c website can be used. step 1: check connections register tmc_ i nputs_raw can be accessed to see if all connected digital inputs are working correctly e.g. sensor signals can be checked by turning the motor manually. step 2: setup of pwm and gatedriver con 1 guration the user should choose the connected motor and the number of polepairs by setting register mo- tor_type_n_pole_pa i rs. for a dc motor the number of pole pairs should be set to one. the pwm can be con 1 gured with the corresponding registers pwm_polar i t i es (gate driver polarities), pwm_maxcnt (pwm frequency), pwm_bbm_h_bbm_l (bbm times), and pwm_sv_chop (pwm mode). after setting the register pwm_sv_chop to 7 the pwm is on and ready to use. please check pwm outputs after turning on the pwm, if you are using a new hardware design. step 3: open loop mode i n the open loop mode the motor is turned by applying voltage to the motor. this mode is useful for test and setup of adcs and position sensors. i t is activated by setting the corresponding registers for ph i _e_select i on, and mode_mot i on. with ud_ext the applied voltage can be regulated upwards until the motor starts to turn. acceleration and target velocity can be changed by their respective registers. step 4: setup of adc for current measurement please setup the current measurement by choosing your applications adc con 1 guration. make sure to match decimation rate of the delta sigma adcs to your choosen pwm frequency. when the motor turns in open loop mode the current measurement can be easily calibrated. please match o ? set and gain of phase current signals by setting the corresponding registers. please also make sure for a new hardware setup, that current measurements and pwm channels are matched. this can be done by matching phase voltages and phase currents. register adc_ i _select can be used to switch relations. step 5: setup of feedback systems i n open loop mode also the feedback systems can be checked for correct operation. please con 1 gure reg- isters related to used position sensor(s) and compare against open loop angles. use encoder initialization routines to set angle o ? sets for relative position encoders according to application needs. step 6: setup of foc controllers please con 1 gure your application s feedback system and con 1 gure position and velocity signal switches accordingly inside the foc. con 1 gure controller output limits according to you needs. setup p i controller parameters for used foc controllers. start with the current controller, followed by the velocity controller, followed by the position controller. stop con 1 guration at your desired cascade level. tr i nam i c recommends to set the p i controller parameters by support of the rtm i , as it supports realtime access to registers and the tmcl i de o ? ers tools for automated controller tuning. controller tuning without realtime access might lead to poor performance. please choose afterwards your desired motion mode and feed in reference values. step 7: advanced functions for performance improvements biquad 1 lters and feed forward control can be applied. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 149 / 157 12 package dimensions package: qfn76, 0.4 mm pitch, size 11.5 mm x 6.5 mm. figure 40: qfn76 package outline qfn76 package dimensions in mm description dimension[mm] min. typ. max. total thickness a 0.80 0.85 0.90 stand o ? a1 0.00 0.035 0.05 mold thickness a2 0.65 l/f thickness a3 0.203 ref lead width b 0.15 0.2 0.25 body width d 10.5 bsc body length e 6.5 bsc lead pitch e 0.4 bsc ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 150 / 157 qfn76 package dimensions in mm ep size j 8.9 9 9.1 ep size k 4.9 5 5.1 lead length l 0.35 0.40 0.45 lead length l1 0.30 0.35 0.40 package edge tolerance aaa 0.1 mold flatness bbb 0.1 coplanarity ccc 0.08 lead o ? set ddd 0.1 exposed pad o ? set eee 0.1 table 28: package outline dimensions figure 41 shows the package from top view. decals for some cad programs are available on the product s website. figure 41: pinout of tmc4671 (top view) ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 151 / 157 13 supplemental directives 13.1 producer i nformation 13.2 copyright tr i nam i c owns the content of this user manual in its entirety, including but not limited to pictures, logos, trademarks, and resources. ? copyright 2018 tr i nam i c. all rights reserved. electronically published by tr i nam i c, germany. redistributions of source or derived format (for example, portable document format or hypertext markup language) must retain the above copyright notice, and the complete datasheet user manual docu- mentation of this product including associated application notes; and a reference to other available product-related documentation. 13.3 trademark designations and symbols trademark designations and symbols used in this documentation indicate that a product or feature is owned and registered as trademark and/or patent either by tr i nam i c or by other manufacturers, whose products are used or referred to in combination with tr i nam i c s products and tr i nam i c s product docu- mentation. this datasheet is a non-commercial publication that seeks to provide concise scienti 1 c and technical user information to the target user. thus, trademark designations and symbols are only entered in the short spec of this document that introduces the product at a quick glance. the trademark designation /symbol is also entered when the product or feature name occurs for the 1 rst time in the document. all trademarks and brand names used are property of their respective owners. 13.4 target user the documentation provided here, is for programmers and engineers only, who are equipped with the necessary skills and have been trained to work with this type of product. the target user knows how to responsibly make use of this product without causing harm to himself or others, and without causing damage to systems or devices, in which the user incorporates the product. 13.5 disclaimer: life support systems tr i nam i c motion control gmbh & co. kg does not authorize or warrant any of its products for use in life support systems, without the speci 1 c written consent of tr i nam i c motion control gmbh & co. kg. life support systems are equipment intended to support or sustain life, and whose failure to perform, when properly used in accordance with instructions provided, can be reasonably expected to result in personal injury or death. i nformation given in this document is believed to be accurate and reliable. however, no responsibility is assumed for the consequences of its use nor for any infringement of patents or other rights of third parties which may result from its use. speci 1 cations are subject to change without notice. 13.6 disclaimer: i ntended use the data speci 1 ed in this user manual is intended solely for the purpose of product description. no repre- sentations or warranties, either express or implied, of merchantability, 1 tness for a particular purpose ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 152 / 157 or of any other nature are made hereunder with respect to information/speci 1 cation or the products to which information refers and no guarantee with respect to compliance to the intended use is given. i n particular, this also applies to the stated possible applications or areas of applications of the product. tr i nam i c products are not designed for and must not be used in connection with any applications where the failure of such products would reasonably be expected to result in signi 1 cant personal injury or death (safety-critical applications) without tr i nam i c s speci 1 c written consent. tr i nam i c products are not designed nor intended for use in military or aerospace applications or environ- ments or in automotive applications unless speci 1 cally designated for such use by tr i nam i c. tr i nam i c conveys no patent, copyright, mask work right or other trade mark right to this product. tr i nam i c assumes no liability for any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. 13.7 collateral documents & tools this product documentation is related and/or associated with additional tool kits, 1 rmware and other items, as provided on the product page at: www.trinamic.com . ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 153 / 157 14 errata the errata of the tmc4671-es are listed here and in the particular descriptions they apply to. 1. sp i slave i nterface the sp i slave i nterface in the tmc4671-es shows following error. during transaction of msb of read data might get corrupted. this shows in two di ? erent ways. first one is a 40 ns pulse (positive or negative) on m i so at the beginning of transfer of that particular bit. this pulse can corrupt the msb of read data and this error can be avoided when sp i clock frequency is set to 1 mhz. second error also corrupts msb of read data when msb of regsiter is unstable. for example current measurement noise around zero. i n this case msb should be ignored when possible. please also make sure that e.g. actual torque value can be read from register p i d_torque_flux_actual or from i nter i m_data register, where it is showing up in the lower 16 bits. these errors will be 1 xed in next i c version. sp i write access is not a ? ected and can be performed at 8 mhz clock frequency. 2. realtime monitoring i nterface the tr i nam i c realtime monitoring i nterface can not be used with galvanic isolation as timing of sp i communication is too strict. this will be 1 xed in future version so galvanic isolation of sp i signals will be possible with de 1 ned latency of isolators. 3. p i controllers the p factor in the advanced position controller is not properly scaled. due to the high gain in velocity control loop, the position controller gain should be respectively low. the p factor normalization of q8.8 does not match these needs. this will be changed in a future version of the chip to a di ? erent q format. this change will cause changes in user s application controller software. we recommend to use the classical p i control structure if performance is not su z cient. the integrator in the advanced p i controller is not reset when p or i parameters are set to zero. as a workaround controller can be disabled by switching to stopped mode or to a lower cascade level and thereby the integrator is reset. this behaviour will be changed in the next i c version. 4. i nbuilt adcs the inbuilt delta sigma adcs show an error, where both groups are disturbing each other. when one group is deactivated, everything is 1 ne, but with both groups being active adc data might be corrupted. this error occurs if clock signals of both groups are not in phase. clock phase can be changed by toggling the dsadc_mclk_b to a non-round 1 gure like 0x30000001 and back to 0x20000000. this toggling has to be repeated until measurement is clean. i f the second adc group is not needed, it can be shut down by setting dsadc_mclk_b to 0. the distortion can be detected by monitoring measurement at reference voltage. use register ds_analog_ i nput_stage_cfg to switch on the reference voltage for monitoring. 5. pins pwm_ i dle_h and pwm_ i dle_l without function pins pwm_ i dle_h and pwm_ i dle_l are intended to determine power on reset gate driver polarity. this feature is not working properly as the gate driver polarity always powers up to low side polarity to be active low and high side polarity to be active high. this will be corrected in the next version of the chip. 6. space vector pwm does not allow higher voltage utilization the space vector pwm does not allow higher voltage utilization. this will be 1 xed in next version of the chip. 7. step direction counter not used as target position the step direction interface correctly counts up and down the target position, but the step direction counter position is not used as the target position for positioning as intended. the tmc4671-es always uses the target position written via sp i , rtm i , or uart into the register bank as the target position for positioning. as a work around for evaluation of step direction target position control, the user can read out the target position periodically and write it back to the register bank as the ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 154 / 157 target position. but step loss can occur in this con 1 guration as the step direction counter is also overwritten. this will be 1 xed in next version of the chip. ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 155 / 157 15 figures i ndex 1 foc basic principle . . . . . . . . . . . 8 2 p i d architectures and motion modes 9 3 orientations uvw (foc3) and xy (foc2) 13 4 compass motor model w/ 3 phases uvw (foc3) and compass motor model w/ 2 phases (foc2) . . . . . . . 13 5 hardware foc application diagram . 14 6 hardware foc block diagram . . . . . 14 7 sp i datagram structure . . . . . . . . 15 8 sp i timing . . . . . . . . . . . . . . . . 16 9 connector for real-time monitoring i nterface (connector type: hirose df20f-10dp-1v) . . . . . . . . . . . . . 17 10 uart read datagram (tmc4671 regis- ter read via uart) . . . . . . . . . . . . 18 11 uart write datagram (tmc4671 regis- ter write via uart) . . . . . . . . . . . 18 12 n_pole_pa i rs - number of pole pairs (number of poles) . . . . . . . . . . . . 22 13 i nteger representation of angles as 16 bit signed (s16) resp. 16 bit unsigned (u16) . . . . . . . . . . . . . . . . . . . . 22 14 delta sigma adc con 1 gurations dsadc_conf i g (analog (internal), mclko, mclk i , mdac) . . . . . . . . . 25 15  adc con 1 gurations - mdac (comparator-r-c-r as  -modulator) 29 16 adc selector and scaler with o ? set correction . . . . . . . . . . . . . . . . 34 17 abn i ncremental encoder n pulse any- where between 0 and 360 . . . . . . 36 18 encoder abn timing . . . . . . . . . . 37 19 hall sensor angles . . . . . . . . . . . 38 20 analog encoder (aenc) signal wave- forms . . . . . . . . . . . . . . . . . . . 39 21 analog encoder (aenc) selector & scaler w/ o ? set correction . . . . . . 40 22 encoder i nitialization by minimal movement . . . . . . . . . . . . . . . . 41 23 flux ramping . . . . . . . . . . . . . . 42 24 advanced p i controller structure . . . 44 25 p i controllers for position, velocity and current . . . . . . . . . . . . . . . . . . 45 26 i nner foc control loop . . . . . . . . 46 27 foc transformations . . . . . . . . . . 47 28 motion modes . . . . . . . . . . . . . . 47 29 biquad filters in control structure . . 50 30 dt1 element structure . . . . . . . . . 51 31 bbm timing . . . . . . . . . . . . . . . 53 32 tmc4671 pinout with 3 phase power stage and bldc motor . . . . . . . . . 136 33 tmc4671 pinout with stepper motor 136 34 tmc4671 pinout with dc motor or voice coil . . . . . . . . . . . . . . . . . 137 35 sample circuit for i nterfacing of an en- coder signal . . . . . . . . . . . . . . . 144 36 sample circuit for i nterfacing of a sin- gle ended analog signal . . . . . . . . 145 37 phase current measurement: current directions for 2 and 3 phase motors . 146 38 phase current measurement: current direction for dc or voice coil motor . 146 39 current shunt ampli 1 er sample circuit 147 40 qfn76 package outline . . . . . . . . 149 41 pinout of tmc4671 (top view) . . . . 150 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 156 / 157 16 tables i ndex 1 order codes . . . . . . . . . . . . . . . 5 2 sp i timing parameter . . . . . . . . . 16 3 single pin i nterface motion modes . . 19 4 numerical representations . . . . . . 20 5 examples of u16, s16, q8.8, q4.12 . . 21 6 examples of u16, s16, q8.8 . . . . . . 23 7  adc con 1 gurations . . . . . . . . 25 8 registers for delta sigma con 1 guration 26 9 delta sigma mclk con 1 gurations . . 26 10 recommended decimation parame- ter mdec . . . . . . . . . . . . . . . . . 27 11 recommended input voltage range from v_m i n25%[v] to v_max75%[v] for internal delta sigma modulators; v_supply[v] = 5v is recommended for the analog part of the tmc4671. . . . 28 12 delta sigma input voltage mapping of internal delta sigma modulators . . . 28 13 delta sigma r-c-r-cmp con 1 gurations 30 14 delta sigma input voltage mapping of external comparator (cmp) . . . . . . 31 15 example parameters for adc_ga i n . 32 16 motion modes . . . . . . . . . . . . . . 48 17 tabstatusflags . . . . . . . . . . . . . 55 18 tmc4671 registers . . . . . . . . . . . 59 19 register map for tmc4671 . . . . . . 135 20 pin type de 1 nition . . . . . . . . . . . 137 21 functional pin description . . . . . . . 140 22 supply voltage pins and ground pins 141 23 absolute maximum ratings . . . . . . 142 24 operational range . . . . . . . . . . . 142 25 dc characteristics . . . . . . . . . . . . 143 26 additional decoupling capacitors for supply voltages . . . . . . . . . . . . . 144 27 reference values for circuitry compo- nents . . . . . . . . . . . . . . . . . . . 145 28 package outline dimensions . . . . . 150 29 i c revision . . . . . . . . . . . . . . . . 157 30 document revision . . . . . . . . . . . 157 ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com
tmc4671 datasheet ? i c version v1.00 | document revision v1.04 ? 2018-dec-11 157 / 157 17 revision history 17.1 i c revision version date author description v1.00 2017-jul-03 ll, om engineering samples tmc4671-es (1v00 2017-07-03-19:43) table 29: i c revision 17.2 document revision version date author description v0.9 2017-sep-29 ll, om pre-liminary tmc4671-es datasheet. v0.91 2018-jan-30 om changed some typos and added some notes. v0.92 2018-feb-28 om changed register descriptions. v0.93 2018-mar-07 om changed some typos and bugs in graphics. v0.94 2018-mar-14 om added errata section. v0.95 2018-may-08 om preparations for launch. v1.00 2018-jun-28 ll errata section updated concerning step/dir. v1.01 2018-jul-19 om added description for status flags v1.02 2018-jul-31 om added description for feed forward control structure v1.03 2018-sep-06 om description of single pin interface and motion modes added v1.04 2018-dec-11 om register map and pictures of p i controllers corrected table 30: document revision ?2018 tr i nam i c motion control gmbh & co. kg, hamburg, germany terms of delivery and rights to technical change reserved. download newest version at www.trinamic.com


▲Up To Search▲   

 
Price & Availability of USB-2-RTMI

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X