TMC457 – DATA SHEET S-profile motion controller with PID feedback control and high resolution micro stepping sequencer for stepper motors and piezo motors ® TRINAMIC Motion Control GmbH & Co. KG Sternstraße 67 D – 20357 Hamburg GERMANY www.trinamic.com 1 Features The TMC457 is a high end single axis micro stepping motion controller. It adds to any microcontroller TM or processor with SPI (SPI is Trademark of Motorola) interface. It is intended for applications, where a precise and fast, jerk-free motion profile is desired. An encoder can be added for extremely quick and precise positioning using the internal hardware PID regulator and provides for increased reliability / fault detection. The high-resolution micro step sequencer directly controls stepper motors and piezo motors. Wide range motion control parameters eliminate any “gear switching”. The TMC457 supports linear velocity ramps and S-shaped velocity ramps. For maximum flexibility all motion control parameters (target position, target velocity, acceleration, deceleration and bow) can be changed any time during motion. Highlights • S-shaped and linear ramps with on-the-fly alteration of all parameters • Programmable high resolution sequencer with (12 bit, 8192 entry) micro step look-up table • Incremental encoder interface with flexible up- and down scaling to match drive resolution TM • Fast and stable easyPID PID controller • 32 bit registers – from mHz to MHz / from nanometer to meter • SPI interface to microcontroller • Reference switch processing / virtual stop switches (programmable soft limits) • Step / direction output (with programmable timing) • Position pulse output to trigger external events • Synchronization of multiple axis via scalable step / direction input • Direct interface for TMC246/TMC249 family stepper motor drivers supports StallGuard™ (pat.) • ChopSync™ (pat. fil.) built in for best motor velocity range • Analog high resolution motor driver control via external dual 12 bit DAC • Automatic load angle limitation using encoder for stepless servo behaviour Types of Motors • Two phase stepper motors (direct sequencer support) ® • PiezoMotors (direct sequencer support for PiezoMotor’s PiezoLEGS motor) • Any type of motor via step/direction interface Applications • Medical and laboratory equipment with high speed motion e.g. for liquid handling • High end placement and positioning systems / High reliability drives • Sub-micrometer positioning (piezo motors) • Active stabilization with incremental encoder and fast PID regulator TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) Life support policy TRINAMIC Motion Control GmbH & Co. KG does not authorize or warrant any of its products for use in life support systems, without the specific written consent of TRINAMIC 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. © TRINAMIC Motion Control GmbH & Co. KG 2008 Information given in this data sheet 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. Specification is subject to change without notice. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG 2 TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 3 2 Contents 1 FEATURES ...................................................................................................................................... 1 2 CONTENTS ...................................................................................................................................... 3 2.1 2.2 Figures ...................................................................................................................................... 4 Tables........................................................................................................................................ 4 3 GENERAL DESCRIPTION .............................................................................................................. 5 4 TMC457 BLOCK DIAGRAM AND INTERFACES ........................................................................... 6 TM 4.1 Microcontroller Interface (SPI ) ............................................................................................... 6 4.2 Step Direction Inputs ................................................................................................................. 6 4.3 DAC (LTC2602) Interface ......................................................................................................... 6 4.3.1 Piezo Motor Driver ............................................................................................................. 6 4.4 Stepper Motor Driver Interface (TMC236, TMC239, TMC246, TMC249) ................................. 7 4.4.1 Stepper Motor Driver (high resolution micro stepping) ...................................................... 7 4.4.2 Stepper Motor Driver (low resolution micro stepping) ........................................................ 7 5 FUNCTIONAL BLOCKS AND REGISTERS ................................................................................... 8 5.1 Ramp Generator ....................................................................................................................... 8 5.2 ABN Incremental Encoder Interface.......................................................................................... 8 5.2.1 Setting the encoder to match the motor resolution: ........................................................... 9 5.3 Vector control ............................................................................................................................ 9 5.3.1 Initialization of vector control mode .................................................................................. 10 TM 5.4 PID Controller - easyPID ...................................................................................................... 10 5.5 Step Direction Output Interface ............................................................................................... 11 5.6 Step Direction Input Interface for multi axis interpolation ........................................................ 11 5.7 Reference Switch and Stop Switch Interface .......................................................................... 11 5.8 Micro Step Sequencer ............................................................................................................. 11 TM 5.8.1 ChopSync CHOPCLK .................................................................................................. 11 5.9 Type and Version Register / Version specific notes and known bugs .................................... 12 5.10 Interrupt Controller ............................................................................................................... 12 5.11 Sine Wave Look-up Table (SIN-LUT) Access and Parameterization.................................. 13 5.11.1 Calculation of the Sine Wave Look-Up-Table to drive a Piezo Motor .............................. 13 5.11.2 Calculation of the Sine Wave Look-Up-Table to drive a Stepper Motor .......................... 13 6 REGISTER MAPPING ................................................................................................................... 14 6.1 SPI Datagram Structure .......................................................................................................... 14 6.1.1 Selection of Write / Read (WRITE_notREAD) ................................................................. 14 6.1.2 Data Alignment ................................................................................................................ 15 6.2 Register Block Structure – Register Mapping ......................................................................... 15 6.2.1 Nomenclature of Read / Write / Clear on Read / Clear on Write of Registers ................. 15 6.2.2 Time Scaling by Clock Frequency ................................................................................... 15 6.2.3 Real World Units vs. Units of the TMC457 ...................................................................... 26 7 EXAMPLES .................................................................................................................................... 27 7.1 7.2 How to Get a Motor Running ................................................................................................... 27 Set Incremental Encoder Interface Parameters ...................................................................... 27 8 NOTATION OF NUMBER SYSTEMS ........................................................................................... 28 9 PINNING, PACKAGE, AND ELECTRICAL DATA OF THE TMC457 ........................................... 29 9.1 Pinning of TMC457.................................................................................................................. 29 9.1.1 Pull-Up / Pull-Down Resistances ..................................................................................... 32 9.1.2 Blocking Capacitors ......................................................................................................... 32 9.2 Package Outlines and Dimensions ......................................................................................... 33 Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 9.2.1 4 Fine Pitch BGA Package with 144 Balls (FBGA144) of TMC457-BC .............................. 33 10 MICRO CONTROLLER INTERFACE (SPI) ............................................................................... 34 11 CHARACTERISTICS .................................................................................................................. 35 12 LITERATURE ............................................................................................................................. 36 13 REVISION HISTORY .................................................................................................................. 36 2.1 Figures Figure 1 : Functional Block Diagram of the TMC457............................................................................... 5 Figure 2 : TMC457 with Piezo Motor Interface ........................................................................................ 6 Figure 3 : High Resolution Micro Stepping Configuration ........................................................................ 7 Figure 4 : Stepper Motor Driver Configuration (SPI)................................................................................ 7 Figure 5 : Outline of ABN Signals of an Incremental Encoder ................................................................. 8 Figure 6 : Incremental Encoder Signals Outline (AB w/o clear pulse N) ............................................... 28 Figure 7 : Package Outline Drawing FBGA144 – (JEDEC MO-192 VAR DAD-1) ................................. 33 Figure 8 : Timing Diagram of the Serial Micro Controller Interface ....................................................... 34 Figure 9 - General IO Timing Parameters ............................................................................................. 35 2.2 Tables TM Table 1 : PWM frequency calculation for ChopSync .......................................................................... 12 Table 2: TMC457-BC Pin Out ................................................................................................................ 32 Table 3 : Dimensions of FBGA144 (Note: BSC = Basis Spacing Between Centers) ............................ 33 Table 4: Timing Characteristics of the Micro Controller Serial Peripheral Interface (SPI) ..................... 34 Table 5 - Absolute Maximum Ratings .................................................................................................... 35 Table 6 – DC Ccharacteristics Operating Conditions ............................................................................ 35 Table 7 - Power Dissipation ................................................................................................................... 35 Table 8 - General IO Timing Parameters .............................................................................................. 35 Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 5 3 General Description one capacitor per supply pin CLK ENABLE NSCS SCK Host CPU SPI Interface SDI SDO NINT POSCOMP +3.3V +1.5V 100n 100n GND RES +3.3V +1.5V The TMC457 has been designed with TRINAMIC's background of more than 10 years of dedicated motion control ICs for stepper motors, like the 6 axis controller TMC406, the low cost 3 axis controller TMC428 and the high end controller TMC453 with its compatible successor TMC454. While there lie 10 years of development and experience between the TMC453 and the TMC457, the basic features look similar, but a lot of ideas, application know-how and customer feedback have been evaluated, sorted and flown into the design. The intention in creating the TMC457 was to provide a motion controller that provides superior performance, which can hardly be achieved by software in a processor system, while providing a very easy-to-use interface to the programmer, which looks similar to the peripherals found in a microcontroller. The electronic gear shift / pre-scaling found in our other motion controllers was eliminated by extending position and velocity registers to 32 bits. This direct control makes it easy to use the full range and precision of parameter setting. The easyPID™ closed loop PID regulator eases the achievement of control loop stability by providing a programmable hysteresis. Some features found in the TMC453 and TMC428 have been streamlined, to make them easier to use and some options have been removed, like the programmable sequencer for many different motor types, bearing in mind the most common applications. TMC457 RES I I CLK Interface Section I Motion profile generation Sequencer O I I I SPI bus interface Register Block O O O Interrupt control target S-Ramp generator O v Trapezoid Ramp generator Output Pulse generator Pulse generator O O STEP/ DIR O O control & status Position Counter Microstep RAM 8192*12 Position compare 2 phase stepper & piezo sequencer O O O O O STEP_IN Optional Step/ Dir Input DIR_IN I I easyPID PID controller STEP DIR Prescaler TMC24x SPI interface PID Stop / Reference Switches Optional Incremental Encoder STOPL STOPR ENC_A ENC_B ENC_N I I Stop input processing & virtual stop switches I O O I I Encoder I I I O quadrature decoder ChopSync Encoder Scaler & Counter Figure 1 : Functional Block Diagram of the TMC457 Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG O STEP_OUT DIR_OUT XSTEP_OUT Step/Dir Output HIRES_OUT STDBY_OUT PHA PHB Classic stepper driver NCS_DAC SCK_DAC SDO_DAC_A SDO_DAC_B PZO_EN Analog control of Stepper / Piezo via DAC (LTC2622) NCS_DRV SCK_DRV SDO_DRV SDI_DRV NANA_SPI TMC246 / TMC249 stepper driver ChopClk synchronized chopper clock TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 6 4 TMC457 Block Diagram and Interfaces Figure 1 shows the block diagram of the TMC457 motion controller. The TMC457 is equipped with a SPI interface for communication with the microcontroller. It uses a fixed data length of 40 bit – 8 bit address and 32 data. The TMC457 has a driver SPI to directly control the TRINAMIC stepper motor drivers TMC236, TMC239, TMC246, and TMC249. It supports processing of StallGuard information to emulate a reference switch, when using TMC246 or TMC249. The TMC457 has step direction input and step direction outputs as well to allow the control of step direction power stages (like the TMC332) or for external monitoring of motion by step pulse counting. For high precision micro stepping the TMC457 is equipped with a DAC interface for LTC2602. This allows control of the TMC236 family with extended microstep resolution or control of external power drivers with the classical analog control. An incremental encoder interface is added for processing incremental encoders with digital quadrature signal outputs (ABN). The position available from the quadrature signal decoder is directly available as an input for the PID position regulator. The PID regulator is for position stabilization also during motion. The PID regulator runs at an update rate of 100kHz and thus provides fastest response times. 4.1 Microcontroller Interface (SPITM) The SPI for communication with the microcontroller to set motion control parameters (velocity, acceleration, bow, …) of the TMC457 and to send motion command for positioning (set target position) and continuous motion applications (set velocity). 4.2 Step Direction Inputs In addition to the SPI for micro controller communication with the TMC457, the motion can be controlled externally via the step direction inputs STEP_IN and DIR_IN. 4.3 DAC (LTC2602) Interface The DAC interface directly controls LTC2602 from Linear Technologies to generate analog output signals (two channels for micro stepping of bipolar two phase stepper motors) and four channels as required for PiezoLEGS motors from the company Piezo-Motors. 4.3.1 Piezo Motor Driver The power four required power stages of the driver for the piezoelectric motor (PiezoLEGS) must be able to drive a 100nF capacitance at 3kHz with an amplitude of 48V each. A power stage with these capabilities is realized for the TMC457 evaluation board. V_REF #1 REF Vout A DAC A PZO_EN +3.3V +3.3V VCC GND GND Vout B LTC2602 Interface nCS_DAC nCS_LD SCK_DAC SCK M2 Control Logic SDI SDO_DAC_A SDO_DAC_B P1 P2 Power Stage Amplifier DAC B M1 LTC2622 2 x DAC 12 Bit # 2 (for Piezo-Motor) REF Vout A DAC A +3.3V VCC GND GND Vout B DAC B M3 M4 nCS_LD SCK Control Logic SDI TMC457 LTC2622 2 x DAC 12 Bit Figure 2 : TMC457 with Piezo Motor Interface Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG P3 P4 TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 4.4 7 Stepper Motor Driver Interface (TMC236, TMC239, TMC246, TMC249) The direct TRINAMIC driver interface of the TMC457 allows the TRINAMIC drivers to be controlled by the TMC457. 4.4.1 Stepper Motor Driver (high resolution micro stepping) For high resolution micro stepping the TMC457 has an interface for dual SPI DAC LTC2602. CHOPCLK OSC #1 TMC457 V_REF Vout A REF RA1 DAC A INA RA2 +3.3V VCC GND GND Vout B RB1 DAC B PZO_EN LTC2602 Interface GND nCS_DAC nCS_LD SCK_DAC SCK TMC236 TMC239 TMC246 TMC249 Control Logic SDI SDO_DAC_A SDO_DAC_B INB RB2 (open) LTC2622 2 x DAC 12 Bit +3.3V nCS_DRV TMC236 / TMC239 TMC246 / TMC249 SPE CSN SCK_DRV SCK SDO_DRV SDI Interface SDI_DRV SDO nANA_SPI ANN Figure 3 : High Resolution Micro Stepping Configuration 4.4.2 Stepper Motor Driver (low resolution micro stepping) For low resolution micro stepping, a TRINAMIC driver can be connected directly via SPI without an additional DAC. With this, one can drive with 16 times micro stepping. TMC457 CHOPCLK PZO_EN nCS_DAC SCK_DAC LTC2602 Interface SDO_DAC_A SDO_DAC_B OSC (open) INA (open) INB GND TMC236 TMC239 TMC246 TMC249 (open) (open) (open) (open) +3.3V nCS_DRV TMC236 / TMC239 TMC246 / TMC249 SPE CSN SCK_DRV SCK SDO_DRV SDI Interface SDI_DRV SDO +3.3V nANA_SPI ANN Figure 4 : Stepper Motor Driver Configuration (SPI) Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 8 5 Functional Blocks and Registers 5.1 Ramp Generator The ramp generator is the heart of the motion controller. It runs either ramp with linear velocity profile or ramp with s-shape velocity profile. The selection is done by the bow parameter. Setting bow to 0 selects linear velocity profile. Linear ramps perform the quickest motion, by using the maximum available acceleration at all times. But, since the acceleration becomes switched on and off abruptly, system resonances can occur. They appear like an additional load on the motor, thus reducing the available useful portion of motor torque. Further, system resonances need some time to fade away, and this can costs valuable system time, if a complete stand still is required, before other actions can start. With the S-shaped ramp, resonances can be reduced. However, it is advised to choose the bow parameter as high as possible, in order to optimize positioning time. The ramp generator provides four modes of operation: […] It should be noted, that the choice of the microstep resolution directly influences the complete ramp generator parameter settings, because a higher microstep resolution means a higher end velocity setting, and thus a higher acceleration and a higher bow parameter to yield the same results. This way, the settings are scaled in a huge range, e.g. when changing between fullstep and highest resolution microstep. Attention: At all times, all parameters may be changed, but it should be noted, that unexpected results may occur, when changing the bow parameter to a lower value during an acceleration phase, or when changing the acceleration or deceleration parameter to a lower value. In these cases, the maximum positioning velocity, respectively the target position could be exceeded, in case the new values do not allow decelerating quickly enough. Even an overrun of the register value could occur and lead to unexpected results. Under normal circumstances, the bow parameter will be fixed in an application. position -4 -3 -2 -1 0 1 2 3 4 5 6 7 A B N t Figure 5 : Outline of ABN Signals of an Incremental Encoder 5.2 ABN Incremental Encoder Interface The TMC457 is equipped with an incremental encoder interface for ABN encoders that gives positions via digital incremental quadrature signals (usually named A and B) and a clear signal (usually named N for null of Z for zero). The N signal can be used to clear a position. It might be necessary to disable the clearing of the encoder position after the first N signal event because the encoder gives this signal once for each revolution and for most applications a motor turns more than one revolution. The encoder constant named enc_const is added or subtracted on each position change of the quadrature signals AB of the incremental encoder. The encoder constant enc_const represents an unsigned fixed point number (16.16) to facilitate the generic adaption between motors and encoders. In Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 9 decimal mode, the lower 16 bit represent a number between 0 and 9999. This is especially important for piezo motors (PiezoLEGS) because they do not have a fixed step length they achieve their very high positioning precision in the range of nanometers via closed loop control together with a position encoder. For stepper motors equipped with incremental encoders the fixed number representation allows very comfortable parameterization. Additionally, gear can easily be taken into account. The encoder counter named x_enc holds the current determined encoder position. Different modes concerning handling of the signals A, B, and N take active low and active high signals of usual incremental encoders into account. For details please refer to the register mapping section 6 Register Mapping, page 14 ff. The register enc_status holds the status concerning event of the ABN signals. The register enc_latch stores the actual encoder position on an N signal event. The register x_latch stores the position while a reference switch event occurs. A register named enc_warn_dist (encoder warning distance) is used to generate an interrupt via the TMC457 interrupt controller if the distance between encoder position and actual position is larger then enc_warn_dist. The calculated error pid_e is available from the PID controller unit. Therefore, the PID controller needs to be enabled. 5.2.1 Setting the encoder to match the motor resolution: Encoder example settings for motor parameters: 2048 µsteps, 200FS 409600 / U Factor = FS*µS / EncPOS Encoder example settings for a 200 fullstep motor with 2048 microsteps Encoder resolution 200 360 500 1000 1024 3600 4000 4096 8192 16384 32768 5.3 required encoder factor 2048 1137,7778 = 74565404,4444 / 2^16 = 11377777,7778 / 10000 819,2 = 53687091,2 / 2^16 = 8192000 / 10000 409,6 400 113,7778 102,4 100 50 25 12.5 comment No exact match possible! exact match with decimal setting exact match with decimal setting No exact match possible! exact match with decimal setting Vector control The vector control unit allows a load angle based motor control. This makes the motor behave like a servo motor, i.e. it can be overloaded or stopped, and will later on catch up again, using the PID regulator. Therefore, be careful to also activate the PID regulator! Vector control is only possible using binary encoder resolutions, because no decimal setting is available. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 10 Vector control example settings for a 200 fullstep motor Encoder resolution 512 1024 2048 4096 8192 16384 32768 required vector encoder factor 25 12.5 6.25 3.125 = 3 1/8 1.5625 = 1 9/16 0.78125 = 25/32 0.390625 = 25/64 venc_us_const 1600 800 400 200 100 50 25 A 400 fullstep motor needs the double setting Different load angle limits above 90° allow for field weakening operation, which gives a faster motor operation. 5.3.1 Initialization of vector control mode A precise initialization of the vector control mode is critical for best functionality. Also, the encoder needs to have an absolute precision, which is at least ½ fullstep of the motor. For a newly assembled drive, an initial initialization is necessary. This initialization requires that the motor does not see any mechanical load during initialization. Later on, the vector control can be initialized with a stored offset from the initial initialization, using absolute position information, for example based on the encoder N channel. For initial initialization, the following procedure can be followed: The actual encoder position venc_us_pos needs to be initialized for vector control. The position must match selected microstep_adr bits, when the motor is unloaded in its exact position. This for example can be accomplished, by switching the motor to a high standby torque after power on. Directly after a power on, all microstep_adr bits are zero. Now, the motor will be in the exact zero position, as long as it sees no mechanical load. Therefore, now the venc_us_pos can be initialized with zero, in order to match the encoder angle to the electrical angle of the motor. When the absolute position of the encoder is known, the vector control register venc_us_pos can be initialized based on this information. Therefore, the encoder needs to be read out, or the N channel needs to be found, and afterwards the stored offset can be added to the absolute position and be written to venc_us_pos. Be sure to do this in a high priority procedure, because the encoder should not advance a step in the meantime. If this can not be guaranteed, a check and iteration should be done. 5.4 PID Controller - easyPIDTM The PID (Proportional Integral Differential) controller calculates a velocity v based on a position difference error pid_e = enc_x – x_actual where enc_x is the actual position- the real mechanical position -determined by the incremental encoder interface and x_actual is the actual position of the micro step sequencer –the position the TMC457 assumes to be the actual one. With this, the TMC457 moves with this (signed) velocity v until the actual position- measured by the incremental encoder – match. The velocity v to minimize the error e is calculated by t v P e(t ) I e(t ) dt 0 D d e(t ) . dt The motor moves with this velocity v = pid_v_actual until the error e(t) vanishes resp. falls below a programmed limit – the hysteresis pid_tolerance. Primary, the PID regulator is parameterized by its basic parameter P, I, D represented by registers pid_p, pid_i, pid_d. Setting pid_d = 0 makes a PI regulator, additionally setting pid_i = 0 makes a P regulator. For micro controller interaction, the parameter pid_dv_cpu is added to the pid_v_actual. The readable register pid_dv_clip holds the actual value of clipping done by the PID controller of the TMC457. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 11 Due to constraints of practical real word application, the integer part of the PID regulator can be clipped to a limit named pid_iclip. Without this, the integral part of the PID regulator pid_isum increases with each time step by pid_i*pid_e as long as the motor does not follow. The actual error can be read out from register pid_e. The integration over time of the error e is done with a fixed clock frequency of fPID_INTEGRAL[Hz] = fCLK[Hz] / 128. The time scaling for the deviation with respect to time of the error is controlled by the register named pid_clk_div. A stabilization of the target position by programmable hysteresis is integrated to avoid oscillations of regulation when the actual position is close to the real mechanical position. The PID controller of the TMC457 is fast – programmable up to approximate 100kHz update rate at fCLK = 16 MHz of the TMC457 – so that it can be used during motion to stabilized the motion. The parameterization of the TM PID controller of the TMC457 occurs in a direct way. Due to this, it is named easyPID . Nevertheless, the parameterization of a PID controller might need a detailed knowledge of the application and the dynamic of the mechanics that is controlled by the PID controller. Additionally, a special control register allows software interaction for additional feedback control algorithms that can be implemented within the micro controller used to parameterize the TMC457. 5.5 Step Direction Output Interface The TMC457 is equipped with step direction outputs (STEP, OUT). In Addition, it is equipped with a so called X_STEP output. A pulse on this output represents a number of (micro) steps. It is configured by the register named pulse_xstep_div. The TMC457 is able to generate step pulses with up to its clock frequency fCLK[Hz]. Because a step frequency in the range of the clock frequency of the TMC457 might be too high for usual step direction drivers, an additional step output named X_STEP (extended step) is available. The X_STEP represents a number of steps to be done at a lower frequency. The threshold that selects between step pulses and extended step pulses is programmable. This can be parameterized to give full steps on the XSTEP output of the TMC457. 5.6 Step Direction Input Interface for multi axis interpolation The TMC457 is equipped with step direction inputs (STEP_IN, DIR_IN). This allows using the TMC457 with an external ramp generator. A number of TMC457 can be synchronized by interconnecting the step direction inputs and outputs via a switch matrix. One TMC457 is used as master and its step and direction output is fed to the other TMC457. They can be programmed to follow the master pulses scaled by the 15 bit factor sd_scale (and sign). This way, multi-axis interpolation can be realized. The slave motion thus always is equal or slower than the master. When programming the master axis, the maximum allowed acceleration and velocity values of the slave axis have to be considered. The step input is sampled once per system clock. Thus, the maximum input frequency is equal to the half system clock frequency. Please remark, that this also limits the master velocity during interpolated moves. 5.7 Reference Switch and Stop Switch Interface The TMC457 is equipped with reference switch that can be programmed for automatic actions. For details please refer to the register mapping section 6 Register Mapping, page 14 ff. The reference switch inputs are available to store a position on a reference switch event. Additionally, these inputs can be enabled to force a stop. 5.8 Micro Step Sequencer The micro step sequencer can be programmed for different micro step resolutions. The sequencer controls the mixed decay feature of TRINAMIC stepper motor drivers. Current scaling is also done TM under control of the sequencer. When using TMC246 or TMC249 the StallGuard threshold is under control of the sequencer. A readable register holds the TRINAMIC stepper motor driver status bits and diagnosis bits. TM 5.8.1 ChopSync CHOPCLK TM To use the ChopSync feature together with a TRINAMIC stepper motor driver the output CHOPCLK of the TMC457 has to be connected to the PWM oscillator input OSC of the TRINAMIC stepper motor driver (TMC236, TMC239, TMC246, or TMC249) – without a capacitor at the OSC input. The recommended chopper frequency fOSC for the TRINAMIC stepper motor driver is 36kHz. The chopper frequency should not be below 25kHz and must be lower than 50kHz. The chopper frequency is programmed via the register chop_clk_div. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 12 Warning: A chopper clock signal with a too high frequency might damage the stepper motor driver due to dynamic power dissipation overload. fCLK[Hz] 16.000.000 8.000.000 fCLK[Hz] fOSC[Hz] 36.000 25.000 36.000 25.000 fOSC[Hz] chop_clk_div 0x1BC (=444) 0x280 (=640) 0x0DE (=222) 0x140 (=320) fCLK[Hz] / fOSC[Hz] Table 1 : PWM frequency calculation for ChopSync 5.9 TM Type and Version Register / Version specific notes and known bugs The type of the controller and its version can be read out from a register. For the TMC457 version 1.02 one gets 0x00457102 reading the type and version register. This allows hardware detection. Reading the version allows handling of different version by a single software version. Version Bug Description and workaround 1.02 When using linear ramps, setting AMAX to a value lower than 128 results in a strange positioning behavior, when AMAX and DMAX differ. AMAX lower limit with linear ramps This is due to an internal rounding which results in AMAX being used for deceleration rather than DMAX or vice versa. This bug will be corrected in future versions. Workaround: Use AMAX values above 128, when AMAX and DMAX are required to be different. AMAX values below 128 are typically only required, when working with low microstepping resolutions. Alternative: Use S-shaped ramps. -1.03 Stop switches do not become disabled at move in opposite direction while actual velocity is zero When the motor becomes stopped by a stop switch, a movement into the opposite direction is not possible without disabling the stop switch. The reason is that the stop switches are active in any direction when velocity is zero. This bug will be corrected in future versions. Workaround: Disable stop switch when moving into opposite direction. 5.10 Interrupt Controller The interrupt controller is programmable for different conditions. If an interrupt condition occurs the nINT is pulled to low (activated) if the interrupt mask for the corresponding interrupt condition is enabled. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 13 5.11 Sine Wave Look-up Table (SIN-LUT) Access and Parameterization The TMC457 is equipped with an internal RAM (8192 addresses x 12 bit data) to hold a sine wave look-up table for micro stepping. This look-up table has to be initialized first after power up of the TMC457. Depending on the type of motor, a dedicated sine wave table has to be written into the internal RAM of the TMC457. For both, 8192 values of 12 bit integer have to be calculated. The sine LUT RAM is accesses via two register addresses, one for read and one for write. Important Hint: When reading data from RAM, the read data are valid with the next read access. So, the read data are pipelined with a delay of one SPI datagram. 5.11.1 Calculation of the Sine Wave Look-Up-Table to drive a Piezo Motor y(x) = 4096 + 4095 * sin(2 * x/8192 – 2* /8) with x = 0, 1, 2, 3, …, 8189, 8190, 8191. 5.11.2 Calculation of the Sine Wave Look-Up-Table to drive a Stepper Motor y(x) = abs( 4095 * sin(2 * x/8192) ) with x = 0, 1, 2, 3, …, 8189, 8190, 8191. With offset, to adjust current zero crossing, the formula becomes y(x) = offset + abs( (4095 - offset) * sin(2 * x/8192) ) with x = 0, 1, 2, 3, …, 8189, 8190, 8191. The offset has a theoretical range of 0 to 4094. For a practical application, the offset will lie between 0 and 100. When using current scaling, the offset also becomes scaled down – this may be needed to be taken into account! Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 14 6 Register Mapping 6.1 SPI Datagram Structure TM The TMC457 uses 40 Bit SPI (Serial Peripheral Interface, SPI is Trademark of Motorola) datagrams for communication with a micro controller. Micro controllers which are equipped with hardware SPI are typically able to communicate with integer multiples of 8 bit. Each datagram of the TMC457 is composed of an address byte followed by four data bytes. This allows direct 32 bit data word communication with the register set of the TMC457. To have a unified kind of communication, each register is accessed via 32 data bits even if it used less then 32 data bits. For simplification, each register is specified by a one byte address, where the reading address is given with the most significant bit = '0'. For a write access, the most significant bit of the address byte is '1'. Most registers are write only registers, some can be read additionally, and there are also some read only registers. TMC457 40 Bit SPI Datagram Structure MSB (transmitted first) LSB (transmitted last) 39 ... ... 0 8 bit ADDRESS 32 bit DATA 39 ... 32 31 ... 0 8 bit ADDRESS 8 bit DATA 8 bit DATA 8 bit DATA 8 bit DATA 39 ... 32 31 ... 24 23 ... 16 15 ... 8 7 ... 0 1 + 7 bit ADDRESS 8 bit DATA 8 bit DATA 8 bit DATA 8 bit DATA 39 / 38 ... 32 ADDRESS 38...32 31 ... 24 23 ... 16 15 ... 8 7 ... 0 8 bit DATA 8 bit DATA 8 bit DATA 8 bit DATA 3 9 31...28 27...24 23...20 19...16 15...12 11...8 7...4 3...0 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 6.1.1 Selection of Write / Read (WRITE_notREAD) The read and write selection is controlled by the MSB of the address byte (bit 39 of the SPI datagram). This bit is '0' for read access and '1' for write access. So, the bit named W is a WRITE_notREAD control bit. The active high write bit is the MSB of the address byte. So, 0x80 has to be added to the address for a write access. Example: For a read access from the register (x_actual) with the address 0x01, the address byte has to be set to 0x01. For a write access to the register (x_actual) with the address 0x10, the address byte has to be set to 0x80 + 0x01 = 0x81. For read access, the data bit might have any value ('-'). So, one can set them to '0'. READ x_actual WRITE x_actual := 0x89ABCDEF; datagram 0x01000000000; datagram 0x8189ABCDEF; Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 15 TMC457 SPI Datagram Structure MSB (transmited first) 40 bit LSB (transmitted last) 39 ... ... 0 8 bit ADDRESS 32 bit DATA 39 ... 32 31 ... 0 1 + 7 bit ADDRESS 8 bit DATA 8 bit DATA 8 bit DATA 39 / 38 ... 32 38...32 31 ... 24 31...28 27...24 23 ... 16 23...20 19...16 15 ... 8 15...12 11...8 8 bit DATA 7 ... 0 7...4 3...0 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 6.1.2 Data Alignment All data are right aligned. Some registers represent positive value, some represent integer values (signed) as two complement numbers, single bits or groups of bits are represented as single bits respectively as integer groups. 6.2 Register Block Structure – Register Mapping All parameterizations take place by register writes. The access to the registers is via SPI. The ramp generator register set enfolds basic motion control parameters, a ramp generator register set, an TM incremental encoder register set, a PID controller register set – named easyPID , a step direction output configuration register set, a reference switch configuration register set, a micro step sequencer configuration register, a type & version register, an interrupt configuration register, and a sine wave look-up table (LUT) RAM port register. 6.2.1 Nomenclature of Read / Write / Clear on Read / Clear on Write of Registers Units are written in are given in brackets, e.g. [micro steps]. Read only registers are designated by R. Read only registers with automatic clear (C) on read are designated by R+C. Registers that are cleared on write are designated by W+C. Write only registers are designated by W. 6.2.2 Time Scaling by Clock Frequency Time is scaled by the the clock frequency of the TMC457. This scales velocity, acceleration, and bow. So, velocity is given in unit [micro steps per time] and not as [micro steps per second], acceleration is given in unit [micro steps per time^2] and not unit [micro steps per second^2]. Formulas for the conversion into units based on time in seconds is given in section 0, page 26. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 16 Ramp Generator Register Set – Basic Motion Control Parameters R/W Addr Bits Register RW 0x00 9…0 RW R 0x01 0x02 31…0 31…0 x_actual v_actual W 0x03 30…0 v_max W 0x04 31…0 v_target W 0x05 23…0 a_max W 0x06 23…0 d_max W 0x07 23…0 d_stop W 0x08 4…0 W 0x09 31…0 W 0x0A 31…0 R 0x0B 4…0 mode bow_max x_target x_compare status R 0x0C 31…0 a_actual W 0x0D 15…0 sd_scale 0x0E - 0X0F 23…0 W a_max_ d_max Description bit 1,0: ramp_mode 00 = positioning mode 01 = reserved 10 = velocity mode 11 = hold mode bit 2: step_dir_enable bit 4: shaft bit 8: PID_on bit 9: PID_base v_actual Range [Unit] default = %0000000010 Actual position Actual velocity Maximum velocity for positioning mode ± [µsteps] ± [µsteps / t] 0 to $7FFF0000 for any a_max [µsteps / t] ± $7FFF0000 for any a_max [µsteps / t] 0 to $FFFFFD [µsteps / t^2] 0 to $FFFFFD [µsteps / t^2] Target velocity The sign determines the direction in velocity mode and hold mode. Acceleration, unsigned fixed point 16.8 representation Deceleration parameter, unsigned Fixed point 16.8 representation The effective deceleration with s-ramp enabled is 15/16 of d_max. Deceleration for stop event, for security reason it is with bow = 0 S-Ramp configuration 0=linear ramp (trapezoid) bow_index = 1, 2, 3, …, 18 bow_value = 1, 2, 4, …, 262144 Target position for automatic ramp in unit micro steps POSCOMP output function: The position x_compare is compared with either x_actual or the encoder position enc_x. (Selection bit: enc_clr_mode.12.) POSCOMP becomes 0 : for x_actual ≤ x_compare 1 : for x_actual > x_compare; bit 0: target_pos_reached bit 1: target_v_reached bit 2: v_is_zero bit 3: - (reserved) bit 4: enc_warn_dist Actual acceleration value Important note: a_max resp. d_max can be exceeded by up to 1/1024 of the bow_value if 1/1024*bow_value is not an integer divider of a_max resp. d_max Step Direction input control: bit 14…0: sd_scaler bit 15: sd_scale_sign reserved Sets a_max and d_max to the same value with a single write access to register a_max_d_max Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG [µsteps / t^2] bow_value [µsteps / t^3] ± [µsteps] ± [µsteps] 0, …, ± a_max resp. d_max resp. d_stop; [µsteps / t^2] dir & c (caccumulatio n constant-1) [µsteps / t^2] TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 17 0x00: mode - Ramp Generator Register R/W RW Bit 1,0 Function ramp_ mode RW 2 step_dir_ enable RW 4 shaft RW 8 PID_on Value 00 01 10 11 0 1 0 1 0 1 RW 9 PID_base 0 1 Description positioning mode reserved velocity mode (default mode on RESET) hold mode (sets v_actual equal to v_target) step direction inputs are ignored The step and direction inputs (STEP_IN, DIR_IN) become scaled by sd_scale. In this mode, x_target becomes directly controlled by the scaled step inputs. In order to allow the motor to directly follow the control signals, set to positioning mode and set a high acceleration value a_max_d_max with bow set to zero. Normal direction of the output pulse generator Inverts the direction of the output pulse generator PID controller is completely off, all values are frozen. The output pulse generator is fed by v_actual directly. PID controller is on. This mode also allows access to the PID error pid_e, which is required for a number of other functions. For normal operation, also set PID_base flag to v_actual base. The pulse generator output is controlled by the PID calculation result only. The motor will not move, if PID result is zero. PID output base is v_actual. The PID result is added to the velocity output generated by the ramp generator and becomes clipped to 2^31-1. 0x08: bow_max - Ramp Generator Register R/W W Bit 4…0 Function bow_index Value 0 1 to 18 Description The ramp generator uses trapezoid ramps. This corresponds to an infinite bow value. Bow for s-shaped ramps in logarithmic representation. A high bow value leads to a shorter bow phase. The bow_value is added with 1/1024 fCLK[Hz] to acceleration a_actual up to the value set by a_max for acceleration resp. d_max for deceleration. bow_value = 2^(bow_index-1) bow_index = 1, 2, 3, …, 18 bow_value = 1, 2, 4, …, 262144 Attention on bow setting: The resulting bow_value must not exceed A_MAX or D_MAX setting. Otherwise oscillations may result. 0x0b: status - Ramp Generator Register R/W R Bit 0 1 2 3 4 Function target_pos _reached Value 1 target_v_ reached v_is_zero enc_warn_ dist_status 1 1 1 Description Signals that the motor has stopped at the target position (x_actual=x_target), or at a position determined by PositionLimit_L or PositionLimit_R. Signals that v_actual has reached v_target, respectively v_max during an automatic ramp. Signals that the motor has stopped. Unused (reserved) Signals that the deviation between encoder position and actual ramp position exceeds the warning threshold enc_warn_dist. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 18 0x0D: sd_scale - Ramp Generator Register R/W W Bit 14...0 Function sd_scaler Value x 15 sd_scale_ sign 0 1 Description Each step input pulse counts up resp. down x_target by (x+1) / (2^15) Count up when direction input is positive Count down when direction input is positive Encoder Register Set R/W Addr Bits W 0x10 31…0 enc_const RW 0x11 31…0 enc_x W 0x12 12…0 enc_mode R+C 0x13 0 enc_status R 0x14 31…0 enc_latch R 0x15 31…0 x_act_latch W 0x16 Register 19…0 enc_warn_ dist Description Accumulation constant, 16 bit integer part, 16 bit fractional part enc_x accumulates +/- enc_const / (2^16* enc_x) (binary) or +/- enc_const / (10^4* enc_x) (decimal) To switch between decimal and binary setting, see enc_mode bit 13. Use the sign, to match rotation direction! Range [Unit] binary: ± [µsteps/2^16] ±(0…32767.0… 65535) decimal: ±(0…32767.0… 9999) default = 1.0 (=65536) Actual encoder position bit 0 : pol_A bit 1 : pol_B bit 2 : pol_N bit 3 : ignore_AB bit 4 : clr_cont bit 5 : clr_once bit 6 : pos_edge bit 7 : neg_edge bit 8 : clr_enc_x bit 12 : x_comp_sel_enc bit 13 : enc_sel_decimal bit 0 : N_event Encoder N event detected, status bit is cleared on read: Read (R) + clear (C) Encoder position enc_x latched on N event Motor position x_actual latched on reference switch event or virtual stop switch event Warning threshold for motor to encoder deviation (x_actual - enc_x). This function uses pid_e. An interrupt can be triggered when the threshold is exceeded. abs(pid_e) > enc_warn_dist ± [µsteps] Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG [µsteps] [µsteps] [µsteps] TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 19 0x12: enc_mode - Encoder Register R/W Bit 0 1 2 3 4 5 6 Function pol_A pol_B pol_N ignore_AB clr_cont clr_once pos_edge Value x x x x 1 1 1 7 neg_edge 1 8 clr_enc_x 0 1 9 10 11 12 x_comp_ sel_enc enc_sel_ decimal 13 0 1 0 1 Description A polarity when N is active B polarity when N is active defines polarity of N Ignore A and B polarity continuous clear while N is active (clear once per revolution) N event enable, clear on next N event N positive edge trigger (when N becomes active) Disables N level control N negative edge trigger (when N becomes inactive) Disables N level control Upon N event, the enc_x becomes latched to enc_latch only Additionally clear encoder counter enc_x at N-event - (reserved) - (reserved) - (reserved) Source for POSCOMP: x_compare is compared to x_actual x_compare is compared to enc_x Encoder divisor binary: Counts in n/65536 Encoder divisor decimal: Counts in n/10000 Vector Control Register Set R/W Addr Bits Register W 0x17 11…0 venc_us_ const RW 0x18 7…0 venc_us_ pos W 0x19 9…8, 1…0 venc_us_ sel Description Accumulation constant, 6 integer part, 6 bit fractional part venc_us_const = 128*(motor full steps per rotation) / encoder resolution 0.0: vector control off Use the sign, to match rotation direction! Actual encoder position (use for initialization of function – position must match selected microstep_adr bits) bit 0,1 : venc_microstep_resolution 00 = 2048 microsteps 01 = 1024 microsteps 10 = 256 microsteps 11 = 64 microsteps selects bits from microstep_adr (0x33) to match one electrical period bit 8, 9 : venc_phi_load_sel 00 = 90° 01 = 101,25° 10 = 112,5 ° 11 = 121,75° selects maximum motor load angle Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG Range [Unit] ± [µsteps/64] default = 0 (off) [256 / electrical period] TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 20 0x19: venc_us_sel – Vector Control Register R/W W Bit 1, 0 Function venc_us_ sel Value 00 01 10 11 9, 8 venc_phi_ load_sel 00 01 10 11 PID Register Set - easyPID Description 2048 microsteps: microstep_adr bits 12 downto 5 are used determine angle within one electrical period 1024 microsteps: microstep_adr bits 11 downto 4 are used determine angle within one electrical period 256 microsteps: microstep_adr bits 9 downto 2 are used determine angle within one electrical period 64 microsteps: microstep_adr bits 7 downto 0 are used determine angle within one electrical period vector encoder function load angle limit to +/- 90° (64/256 of an electrical period) (max. torque) +/- 101.25° (72/256 of an electrical period) +/- 112,5° (80/256 of an electrical period) +/- 123,75° (88/256 of an electrical period) (max. velocity) to to to to TM R/W Addr Bits Register W 0x20 23…0 pid_p W 0x21 23…0 pid_i W 0x22 23…0 pid_d W 0x23 14…0 pid_iclip R W+C 0x24 31…0 pid_isum pid_d_ clkdiv W 0x25 7…0 W 0x26 - W 0x27 30…0 pid_dv_clip R 0x28 23…0 (31… 0) pid_e R 0x29 31…0 pid_v_actual W 0x2A 19…0 pid_tolerance - Description P parameter (unsigned) update frequency fCLK/128; Result: pid_e*pid_p/256 (becomes clipped to +/-2^31) I parameter (unsigned) Result: (pid_isum/256)*pid_i/256 (becomes clipped to +/-2^31) D parameter (unsigned), pid_e is sampled with a frequency of (fCLK[Hz]/128/pid_d_clkdiv). Result: (pid_e_last–pid_e_now) * pid_d (The delta-error (pid_e_last–pid_e_now) becomes clipped to +/-127) Clipping parameter for pid_isum Clipping of (pid_isum*2^16*pid_iclip) PID integrator sum (signed) Updated with fCLK[Hz]/128 Cleared to zero upon write access Clock divider for D part calculation D-part is calculated with a frequency of: fCLK / (pid_d_clkdiv*128) (attention: pid_d_clkdiv=0 results in 256) Clipping parameter for PID calculation result pid_v_actual pid_v_actual = v_actual + clip(PID_result, pid_dv_clip) Position deviation (for monitoring) pid_e = enc_x – x_actual (clipped to +/-2^23) PID calculation result (with PID_base=0) resp. PID_result + v_actual (PID_base=1) (clipped to +/-2^31) Tolerance for PID regulation If the absolute value of the error pid_e is below pid_tolerance after an exact hit, then the pid_error_in becomes 0 and pid_i_sum is set to zero, until the tolerance zone is left again. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG Range (0: disable) (0: disable) (0: disable) 0…$7F80 ± 1…255, 0 = 1…256 bits 7…0 are always 0 (0: disable PID) ±2^23 ± TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 21 Step Direction Output Configuration Register Set R/W Addr Bits Register W 0x30 28…0 pulse_max W 0x31 15…0 W 0x32 0 step_dir_mode RW 0x33 12…0 microstep_adr W 0x34 11…0 stdby_delay W 0x35 7…0 pulse_length pulse_xstep_div Description Velocity threshold for resolution indication output HIRES_OUT If v_actual ≥ pulse_max then output HIRES = 1 The driver stage can do extended steps based on XSTEP_OUT Pulse divisor for XSTEP_OUT output control One XSTEP_OUT pulse is generated after each pulse_xstep_div steps 0: disable STEP_OUT delay 1: enable STEP_OUT delay after a change of the direction (DIR_OUT) (It is recommended to disable the delay, unless a step / direction drive is used) Actual micro step position within lookup table Stand-by delay, time is given in 1/fCLK / 2^16 Pulse length in clock periods for STEP_OUT and XSTEP_OUT outputs (DIR_OUT remains stable during STEP_OUT active, XSTEP_OUT occurs 2 clock periods later) Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG Range bits 20…0 are always 0 1…65535 default=16 TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 22 Reference Switch Configuration Register Set R/W Addr Bits Register RW 0x40 13…0 switch_mode R, R+C 0x41 6…0 switch_status W 0x42 31…0 pos_limit_L W 0x43 31…0 pos_limit_R Description bit 0: stop_L bit 1: stop_R bit 2: pol_stop_L bit 3: pol_stop_R bit 4: swap_LR bit 5: soft_stop bit 6: en_lim_L bit 7: en_lim_R bit 8: latch_L_act bit 9: latch_L_inact bit 10: latch_R_act bit 11: latch_R_inact bit 12: en_latch_enc bit 13: SG_stop bit 0 : status_stop_L bit 1 : status_stop_R bit 2 : status_latch_L bit 3: status_latch_R bit 4: event_stop_L bit 5: event_stop_R bit 6: event_stop_SG Software controlled stop position, programmable virtual stop switch If enabled, the motor will automatically slow down and come to a stop at the pos_limit rather than crossing it. Software controlled stop position, programmable virtual stop switch If enabled, the motor will automatically slow down and come to a stop at the pos_limit rather than crossing it. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG Range TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 23 0x40: switch_mode – Reference Switch Configuration Register R/W R/W Bit 0 1 2 Function stop_L stop_R pol_stop_L 3 pol_stop_R 4 swap_LR Value 1 1 0 1 0 1 0 1 5 soft_stop 0 1 6 7 8 en_lim_L en_lim_R latch_L_act 1 1 1 9 latch_L_inact 1 10 latch_R_act 1 11 latch_R_inact 1 12 en_latch_enc 0 1 13 stop_SG 1 Description Enable stop switch left Enable stop switch right Left stop switch is positive active (STOP_L=1 stops motor) Left stop switch is negative active (STOP_L=0 stops motor) Right stop switch is positive active (STOP_R=1 stops motor) Right stop switch is negative active (STOP_R=0 stops motor) STOP_L stops motor when driving in negative direction, STOP_R stops motor when driving in positive direction Stop inputs are swapped: STOP_R stops motor when driving in negative direction, STOP_L stops motor when driving in positive direction The motor velocity is switched to 0 when hitting a stop switch (hard stop). SoftStop enable: The motor is slowed down to 0 using a linear ramp using acceleration d_stop when hitting a stop switch. Position limit L pos_limit_L enable (virtual stop switch) Position limit R pos_limit_R enable (virtual stop switch) Latch ramp position to x_act_latch on stop switch left going active. Latch ramp position to x_act_latch on stop switch left going inactive. Latch ramp position to x_act_latch on stop switch right going active. Latch ramp position to x_act_latch on stop switch right going inactive. Encoder position is not latched upon stop switch event. Also latch encoder position together with ramp position to enc_latch. Stop motor on StallGuard event signaled by TMC246 / TMC249 0x41: switch_status – Reference Switch Configuration Register R/W R R+C R R+C Bit 0 1 2 Function status_stop_L status_stop_R status_latch_L Value 1 1 1 3 status_latch_R 1 4 5 6 event_stop_L event_stop_R event_stop_ SG 1 1 1 Description Stop switch left status (1=active) Stop switch right status (1=active) Latch left ready (corresponding to switch_mode latch_L_act or latch_L_inact) (Flag is cleared upon reading) Latch right ready (corresponding to switch_mode latch_R_act or latch_R_inact) (Flag is cleared upon reading) Signals an active stop left condition due to stop switch Signals an active stop right condition due to stop switch Signals an active StallGuard stop event (Flag is cleared upon reading) Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 24 Sequencer Configuration Register R/W RW W Addr 0x50 0x51 0x52 0x53 Bits 8…0 0x54 0x55 W R R seq_mode 23…0 dacscale_icntl 2…0 stallguard_thrs stallguard_ value 0x56 2…0 0x57 2…0 0x58 W Register - (reserved) - (reserved) - (reserved) - (reserved) driver_status - (reserved) chop_clk_div 11…0 0x59 Description bit 3…0: microstep table length Controls the number of microsteps per electrical period. For a stepper motor, the resulting microstep rate is ¼ of the table length. Values: 0: 8192 entries (Default), 1: 4096 entries, … 10: 8 entries, 11: 4 entries (full stepping) bit 8: sequencer stop bit 0..4: current_op bit 7: mixdecay_op bit 8..12: current_sb bit 15: mixdecay_sb StallGuard threshold actual StallGuard value reported by TMC249 Driver status read back information: bit 0 : tmcdrv_error (OT, UV, OCHS, OCB, OCA. i.e. all driver shutdown conditions) bit 1 : tmcdrv_otpw (over temperature pre-warning) bit 2 : tmcdrv_stall (StallGuard) chopper clock frequency register (for safety reasons a value below 96 can not be set) Range default=% 00000000 00000000 10010000 0…7 0…7 96…818 default = 640 0x55: dacscale_icntl – Sequencer Configuration Register R/W W Bit 4…0 7 12…8 15 Function current_op mixdecay_op current_sb mixdecay_sb Value 0…16 1 0…16 1 Description Motor current scale during operation (Default=16) Allows a current scaling by scaling the sine table entries before sending to the DACs or to the SPI stepper drivers. This function is available only for stepper motors. 16 = 100% 15...1 = 15 / 16 ... 1 / 16 0 = DAC disable / stepper driver disable Mixed Decay Enable Operation (Default = 1) Enables the TMC23X / TMC24X mixed decay feature during motor operation. Standby current scale (Default=0) The motor is switched to the standby current after a delay time controller by stdby_delay. Same values as for current_op. Mixed Decay Enable Standby (Default=0) Enables the TMC23X / TMC24X mixed decay feature during motor stand still. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 25 Type & Version Register R/W R Addr 0x60 Bits 23…0 Register version Description TMC457 v. 1.00 0x457100 Range Description bit 0: int_target bit 1: int_deviation bit 2: int_N bit 3: int_stop bit 4: int_drvstatus bit 5: int_ref_L bit 6: int_ref_R bit 7: int_x_comp Same assignments as int_mask register. An active interrupt bit reads out as '1'. Writing a 1 to an active bit resets the interrupt flag. The interrupt output becomes active (low) as soon as at least one bit is set. Range Interrupt Configuration Register R/W Addr Bits Register W 0x61 7…0 int_mask R W+C 0x62 7…0 int_flag 0x61: int_mask – Interrupt Configuration Register R/W W Bit 0 Function int_target Value 1 1 int_deviation 1 2 int_N 1 3 int_stop 1 4 int_drvstatus 1 5 int_ref_L 1 6 int_ref_R 1 7 int_x_comp 1 Description Target position reached interrupt: If set, an interrupt is issued when the motor comes to a stand still at x_target Encoder position mismatch interrupt: If set, an interrupt is issued, when pid_e exceeds the tolerance value pid_tolerance. Encoder N event interrupt : If set, an interrupt is issued upon an encoder N event, as defined by enc_clr_mode. Stop condition interrupt: If set, an interrupt is issued upon a motor stop condition, as defined by switch_mode. Driver status interrupt: If set, an interrupt is issued upon a driver error detected in the driver_status bits. Reference switch left interrupt: If set, an interrupt becomes issued upon activation of the left reference switch. Reference switch right interrupt: If set, an interrupt is issued upon activation of the right reference switch. X_compare matching interrupt: If set, an interrupt is issued, when x_target matches x_compare. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 26 Sine Wave Look-Up Table (LUT) Port Register R/W Addr Bits Register R 0x7F 31…16 15…0 RAM READ (data D of last A) W 0xFF 31…16 15…0 RAM WRITE 6.2.3 Description Range xxxAAAAAAAAAAAAA xxxxDDDDDDDDDDDD (data of this address come on next read) xxxAAAAAAAAAAAAA xxxxDDDDDDDDDDDD Real World Units vs. Units of the TMC457 The units of a TMC457 register content are written as register[457]. Parameter vs. Units Parameter / Symbol fCLK[Hz] s US FS velocity v[Hz] acceleration a[Hz/s] micro step resolution USR (used U instead of µ for micro) Unit [Hz] [s] microstep fullstep microsteps / s microsteps / s^2 v[FS] @ USR US/s a[FS/^2] @ USR US/s^2 ramp_steps[457] = rs [457] counts calculation / description / comment clock frequency of the TMC457 in [Hz] second v[Hz] = v[457] * ( 2 * fCLK[Hz] / 2^31 ) a[Hz/s] = a[457] * fCLK[Hz]^2 / (16*256) / 2^30 micro step resolution in number of microsteps (i.e. the number of microsteps between two fullsteps) v[FS/s] = v[US/2] / USR USR microstep resolution a[FS/s^2] = a[US/s] / USR rs = 2 * (v[457])^2 / (a[457]) / 2^18 micro steps during linear acceleration ramp (if v_max is really reached during acceleration) Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 27 7 Examples Following, some examples are given how to program the TMC457 to do a desired task. The examples are given as sequences of SPI datagram as 40 bit hexadecimal number with an additional comment. $89 12 34 56 78 // set x_target := $12 34 56 78 So, for this example the datagram is $89 12 34 56 78. That datagram sets the register x_target to the hexadecimal value $12345678. 7.1 How to Get a Motor Running // initialize the sine wave look-up table once (either for stepper motor or for piezo motor). for (x=0; x<8192; x++) { y = abs( 8191 * sin(2.0 * 3.141592652 * x / 8192) ); datagram = ( 0x7F << 32 ) | ( x << 16 ) | ( y ); // stepper motor // compose datagram } This results in a sequence of datagramms for initializing the sine wave look-up table as: $FF $FF $FF . . . $FF $FF $FF $00 $00 $07 $FF $00 $01 $08 $01 $00 $02 $08 $02 // ram[ // ram[ // ram[ 0] := 0x07ff; 1] := 0x0801; 2] := 0x0702; $1F $FD $07 $FA $1F $FE $07 $FC $1F $FF $07 $FD // ram[8189] := 0x07FA; // ram[8190] := 0x07FC; // ram[8191] := 0x07FD; // now the motion // 7.2 $80 xx xx xx xx // mode := %00 = ramp_mode positioning mode with linear ramps $83 xx xx xx xx // v_max := $xx xx xx xx $88 00 00 00 00 $8F xx xx xx xx // bow_max := 0 = linear ramp // a_max_d_max := $xx xx xx xx $89 00 BC 61 4E // x_target := 12345678; => move to target position x_target Set Incremental Encoder Interface Parameters For this example, we assume to have an incremental encoder with a resolution of 16384 steps per revolution. For the quadrature signals A and B this means that they toggle 8192 tomes per revolution with a phase shift of quarter period. A stepper motor is assumed to have 200 full steps per revolution and is driven with a micro step revolution of 256 micro steps per full step. So, for this example, the stepper motor has 200 * 256 = 51200 micro steps per revolution. The axis of the incremental encoder is assumed to be directly connected to the axis of the stepper motor with a gear. With this, a number of 16384 positions of the incremental encoder are equal to 51200 micro steps of the stepper motor. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 28 So, each position count of the encoder is equal to 51200 / 16384 = 3.125 micro steps. position -4 -3 -2 -1 0 1 2 3 4 5 6 7 A B t Figure 6 : Incremental Encoder Signals Outline (AB w/o clear pulse N) So, the accumulation constant enc_const of the incremental encoder interface of the TMC457 has to be set that each encoder step represents 3.15. This is achieved by setting enc_const = 3.125 * 65536 = 204800 = $00 03 20 00. The datagram sequence doing the initialization of the encoder interface is: $90 00 03 20 00 // set enc_const := $00 03 20 00 $91 00 03 20 00 $92 00 03 20 00 // set x_enc := $00 00 00 00 // set enc_clr_mode := $00 00 00 00, ignore N pulse 8 Notation of Number Systems Decimal numbers are used as usual without additional identification. Binary numbers are identified by a prefixed % character. Hexadecimal numbers are identified by a prefixed $ character. Alternatively, hexadecimal numbers are identified similar to C language with a prefixed 0x. For better readability of long number spaces are inserted. So, for example the decimal number 42 in the decimal system is written as %101010 in the binary number system, and it is written as $2A or 0x2A in the hexadecimal number system. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 29 9 Pinning, Package, and Electrical data of the TMC457 9.1 Pinning of TMC457 The TMC457-BC is available within a 144 ball fine pitch (1 mm) BGA package. Important Hints: All pins specified as (n.c. = not connect) must be left unconnected (open). All power supply pins (named V33 for +3.3V and named V15 for +1.5V) and all ground pins must be connected. All inputs and all outputs have 3.3V CMOS level. Level shifters are required when using 5V devices (e.g. micro controller with 5V IO, incremental encoder with 5V ABN outputs, …). Other unnamed pins have to be left open. Pins with comment "do not connect (must not be connected)" must be left open because these are unused but driving outputs. # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 BGA Ball A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 Signal Name GND V33 DIR_IN GND V15 STEP_IN In/Out Description / Comment n.c. n.c. I n.c. I ground +3.3V supply voltage do not connect (must not be connected) do not connect (must not be connected) direction input ground +1.5V supply voltage do not connect (must not be connected) step input GND CLK GND I ground clock input ground POSCOMP ENC_A O I position comparator output signal (pls. refer x_compare) A signal from incremental encoder (ABN) for 3.3V level - n.c. n.c. GND V33 25 C1 nEN I 26 27 28 29 30 31 32 C2 C3 C4 C5 C6 C7 C8 I RES V15 ENC_B - do not connect (must not be connected) do not connect (must not be connected) ground +3.3V supply voltage clock gating input, logical ored with CLK, must be connected to ground active high reset input +1.5V supply voltage B signal from incremental encoder (ABN) for 3.3V level n.c. do not connect (must not be connected) Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 C9 C10 C11 C12 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 G1 G2 G3 G4 G5 G6 G7 G8 G9 G10 G11 PZO_EN SDO_DAC_A SDO_DAC_B SCK nINT ENC_N - n.c. I O O I O I n.c. do not connect (must not be connected) piezo motor enable (0:stepper motor / 1:piezo motor) SDO for LTC2602 DAC A input SDI SDO for LTC2602 DAC B input SDI SPI clock input from microcontroller active low interrupt output N signal from incremental encoder (ABN) for 3.3V level do not connect (must not be connected) V15 +1.5V supply voltage V33 +3.3V supply voltage V33 V33 +3.3V supply voltage +3.3V supply voltage V33 V15 +3.3V supply voltage +1.5V supply voltage nSCS GND I n.c. chip select input for microcontroller interface ground GND GND GND do not connect (must not be connected) ground ground ground GND ground SCK_DAC O GND n.c. GND GND GND serial clock for LTC2602 DAC ground do not connect (must not be connected) ground ground ground Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG 30 TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 G12 H1 H2 H3 H4 H5 H6 H7 H8 H9 H10 H11 H12 J1 J2 J3 J4 J5 NCS_DAC V15 PHA O 102 J6 CHOPCLK O 103 104 105 106 107 108 109 110 111 J7 J8 J9 J10 J11 J12 K1 K2 K3 V15 (TCK) I STOPL SDI SDO I I O 112 K4 HIRES_OUT O 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 K5 K6 K7 K8 K9 K10 K11 K12 L1 L2 L3 L4 L5 L6 L7 L8 L9 L10 L11 V15 unused output unused output unused output O chip select for LTC2602 DAC +1.5V supply voltage +1.5V supply voltage O O O V33 +3.3V supply voltage V15 +1.5V supply voltage V33 +3.3V supply voltage (TDO) PHB SCK_DRV GND (TMS) (VJTAG) V33 phase A polarity output (for stepper motors) TM ChopSync PWM clock signal output for TRINAMIC stepper motor driver OSC input (TMC236, TMC239, TMC246, TMC249) +1.5V supply voltage can be left open with VJTAG tied to GND TRST/O can be left open with VJTAG tied to GND O O GND STOPR GND V33 DIR_OUT STDBY_OUT V33 SDO_DRV 31 stop switch left serial data input, driven by micro controller output MOSI serial data output, drives micro controller input MISO high resolution control output (optional use) 0 : low resolution (use higher step width mode, XSTEP or full step mode), 1 : high resolution (use micro stepping) phase B polarity output (for stepper motors) serial data clock signal to stepper motor driver ground ground I O O O stop switch right ground +3.3V supply voltage direction output stand-by output signal to lower standby current of driver +3.3V supply voltage serial data output to stepper motor driver can be left open with VJTAG tied to GND ground to disable JTAG +3.3V supply voltage Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 132 133 134 135 L12 M1 M2 M3 136 M4 nANA_SPI I 137 138 139 140 141 142 143 144 M5 M6 M7 M8 M9 M10 M11 M12 O I (TRST) GND STEP_OUT XSTEP_OUT nCS_DRV SDI_DRV (TDI) V33 PDR GND I O O I 32 ground to disable JTAG ground step output extended step output (lower frequency) SPI / not analog input selects type of stepper driver control (0: use external DAC, 1: use TMC236 internal DAC) serial data selection signal to stepper driver serial data input from stepper driver can be left open with VJTAG tied to GND +3.3V supply voltage connect this input via 1K pull-down resistor to ground ground Table 2: TMC457-BC Pin Out 9.1.1 Pull-Up / Pull-Down Resistances Some inputs have weak on-chip pull-up resp. weak pull-down resistors. The resistance of these is within the range of 10 kOhm (min.) … 45 kOhm (max.) 9.1.2 Blocking Capacitors Ceramic capacitors of 100nF capacitance should be connected as close as possible at each 1V5 power supply pin and at each 3V3 power supply pin. Alternatively, two power planes – one power plane for +1V5 (V15) and one power plane for +3V3 (V33) can be used. Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 9.2 33 Package Outlines and Dimensions 9.2.1 Fine Pitch BGA Package with 144 Balls (FBGA144) of TMC457-BC A1 ball pad corner (marked by dot at top side) BOTTOM VIEW 12 11 10 9 8 7 6 5 4 3 2 1 1 A A B B C C D D E E F F G G H H J J K K 2 3 4 TOP VIEW 5 6 7 8 9 10 11 12 D/4 e E/4 E1 E / E2 L L M M e D1 SIDE VIEW D / D2 // ccc A2 c A1 A bbb aaa b D1 / E1 Figure 7 : Package Outline Drawing FBGA144 – (JEDEC MO-192 VAR DAD-1) Symbol A A1 A2 aaa b bbb c ccc D D1 D2 E E1 E2 e Dimensions in MILLIMETERS Typ Max 1.45 1.55 0.40 0.45 0.70 0.75 0.12 0.45 0.50 0.55 0.25 0.35 0.35 12.80 13.00 13.20 11.00 BSC 12.80 13.00 13.20 12.80 13.00 13.20 11.00 BSC 12.80 13.00 13.20 1.00 Min 1.35 0.35 0.65 Min Dimensions in INCHES Typ Table 3 : Dimensions of FBGA144 (Note: BSC = Basis Spacing Between Centers) Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG Max TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 34 10 Micro Controller Interface (SPI) The communication between micro controller and TMC457 takes place via the four via serial interface, TM the Serial Peripheral Interface (SPI , SPI is trademark of Motorola). Many types of micro controllers of different vendors are equipped with SPI hardware. tCLK tDATAGRAMuC tSUCSC tHDCSC tSCKCL tSCKCH tHDCSC tSUCSC CLK nSCS SCK tSD tSD sdi_bit#39 SDI tSD sdi_bit#0 sdi_bit#38 . . . sdi_bit#1 tPD sdo_bit#39 SDO sdo_c_bit#0 sdo_c_bit#38 ... sdo_c_bit#1 tIS tSI 38 x sampled SDI 1 x SDI sampled 1 x SDI sampled one full 40 bit datagram Figure 8 : Timing Diagram of the Serial Micro Controller Interface Symbol tSUCSC tHDCSC tSCKCL tSCKCH tSD tSI tDAMAGRAMuC tDAMAGRAMuC fCLK tCLK tPD Parameter Setup Clocks for nSCS Hold Clocks for nSCS Serial Clock Low Serial Clock High SDO valid after SCK low SDO valid after nSCS high Datagram Length Datagram Length Clock Frequency Clock Period tCLK = 1 / fCLK CLK-rising-edge-to-Output Propagation Delay Min 3 3 3 3 2.5 Typ Max 3.5 4.5 3+3 + 40*6 = 246 12.3 0 50 20 5 Table 4: Timing Characteristics of the Micro Controller Serial Peripheral Interface (SPI) Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG Unit CLK periods CLK periods CLK periods CLK periods CLK periods CLK periods CLK periods µs MHz ns ns TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 35 11 Characteristics Symbol VCORE_AMR VOI_AMR VIN_AMR Parameter core supply voltage IO supply voltage input voltage Conditions Min -0.3 -0.3 -0.3 3.3V IO supply voltage VIO Max 1.65 3.75 3.6 Unit V V V Table 5 - Absolute Maximum Ratings Symbol TCOM VCORE VIO VIN VINL VINH VOUTL VOUTH IOUTDRV Parameter commercial temperature range nominal core voltage nominal IO voltage nominal input voltage input voltage low level input voltage high level output voltage low level output voltage high level output driver strength Conditions Min 0 Typ Max 70 1.5 3.3 85°C (test condition) 85°C (test condition) 85°C (test condition) 85°C (test condition) 85°C (test condition) 0.0 -0.3 2.0 3.3 0.8 3.6 0.4 2.4 12 Unit °C V V V V V V V mA Table 6 – DC Ccharacteristics Operating Conditions Symbol PDST PDDY PD Parameter static power dissipation dynamic power dissipation total power dissipation Conditions 25°C 25°C, 16 MHz 25°C, 16 MHz Min Typ 15 75 90 Max Unit mW mW mW Min Typ Max 20 50 Table 7 - Power Dissipation Symbol fCLK tCLK tCLK_L tCLK_H tRISE_I tFALL_I tRISE_O tFALL_O tSU tHD tPD Parameter Operation Frequency Clock Period Clock Time Low Clock Time High Input Signal Rise Time Input Signal Fall Time Output Signal Rise Time Output Signal Fall Time Setup Time Hold Time Propagation Delay Time Conditions fCLK = 1 / tCLK Raising Edge to Raising Edge of CLK 10% to 90% 90% to 10% 10% to 90% 5 5 5 Unit MHz ns ns ns ns ns ns 90% to 10% relative to falling clock edge at CLK relative to falling clock edge at CLK 50% of rising edge of the clock CLK to 50% of the output 5 5 30 ns ns ns ns 25 25 Table 8 - General IO Timing Parameters tCLK tCLK_H CLK tCLK_L 50% tRISE tSU 90% OUTPUT 50% 10% tFALL tHD Figure 9 - General IO Timing Parameters Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG tPD TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 36 12 Literature LTC2602 Datasheet, www.linear.com TMC236 Datasheet, www.trinamic.com TMC239 Datasheet, www.trinamic.com TMC246 Datasheet, www.trinamic.com TMC249 Datasheet, www.trinamic.com PiezoMotor, www.piezomotor.se PiezoLEGS® Technology Information, http://www.piezomotor.se/pages/PLtechnology.html PiezoLEGS® Datasheets, http://www.piezomotor.se/pages/PLdownloads.html 13 Revision History Version Date (Initials) Description 1.00 25.08.2008 (LL) First published version 1.01 30.10.2008 (LL) 1.02 03.10.2008 (LL) Formula for calculation of sine wave look-up table corrected (section 5.11.2, page 13 and section 7.1, page 27). load_scale outputs added at pinning table and register mapping (section 9, page 29 ff. & section 6.2, page 15 ff.) 1.06 27.10.2008 (BD) Detail tables for registers with complex content, added some missing register bits 1.07 04.01.2009 (LL, BD) formula for calculation of sine wave look-up table corrected (section 5.11.2, page 13) and calculation of look-up table with offset added, corrected acceleration formula 1.08 19.01.2009 (LL) Pin F4 in Table 2: TMC457-BC Pin Out, page 32 corrected (n.c. instead of ground) 1.09 26.03.2009 (BD) Reference Switch table corrected (Reference Switch Configuration Register Set) 1.10 31.03.2009 (BD) 1.11 22.04.2009 (BD) Changed documentation for Version 1.02 of TMC457: Added vector encoder registers (venc...) Attention: VENC functions are only available starting from V1.02 of TMC457! Register PID_DV_CPU was removed; register bits current_scale and outputs LOAD_SCALE were removed, Actual TMC249 stallguard value can be read now Encoder constant can now be scaled in 1/10000 steps (enable via bit 13 of enc_mode) enc_clr_mode register renamed to enc_mode Added bow restrictions, corrected formula for bow value (Bernhard Dwersteg 40th birthday version!) 1.12 12.06.2009 (BD) Improved some descriptions 1.13 07.09.2009 (LL, BD) Pin G3 (75) explicitly marked as n.c. / F1 is input / Corrected pinning table according names in Fig.1 1.14 09.09.2009 (BD) C4 is GND, new method to disable JTAG by tying L10 and L12 to GND 1.15 05.10.2009 (LL, BD) C4 is a +1V5 (correct in pinning table, but comment in history 1.14 needed adaption) V1.02 of TMC457: linear ramp failure when AMAX<128 and AMAX/=DMAX Added known bugs section 1.16 25.11.2009 (BD) Documented wrong stop switch behavior, corrected in V1.04 of TMC457 Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG TMC457 DATASHEET (V. 1.16 / 2009-Nov-25) 37 Please refer to www.trinamic.com for updated data sheets and application notes on this product and on other products. The TMCtechLIB CD-ROM including data sheets, application notes, schematics of evaluation boards, software of evaluation boards, source code examples, parameter calculation spreadsheets, tools, and more is available from TRINAMIC Motion Control GmbH & Co. KG by request to [email protected] Copyright © 2009 TRINAMIC Motion Control GmbH & Co. KG