dSPIN

Embed Size (px)

Citation preview

  • 7/28/2019 dSPIN

    1/67

    May 2011 Doc ID 16737 Rev 3 1/67

    67

    L6470dSPIN fully integrated microstepping motor driver

    with motion engine and SPI

    Features

    Operating voltage: 8 - 45 V

    7.0 A output peak current (3.0 A r.m.s.)

    Low RDSon power MOSFETS

    Programmable speed profile and positioning

    Programmable power MOS slew-rate

    Up to 1/128 microstepping

    Sensorless stall detection

    SPI interface

    Low quiescent and standby currents

    Programmable non dissipative overcurrentprotection on high and low-side

    Two levels overtemperature protection

    Applications

    Bipolar stepper motor

    Description

    The L6470, realized in analog mixed signaltechnology, is an advanced fully integratedsolution suitable for driving two phase bipolarstepper motors with microstepping.

    It integrates a dual low RDSon DMOS full bridgewith all of the power switches equipped with an

    accurate on chip current sensing circuitry suitablefor non dissipative current control and overcurrentprotections. Thanks to a unique control system atrue 1/128 steps resolution is achieved. Thedigital control core can generate user definedmotion profiles with acceleration, deceleration,speed or target position easily programmedthrough a dedicated registers set. All commandsand data registers, including those used to setanalogue values (i.e. current control value,current protection trip point, dead time, PWM

    frequency etc.) are sent through a standard 5Mbit/s SPI.

    A very rich set of protections (thermal, low busvoltage, overcurrent, motor stall) allows designinga fully protected application, as required by mostdemanding motor control applications.

    HTSSOP28

    Table 1. Device summary

    Order codes Package Packing

    L6470H HTSSOP28 Tube

    L6470HTR HTSSOP28 Tape and reel

    www.st.com

    http://www.st.com/http://www.st.com/
  • 7/28/2019 dSPIN

    2/67

    Contents L6470

    2/67 Doc ID 16737 Rev 3

    Contents

    1 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    2 Electrical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    2.1 Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    2.2 Recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    3 Electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    4 Pin connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    4.1 Pin list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    5 Typical applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    6 Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    6.1 Device power-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    6.2 Logic I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    6.3 Charge pump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    6.4 Microstepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    6.4.1 Automatic full-step mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    6.5 Absolute position counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    6.6 Programmable speed profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    6.6.1 Infinite acceleration/deceleration mode . . . . . . . . . . . . . . . . . . . . . . . . . 22

    6.7 Motor control commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    6.7.1 Constant speed commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    6.7.2 Positioning commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    6.7.3 Motion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    6.7.4 Stop commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    6.7.5 Step-clock mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    6.7.6 GoUntil and ReleaseSW commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    6.8 Internal oscillator and oscillator driver . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    6.8.1 Internal oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    6.8.2 External clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    6.9 Overcurrent detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

  • 7/28/2019 dSPIN

    3/67

    L6470 Contents

    Doc ID 16737 Rev 3 3/67

    6.10 Undervoltage lock-out (UVLO) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

    6.11 Thermal warning and thermal shutdown . . . . . . . . . . . . . . . . . . . . . . . . . 28

    6.12 Reset and standby . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

    6.13 External switch (SW pin) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

    6.14 Programmable DMOS slew-rate, dead-time and blanking-time . . . . . . . . 30

    6.15 Integrated analog to digital converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    6.16 Internal voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    6.17 BUSY\SYNC pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    6.17.1 BUSY operation mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    6.17.2 SYNC operation mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    6.18 FLAG pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    7 Phase current control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    7.1 PWM sinewave generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    7.2 Sensorless stall detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    7.3 Low speed optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    7.4 BEMF compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    7.5 Motor supply voltage compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    7.6 Winding resistance thermal drift compensation . . . . . . . . . . . . . . . . . . . . 35

    8 Serial interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    9 Programming manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    9.1 Registers and flags description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    9.1.1 ABS_POS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

    9.1.2 EL_POS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

    9.1.3 MARK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    9.1.4 SPEED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    9.1.5 ACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    9.1.6 DEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    9.1.7 MAX_SPEED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    9.1.8 MIN_SPEED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    9.1.9 FS_SPD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    9.1.10 KVAL_HOLD, KVAL_RUN, KVAL_ACC and KVAL_DEC . . . . . . . . . . . . 42

    9.1.11 INT_SPEED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    9.1.12 ST_SLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

  • 7/28/2019 dSPIN

    4/67

    Contents L6470

    4/67 Doc ID 16737 Rev 3

    9.1.13 FN_SLP_ACC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    9.1.14 FN_SLP_DEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    9.1.15 K_THERM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    9.1.16 ADC_OUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449.1.17 OCD_TH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    9.1.18 STALL_TH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    9.1.19 STEP_MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    9.1.20 ALARM_EN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    9.1.21 CONFIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    9.1.22 STATUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

    9.2 Application commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    9.2.1 Command management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    9.2.2 Nop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    9.2.3 SetParam (PARAM, VALUE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

    9.2.4 GetParam (PARAM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

    9.2.5 Run (DIR, SPD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    9.2.6 StepClock (DIR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    9.2.7 Move (DIR, N_STEP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    9.2.8 GoTo (ABS_POS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    9.2.9 GoTo_DIR (DIR, ABS_POS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    9.2.10 GoUntil (ACT, DIR, SPD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    9.2.11 ReleaseSW (ACT, DIR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    9.2.12 GoHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    9.2.13 GoMark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    9.2.14 ResetPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

    9.2.15 ResetDevice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

    9.2.16 SoftStop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

    9.2.17 HardStop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    9.2.18 SoftHiZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    9.2.19 HardHiZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629.2.20 GetStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

    10 Package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    11 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

  • 7/28/2019 dSPIN

    5/67

    L6470 List of tables

    Doc ID 16737 Rev 3 5/67

    List of tables

    Table 1. Device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Table 2. Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Table 3. Recommended operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Table 4. Thermal data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Table 5. Electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Table 6. Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Table 7. Typical application values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Table 8. CL values according to external oscillator frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Table 9. Registers map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Table 10. EL_POS register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Table 11. MIN_SPEED register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Table 12. Voltage amplitude regulation registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Table 13. Winding resistance thermal drift compensation coefficient. . . . . . . . . . . . . . . . . . . . . . . . . 44

    Table 14. ADC_OUT value and motor supply voltage compensation feature . . . . . . . . . . . . . . . . . . 44Table 15. Overcurrent detection threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Table 16. Stall detection threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Table 17. STEP_MODE register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Table 18. Step mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Table 19. SYNC output frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Table 20. SYNC signal source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Table 21. ALARM_EN register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Table 22. CONFIG register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Table 23. Oscillator management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Table 24. External switch hard stop interrupt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Table 25. Overcurrent event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

    Table 26. Programmable power bridge output slew-rate values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Table 27. Motor supply voltage compensation enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Table 28. PWM frequency: integer division factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Table 29. PWM frequency: multiplication factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Table 30. Available PWM frequencies [kHz]: 8 MHz oscillator frequency . . . . . . . . . . . . . . . . . . . . . 50Table 31. Available PWM frequencies [kHz]: 16 MHz oscillator frequency . . . . . . . . . . . . . . . . . . . . 51Table 32. Available PWM frequencies [kHz]: 24 MHz oscillator frequency . . . . . . . . . . . . . . . . . . . . 51Table 33. Available PWM frequencies [kHz]: 32 MHz oscillator frequency . . . . . . . . . . . . . . . . . . . . 52Table 34. STATUS register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Table 35. STATUS register DIR bit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Table 36. STATUS register MOT_STATE bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Table 37. Application commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Table 38. Nop command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    Table 39. SetParam command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Table 40. GetParam command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Table 41. Run command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Table 42. Stepclock command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Table 43. Move command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Table 44. GoTo command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Table 45. GoTo_DIR command structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Table 46. GoUntil command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Table 47. ReleaseSW command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Table 48. GoHome command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

  • 7/28/2019 dSPIN

    6/67

    List of tables L6470

    6/67 Doc ID 16737 Rev 3

    Table 49. GoMark command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Table 50. ResetPos command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Table 51. ResetDevice command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Table 52. SoftStop command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

    Table 53. HardStop command structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Table 54. SoftHiZ command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Table 55. HardHiZ command structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Table 56. GetStatus command structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Table 57. HTSSOP28 mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Table 58. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

  • 7/28/2019 dSPIN

    7/67

    L6470 List of figures

    Doc ID 16737 Rev 3 7/67

    List of figures

    Figure 1. Block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Figure 2. Pin connection (top view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Figure 3. Bipolar stepper motor control application using L6470. . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Figure 4. Charge pump circuitry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Figure 5. Normal mode and microstepping (128 microsteps) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Figure 6. Automatic full-step switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Figure 7. Speed profile in infinite acceleration/deceleration mode . . . . . . . . . . . . . . . . . . . . . . . . . . 22Figure 8. Constant speed commands examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Figure 9. Positioning command examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Figure 10. Motion commands examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Figure 11. OSCIN and OSCOUT pins configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Figure 12. External switch connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Figure 13. Internal 3 V linear regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

    Figure 14. Current distortion and compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Figure 15. BEMF compensation curve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Figure 16. Motor supply voltage compensation circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Figure 17. SPI timings diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Figure 18. Daisy-chain configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Figure 19. Command with three byte argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Figure 20. Command with three byte responset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Figure 21. Command response aborted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Figure 22. HTSSOP28 mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

  • 7/28/2019 dSPIN

    8/67

    Block diagram L6470

    8/67 Doc ID 16737 Rev 3

    1 Block diagram

    Figure 1. Block diagram

    AM02377v1

    3 V

    Voltage Reg.ADC

    Ext. Osc. driver

    &

    Clock gen.

    16MHz

    Oscillator

    Charge

    pump

    VDD

    SPI

    Reg

    isters

    Control

    Logic

    Current DACs

    &

    Comparators

    Temperature

    sensing

    Current

    sensing

    STBY/RST

    FLAG

    CS

    CK

    SDO

    SDI

    BUSY/SYNC

    SW

    STCK

    DGND

    VDD OSCIN OSCOUT ADCIN VREG CP VBOOT

    AGND

    PGND

    PGND

    VSA

    VSA

    OUT1A

    OUT2A

    VSB

    VSB

    OUT1B

    OUT2B

    HS A1

    LS A1

    HS A2

    LS A2

    HS B1

    LS B1

    HS B2

    LS B2

    HSA1

    LSA1

    HSA2

    LSA2

    HSB1

    LSB1

    HSB2

    LSB2

    VDD

    Vboot Vboot

    Vboot Vboot

  • 7/28/2019 dSPIN

    9/67

    L6470 Electrical data

    Doc ID 16737 Rev 3 9/67

    2 Electrical data

    2.1 Absolute maximum ratings

    Table 2. Absolute maximum ratings

    Symbol Parameter Test condition Value Unit

    VDD Logic interface supply voltage 5.5 V

    VS Motor supply voltage VSA = VSB = VS 48 V

    VGND, diffDifferential voltage between

    AGND, PGND and DGND0.3 V

    Vboot Bootstrap peak voltage 55 V

    VREG

    Internal voltage regulator output

    pin and logic supply voltage3.6 V

    VADCINIntegrated ADC input voltage

    range (ADCIN pin)-0.3 to +3.6 V

    VOSCOSCIN and OSCOUT pin voltage

    range-0.3 to +3.6 V

    Vout_diff

    Differential voltage between VSA,

    OUT1A, OUT2A, PGND and VSB,

    OUT1B, OUT2B, PGND pins

    VSA = VSB = VS 48 V

    VLOGIC Logic inputs voltage range -0.3 to +5.5 V

    Iout(1) R.m.s. output current 3 A

    Iout_peak(1)

    Pulsed output current TPULSE < 1 ms 7 A

    TOP Operating junction temperature 150 C

    Ts Storage temperature range -55 to 150 C

    Ptot Total power dissipation (TA = 25C)(2) 3 W

    All pins

    Maximum withstanding voltage

    range

    CDF-AEC-Q100-002- human body

    model Acceptance criteria normal

    performance all pins vs. all pins

    2000 V

    Maximum withstanding voltage

    range

    TBD - charge device model all pins vs.

    all pinsTBD V

    1. Maximum output current limit is related to metal connection and bonding characteristics. Actual limit must satisfy maximumthermal dissipation constraints.

    2. HTSSOP28 mounted on EVAL6470 Rev 1.0

  • 7/28/2019 dSPIN

    10/67

    Electrical data L6470

    10/67 Doc ID 16737 Rev 3

    2.2 Recommended operating conditions

    Table 3. Recommended operating conditions

    Symbol Parameter Test condition Value Unit

    VDD Logic interface supply voltage3.3 V logic outputs 3.3

    V5 V logic outputs 5

    VS Motor supply voltage VSA = VSB = VS 8 45 V

    Vout_diff

    Differential voltage between

    VSA, OUT1A, OUT2A, PGND

    and VSB, OUT1B, OUT2B,

    PGND pins

    VSA = VSB = VS 45 V

    VREG,in Logic supply voltageVREG voltage imposed

    by external source3.2 3.3 V

    VADCIntegrated ADC input voltage

    (ADCIN pin) 0 VREG V

    Tj Operating junction temperature - 25 125 C

    Table 4. Thermal data

    Symbol Parameter Value Unit

    RthJA Thermal resistance junction-ambient(1)

    1. HTSSOP28 mounted on EVAL6470 Rev 1.0 board: two-layer FR4 PCB with a dissipating copper surfaceof about 3.5 cm2 on the top side plus 9 cm2 ground layer connected through via holes (12 below the IC).

    40 C/W

  • 7/28/2019 dSPIN

    11/67

    L6470 Electrical characteristics

    Doc ID 16737 Rev 3 11/67

    3 Electrical characteristics

    VSA = VSB = 36 V; VDD = 3.3 V; internal 3 V regulator; TJ = 25C, unless otherwise specified.

    Table 5. Electrical characteristics

    Symbol Parameter Test condition Min Typ Max Unit

    General

    VSthOn VS UVLO turn on threshold 7.5 8.2 8.9 V

    VSthOff VS UVLO turn off threshold 6.6 7.2 7.8 V

    VSthHyst VS UVLO threshold hysteresis 0.7 1 1.3 V

    Iq Quiescent motor supply current

    Internal oscillator selected;

    VREG = 3.3V ext;

    CP floating

    0.5 0.65 mA

    Tj(WRN) Thermal warning temperature 130 C

    Tj(SD) Thermal shutdown temperature 160 C

    Charge pump

    Vpump Voltage swing for charge pump oscillator 10 V

    fpump,min Minimum charge pump oscillator frequency(1) 660 kHz

    fpump,max Maximum charge pump oscillator frequency(1) 800 kHz

    Iboot Average boot currentfsw,A = fsw,B = 15.6 kHz

    POW_SR = 101.1 1.4 mA

    Output DMOS transistor

    RDS(on)

    High side switch ON resistance

    Tj = 25 C,

    Iout = 3A0.37

    Tj = 125 C,(2)

    Iout = 3A0.51

    Low side switch ON resistance

    Tj = 25 C,

    Iout = 3A0.18

    Tj = 125 C,(2)

    Iout = 3A0.23

    IDSS Leakage current

    OUT = VS 3.1

    mAOUT = GND -0.3

    tr Rise time(3)

    POW_SR = '00', Iout = +1A 100

    ns

    POW_SR = '00', Iout = -1A 80

    POW_SR = 11, Iout = 1A 100

    POW_SR = 10, Ilout = 1A 200

    POW_SR = 01, Iout = 1A 300

  • 7/28/2019 dSPIN

    12/67

    Electrical characteristics L6470

    12/67 Doc ID 16737 Rev 3

    tf Fall time(3)

    POW_SR = '00'; Iout = +1A 90

    ns

    POW_SR = '00'; Iout = -1A 110

    POW_SR = 11, Iout = 1A 110

    POW_SR = 10, Iout = 1A 260

    POW_SR = 01, Iload= 1A 375

    SRout_r Output rising slew-rate

    POW_SR = '00', Iout = +1A 285

    V/s

    POW_SR = '00', Iout = -1A 360

    POW_SR = 11, Iout = 1A 285

    POW_SR = 10, Iout = 1A 150

    POW_SR = 01, Iout = 1A 95

    SRout_f Output falling slew-rate

    POW_SR = '00', Iout = +1A 320

    V/s

    POW_SR = '00', Iout = -1A 260

    POW_SR = 11, Iout = 1A 260

    POW_SR = 10, Iout = 1A 110

    POW_SR = 01, Iout = 1A 75

    Dead time and blanking

    tDT Dead time(1)

    POW_SR = '00' 250

    ns

    POW_SR = 11,

    fOSC = 16MHz375

    POW_SR = 10,

    fOSC = 16MHz625

    POW_SR = 01,

    fOSC = 16MHz875

    tblank Blanking time(1)

    POW_SR = '00' 250

    ns

    POW_SR = 11,

    fOSC = 16MHz375

    POW_SR = 10,

    fOSC = 16MHz625

    POW_SR = 01,fOSC = 16MHz

    875

    Source-drain diodes

    VSD,HS High side diode forward ON voltage Iout = 1 A 1 1.1 V

    VSD,LS Low side diode forward ON voltage Iout = 1 A 1 1.1 V

    trrHS High side diode reverse recovery time Iout = 1 A 30 ns

    trrLS Low side diode reverse recovery time Iout = 1 A 100 ns

    Table 5. Electrical characteristics (continued)

    Symbol Parameter Test condition Min Typ Max Unit

  • 7/28/2019 dSPIN

    13/67

    L6470 Electrical characteristics

    Doc ID 16737 Rev 3 13/67

    Logic inputs and outputs

    VIL Low logic level input voltage 0.8 V

    VIH High logic level input voltage 2 V

    IIH High logic level input current(4) VIN = 5 V 1 A

    IIL Low logic level input current(5) VIN = 0 V -1 A

    VOL Low logic level output voltage(6)

    VDD = 3.3 V,

    IOL = 4 mA0.3

    VVDD = 5 V,

    IOL = 4 mA0.3

    VOH High logic level output voltage

    VDD = 3.3 V,

    IOH = 4 mA2.4

    VVDD = 5 V,

    IOH = 4 mA4.7

    RPURPD

    CS Pull-up and STBY pull-down resistorsCS = GND;

    STBY/RST = 5 V335 430 565 k

    Ilogic Internal logic supply current3.3 V VREG externally

    supplied, internal oscillator3.7 4.3 mA

    Ilogic,STBY Standby mode internal logic supply current3.3 V VREG externally

    supplied2 2.5 A

    fSTCK Step clock input frequency 2 MHz

    Internal oscillator and external oscillator driver

    fosc,i Internal oscillator frequencyTj = 25C,

    VREG = 3.3 V-3% 16 +3% MHz

    fosc,e Programmable external oscillator frequency 8 32 MHz

    VOSCOUTH OSCOUT clock source high level voltage

    Internal oscillator

    3.3 V VREG externally

    supplied; IOSCOUT = 4 mA

    2.4 V

    VOSCOUTL OSCOUT clock source low level voltage

    Internal oscillator

    3.3 V VREG externally

    supplied; IOSCOUT = 4 mA

    0.3 V

    trOSCOUT

    tfOSCOUTOSCOUT clock source rise and fall time Internal oscillator 20 ns

    textosc Internal to external oscillator switching delay 3 ms

    tintosc External to internal oscillator switching delay 1.5 s

    SPI

    fCK,MAX Maximum SPI clock frequency(7) 5 MHz

    trCKtfCK

    SPI clock rise and fall time (7) CL = 30pF 25 ns

    Table 5. Electrical characteristics (continued)

    Symbol Parameter Test condition Min Typ Max Unit

  • 7/28/2019 dSPIN

    14/67

    Electrical characteristics L6470

    14/67 Doc ID 16737 Rev 3

    thCK

    tlCK

    SPI clock high and low time (7) 75 ns

    tsetCS Chip select setup time(7) 350 ns

    tholCS Chip select hold time(7) 10 ns

    tdisCS Deselect time(7) 800 ns

    tsetSDI Data input setup time(7) 25 ns

    tholSDI Data input hold time(7) 20 ns

    tenSDO Data output enable time(7) 38 ns

    tdisSDO Data output disable time(7) 47 ns

    tvSDO Data output valid time(7) 57 ns

    tholSDO Data output hold time (7) 37 ns

    Switch input (SW)

    RPUSW SW input pull-up resistance SW = GND 60 85 110 k

    PWM modulators

    fPWM Programmable PWM frequency(1)

    fosc = 16MHz 2.8 62.5kHz

    fosc = 32MHz 5.6 125

    NPWM PWM resolution 8 bit

    Stall detection

    ISTALL,MAX Maximum programmable stall threshold STALL_TH = '1111111' 4 A

    ISTALL,MIN Minimum programmable stall threshold STALL_TH = '0000000' 31.25 mA

    ISTALL,RES Programmable stall threshold resolution 31.25 mA

    Overcurrent protection

    IOCD,MAXMaximum programmable overcurrent

    detection thresholdOCD_TH = 1111 6 A

    IOCD,MINMinimum programmable overcurrent detection

    thresholdOCD_TH = 0000 0.375 A

    IOCD,RESProgrammable overcurrent detection threshold

    resolution0.375 A

    tOCD,Flag OCD to Flag signal delay timedIout/dt = 350A/s,

    RFLAG = TBD650 1000 ns

    tOCD,SD OCD to shut-down delay timedIout/dt = 350A/s

    POW_SR = '10'600 s

    Standby

    IqSTBYQuiescent motor supply current in standby

    conditions

    VS = 8V 26 34A

    VS = 36V 30 36

    Table 5. Electrical characteristics (continued)

    Symbol Parameter Test condition Min Typ Max Unit

  • 7/28/2019 dSPIN

    15/67

    L6470 Electrical characteristics

    Doc ID 16737 Rev 3 15/67

    tSTBY,min Minimum standby time 10 s

    tlogicwu Logic power-on and wake-up time 38 45 s

    tcpwu Charge pump power-on and wake-up time

    Power bridges disabled,

    Cp = 10nF,

    Cboot = 220nF

    650 s

    Internal voltage regulator

    VREG Voltage regulator output voltage 2.9 3 3.2 V

    IREG Voltage regulator output current 40 mA

    VREG, drop Voltage regulator output voltage drop IREG = 40mA 50 mV

    IREG,STBY Voltage regulator standby output current 10 mA

    Integrated analog to digital converter

    NADC Analog to digital converter resolution 5 bit

    VADC,ref Analog to digital converter reference voltage VREG V

    fSAnalog to digital converter sampling

    frequencyfPWM kHz

    1. Accuracy depends on oscillator frequency accuracy.

    2. Tested at 25C in a restricted range and guaranteed by characterization.

    3. Rise and fall time depends on motor supply voltage value. Refer to SRout values in order to evaluate the actual rise and falltime.

    4. Not valid for STBY/RST pin which have internal pull-down resistor.

    5. Not valid for SW and CS pins which have internal pull-up resistor6. FLAG, BUSY and SYNC open drain outputs included.

    7. See Figure 17 SPI timings diagram for details.

    Table 5. Electrical characteristics (continued)

    Symbol Parameter Test condition Min Typ Max Unit

  • 7/28/2019 dSPIN

    16/67

    Pin connection L6470

    16/67 Doc ID 16737 Rev 3

    4 Pin connection

    4.1 Pin list

    Figure 2. Pin connection (top view)

    /54! /54!

    63!

    34"9

  • 7/28/2019 dSPIN

    17/67

    L6470 Pin connection

    Doc ID 16737 Rev 3 17/67

    27PGND Ground Power ground pin

    13

    1 OUT1A Power output Full bridge A output 1

    28 OUT2A Power output Full bridge A output 2

    14 OUT1B Power output Full bridge B output 1

    15 OUT2B Power output Full bridge B output 2

    9 AGND Ground Analog ground.

    4 SW Logical inputExternal switch input pin. If not used the pin should be

    connected to VDD.

    21 DGND Ground Digital ground

    22 BUSY\SYNC Open drain outputBy default this BUSY pin is forced low when the device isperforming a command. Otherwise the pin can be

    configured to generate a synchronization signal.

    18 SDO Logic output Data output pin for serial interface

    20 SDI Logic input Data input pin for serial interface

    19 CK Logic input Serial interface clock

    23 CS Logic input Chip Select input pin for serial interface

    24 FLAG Open drain output

    Status Flag pin. An internal open drain transistor can pull

    the pin to GND when a programmed alarm condition

    occurs (step loss, OCD, thermal pre-warning or

    shutdown, UVLO, wrong command, non performable

    command)

    3 STBY\RST Logic input

    Standby and reset pin. LOW logic level reset the logic

    and puts the device in standby mode. If not used, should

    be connected to VDD

    25 STCK Logic input Step clock input

    EPAD Exposed pad Ground Internally connected to PGND, AGND and DGND pins

    Table 6. Pin description (continued)

    N. Name Type Function

  • 7/28/2019 dSPIN

    18/67

    Typical applications L6470

    18/67 Doc ID 16737 Rev 3

    5 Typical applications

    Figure 3. Bipolar stepper motor control application using L6470

    Table 7. Typical application values

    Name value

    CVS 220 nF

    CVSPOL 100 F

    CREG 100 nF

    CREGPOL 47 F

    CDD 100 nF

    CDDPOL 10 F

    D1 Charge pump diodes

    CBOOT 220 nFCFLY 10 nF

    RPU 39 k

    RSW 100

    CSW 10 nF

    RA 2.7 k (VS = 36 V)

    RB 62 k (VS = 36 V)

  • 7/28/2019 dSPIN

    19/67

    L6470 Functional description

    Doc ID 16737 Rev 3 19/67

    6 Functional description

    6.1 Device power-up

    At power-up end, the device state is the following:

    Registers are set to default,

    Internal logic is driven by internal oscillator and a 2MHz clock is provided by OSCOUTpin,

    Bridges are disabled (High Z),

    UVLO bit in STATUS register is forced low (fail condition),

    FLAG output is forced low

    During power-up the device is under reset (all logic IO disabled and power bridges in highimpedance state) until the following conditions are satisfied:

    VS

    is greater than VSthOn

    ,

    VREG is greater than VREGth = 2.8 V typical

    Internal oscillator is operative.

    Any motion command makes the device exiting from High Z state (HardStop and SoftStopincluded).

    6.2 Logic I/O

    Pins CS, CK, SDI, STCK, SW and STBY\RST are TTL/CMOS 3.3V-5V compatible logicinputs.

    Pin SDO is a TTL/CMOS compatible logic output. VDD pin voltage sets the logic output pinvoltage range; when it is connected to VREG or 3.3V external supply voltage, the output is3.3V compatible. When VDD is connected to a 5V supply voltage, SDO is 5V compatible.

    VDD is not internally connected to VREG, an external connection is always needed.

    A 10 F capacitor should be connected to VDD pin in order to obtain a proper operation.

    Pins FLAG and BUSY\SYNC are open drain outputs.

    6.3 Charge pump

    To ensure the correct driving of the high side integrated mosfets a voltage higher than the

    motor power supply voltage needs to be applied to the VBOOT pin. The high side gatedriver supply voltage Vboot is obtained through an oscillator and a few external componentsrealizing a charge pump (see Figure 4).

  • 7/28/2019 dSPIN

    20/67

    Functional description L6470

    20/67 Doc ID 16737 Rev 3

    Figure 4. Charge pump circuitry

    6.4 Microstepping

    The driver is able to divide the single step into up to 128 microsteps. Stepping mode can beprogrammed by STEP_SEL parameter in STEP_MODE register (see Table 18).

    Step mode can be only changed when bridges are disabled. Every time the step mode is

    changed the electrical position (i.e. the point of microstepping sinewave that is generated) isreset to first microstep and the absolute position counter value (see Section 6.5) becomesmeaningless.

    Figure 5. Normal mode and microstepping (128 microsteps)

    !-V

    63

    636

    #06

    $6

    $

    6#0

    F05-0

    TOHIGHSIDE

    GATEDRIVERS

    636

    #06

    $

    #"//4

    #&,9

    $$

    6"//4 #0

    6$$

    !-V

    STEP STEPSTEP STEP STEP STEP

    2ESETPOSITION

    STEPSTEP STEP STEP

    .ORMALDRIVING -ICROSTEPPING

    0(!3%!CURRENT0(!3%"CURRENT

    0(!3%!CURRENT0(!3%"CURRENT

    MICROSTEPS

    STEPS

    STEPS

    STEPS

    STEPS

    2ESET

    POSITION

  • 7/28/2019 dSPIN

    21/67

    L6470 Functional description

    Doc ID 16737 Rev 3 21/67

    6.4.1 Automatic full-step mode

    When motor speed is greater than a programmable full step speed threshold, the L6470switches automatically to full-step mode (see Figure 6); the driving mode returns tomicrostepping when motor speed decrease below the full step speed threshold. Full stepspeed threshold is set through the FS_SPD register (see Section 9.1.9).

    Figure 6. Automatic full-step switching

    6.5 Absolute position counter

    An internal 22 bit register (ABS_POS) takes memory of motor motion according to the

    selected step mode; the stored value unit is equal to the selected step mode (full, half,quarter, etc.). The position range is from -221to +221-1 ()steps (see Section 9.1.1).

    6.6 Programmable speed profiles

    The user can easily program a customized speed profile defining independentlyacceleration, deceleration, maximum and minimum speed values by ACC, DEC,MAX_SPEED and MIN_SPEED registers respectively (see Section 9.1.5, 9.1.6, 9.1.7and9.1.8).

    When a command is sent to the device, the integrated logic generates the microstepfrequency profile that performs a motor motion compliant to speed profile boundaries.

    All acceleration parameters are expressed in step/tick2 and all speed parameters areexpressed in step/tick; the unit of measure does not depend on selected step mode.Acceleration and deceleration parameters range from 2-40 to (212-2)2-40 step/tick2(equivalent to 14.55 to 59590 step/s2).

    Minimum speed parameter ranges from 0 to (212-1)2-24 step/tick (equivalent to 0 to 976.3step/s).

    Maximum speed parameter ranges from 2-18 to (210-1) 2-18 step/tick (equivalent to 15.25 to15610 step/s).

    Phase A

    Phase B

    (2N+1) x /4 (2N+1) x /4

    Full-StepStepping Stepping

    Ipeak

    sin(/4) x Ipeak

  • 7/28/2019 dSPIN

    22/67

    Functional description L6470

    22/67 Doc ID 16737 Rev 3

    6.6.1 Infinite acceleration/deceleration mode

    When ACC register value is set to max (0xFFF), system works in infinite accelerationmode: acceleration and deceleration phases are totally skipped as shown in Figure 7.

    It is not possible to skip the acceleration or deceleration phase independently.

    Figure 7. Speed profile in infinite acceleration/deceleration mode

    30%%$

    )NDEXINGMODE #ONSTANTSPEEDMODE

    TIME

    0ROGRAMMEDNUMBEROFMICROSTEPS

    TIME

    !-6

    0ROGRAMMEDMAXIMUMSPEED

  • 7/28/2019 dSPIN

    23/67

    L6470 Functional description

    Doc ID 16737 Rev 3 23/67

    6.7 Motor control commands

    The L6470 can accept different types of commands:

    constant speed commands (Run, GoUntil, ReleaseSW),

    absolute positioning commands (GoTo, GoTo_DIR, GoHome, GoMark), motion commands (Move),

    stop commands (SoftStop, HardStop, SoftHiz, HardHiz).

    For detailed command descriptions refer to Section 9.2 on page 54.

    6.7.1 Constant speed commands

    A constant speed command produces a motion in order to reach and maintain a user-defined target speed starting from the programmed minimum speed (set in MIN_SPEEDregister) and with the programmed acceleration/deceleration value (set in ACC and DECregisters). A new constant speed command can be requested anytime.

    Figure 8. Constant speed commands examples

    6.7.2 Positioning commands

    An absolute positioning command produces a motion in order to reach a user-definedposition that is sent to the device together with the command. The position can be reachedperforming the minimum path (minimum physical distance) or forcing a direction (seeFigure 9).

    Performed motor motion is compliant to programmed speed profile boundaries

    (acceleration, deceleration, minimum and maximum speed).

    Note that with some speed profiles or positioning commands, the deceleration phase canstart before the maximum speed is reached.

    !-V

    30$

    30$

    30$

    30$

    2UN30$&7

    TIME

    3PEED

    STEPFREQUENCY

    2UN30$&7

    2UN30$&7

    2UN30$"7

    -INIMUM

    SPEED

    -INIMUM

    SPEED

  • 7/28/2019 dSPIN

    24/67

    Functional description L6470

    24/67 Doc ID 16737 Rev 3

    Figure 9. Positioning command examples

    6.7.3 Motion commands

    Motion commands produce a motion in order to perform a user-defined number ofmicrosteps in a user-defined direction that are sent to the device together with the command(see Figure 10).

    Performed motor motion is compliant to programmed speed profile boundaries(acceleration, deceleration, minimum and maximum speed).

    Note that with some speed profiles or motion commands, the deceleration phase can startbefore the maximum speed is reached.

    Figure 10. Motion commands examples

    6.7.4 Stop commands

    A stop command forces the motor to stop. Stop commands can be sent anytime.

    SoftStop command causes the motor to decelerate with programmed deceleration valueuntil MIN_SPEED value is reached and then stops the motor keeping the rotor position (aholding torque is applied).

    HardStop command stops the motor instantly ignoring deceleration constrain and keepingthe rotor position (a holding torque is applied).

    !-V

    &ORWARD

    DIRECTION

    0RESENT

    POSITION

    4ARGET

    POSITION

    0RESENT

    POSITION

    4ARGET

    POSITION

    'O4O4ARGETPOS 'O4O?$)24ARGETPOS&7

    !-V

    PROGRAMMED!##%,%2!4)/.

    30%%$

    PROGRAMMEDMAXIMUM

    SPEED

    PROGRAMMED

    MINIMUMSPEED

    TIME

    PROGRAMMED$%#%,%2!4)/.

    PROGRAMMEDNUMBEROFMICROSTEPS

    PROGRAMMED!##%,%2!4)/.

    30%%$

    PROGRAMMEDMAXIMUM

    SPEED

    PROGRAMMEDMINIMUM

    SPEED

    TIME

    PROGRAMMED$%#%,%2!4)/.

    PROGRAMMEDNUMBEROFMICROSTEPS

    .OTEWITHSOME!CCELERATION$ECELARATIONPROFILESTHEPROGRAMMEDMAXIMUMSPEED

    ISNEVERREACHED

  • 7/28/2019 dSPIN

    25/67

    L6470 Functional description

    Doc ID 16737 Rev 3 25/67

    SoftHiZ command causes the motor to decelerate with programmed deceleration value untilMIN_SPEED value is reached and then forces the bridges in high impedance state (noholding torque is present).

    HardHiZ command instantly forces the bridges in high impedance state (no holding torque is

    present).

    6.7.5 Step-clock mode

    In step clock mode the motor motion is defined by the step clock signal applied to STCK pin.At each step clock rising edge, the motor is moved of one microstep in the programmeddirection and absolute position is consequently updated.

    When the system is in step clock mode the SCK_MOD flag in STATUS register is raised,SPEED register is set to zero and motor status is considered stopped whatever the STCKsignal frequency (MOT_STATUS parameter in STATUS register equal to 00).

    6.7.6 GoUntil and ReleaseSW commands

    In most applications the power-up position of the stepper motor is undefined, so aninitialization algorithm driving the motor to a known position is necessary.

    The GoUntil and ReleaseSW commands can be used in combination with external switchinput (see Section 6.13) to easily initialize the motor position.

    GoUntil command makes the motor run at target constant speed until the SW input is forcedlow (falling edge). When this event occurs, one of the following actions can be performed:

    ABS_POS register is set to zero (home position) and the motor decelerates to zerospeed (as a SoftStop command);

    ABS_POS register value is stored into MARK register and the motor decelerates tozero speed (as a SoftStop command).

    If the SW_MODE bit of CONFIG register is set to 0, the motor do not decelerates but itimmediately stops (as a HardStop command).

    ReleaseSW command makes the motor run at programmed minimum speed until the SWinput is forced high (rising edge). When this event occurs, one of the following actions canbe performed:

    ABS_POS register is set to zero (home position) and the motor immediately stops (as aHardStop command);

    ABS_POS register value is stored into MARK register and the motor immediately stops(as a HardStop command).

    If the programmed minimum speed is lesser than 5 step/s, the motor is driven at 5 step/s.

  • 7/28/2019 dSPIN

    26/67

    Functional description L6470

    26/67 Doc ID 16737 Rev 3

    6.8 Internal oscillator and oscillator driver

    The control logic clock can be supplied by the internal 16 MHz oscillator, an externaloscillator (crystal or ceramic resonator) or a direct clock signal.

    These working modes can be selected by EXT_CLK and OSC_SEL parameters in theCONFIG register (see Table 23).

    At power-up the device starts using the internal oscillator and provides a 2 MHz clock signalon the OSCOUT pin.

    Attention: In any case, before changing clock source configuration, ahardware reset is mandatory. Switching to different clockconfigurations during operation could cause unexpectedbehavior.

    6.8.1 Internal oscillator

    In this mode the internal oscillator is activated and OSCIN is unused. If OSCOUT clocksource is enabled, OSCOUT pin provides a 2, 4, 8 or 16 MHz clock signal (according toOSC_SEL value); otherwise it is unused (see Figure 11).

    6.8.2 External clock source

    Two types of external clock source can be selected: crystal/ceramic resonator or direct clocksource. Four programmable clock frequencies are available for each external clock source:8, 16, 24 and 32 MHz.

    When an external crystal/resonator is selected, OSCIN and OSCOUT pins are used to drivethe crystal/resonator (see Figure 11). Crystal/resonator and load capacitors (CL) must beplaced as close as possible to the pins. Refer to Table 8for the choice of the load capacitorvalue according to the external oscillator frequency.

    If a direct clock source is used, it must be connected to OSCIN pin and OSCOUT pinsupplies the inverted OSCIN signal (see Figure 11).

    Table 8. CL values according to external oscillator frequency

    Crystal/resonator freq. (1)

    1. First harmonic resonance frequency.

    CL(2)

    2. Lower ESR value allows driving greater load capacitors.

    8MHz 25pF (ESRmax = 80)

    16MHz 18pF (ESRmax = 50)

    24MHz 15pF (ESRmax = 40)

    32MHz 10pF (ESRmax = 40)

  • 7/28/2019 dSPIN

    27/67

    L6470 Functional description

    Doc ID 16737 Rev 3 27/67

    Figure 11. OSCIN and OSCOUT pins configurations

    Note: When OSCIN is UNUSED, it should be left floating.

    When OSCOUT is UNUSED it should be left floating.

    6.9 Overcurrent detection

    When the current in any of the power MOSFETs exceeds a programmed overcurrentthreshold, STATUS register OCD flag is forced low until the overcurrent event is expired anda GetStatus command is sent to the IC (see paragraphs 9.1.22and 9.1.17). Overcurrentevent expires when all the power MOSFET currents fall below the programmed overcurrentthreshold.

    The overcurrent threshold can be programmed through the OCD_TH register in one of 16available values ranging from 375 mA to 6 A with steps of 375 mA (see Table 9, paragraph9.1.17).

    It is possible to set if an overcurrent event causes or not the MOSFETs turn-off (bridges inhigh impedance status)acting on OC_SD bit in the CONFIG register (see paragraph 9.1.21).The OCD flag in the STATUS register is raised anyway (see Table 34, paragraph 9.1.22).

    When the IC outputs are turned-off by an OCD event, they cannot be turned on until theOCD flag is released by a GetStatus command.

    Attention: The overcurrent shutdown is a critical protection feature. It isnot recommended to disable it.

    !-V

    5.53%$

    /3#). /3#/54 /3#). /3#/54

    /3#). /3#/54

    -(Z

    -(Z

    -(Z

    %XTERNALOSCILLATOR

    CONFIGURATION

    %XTERNALCLOCKSOURCE

    CONFIGURATION

    )NTERNALOSCILLATOR

    CONFIGURATION

    WITHCLOCKGENERATION

    /3#). /3#/54

    )NTERNALOSCILLATOR

    CONFIGURATION

    WITHOUTCLOCKSOURCE

    5.53%$ 5.53%$

    /3#?3%,XX

    /3#?3%,XX

    # , # ,

    %84?#,+ %84?#,+

  • 7/28/2019 dSPIN

    28/67

    Functional description L6470

    28/67 Doc ID 16737 Rev 3

    6.10 Undervoltage lock-out (UVLO)

    The L6470 provides a motor supply UVLO protection. When the motor supply voltage fallsbelow the VSthOff threshold voltage, STATUS register UVLO flag is forced low. When aGetStatus command is sent to the IC, and the undervoltage condition is expired, the UVLOflag is released (see paragraphs 9.1.22and 9.2.20). Undervoltage condition expires whenthe motor supply voltage goes over the VSthOn threshold voltage. When the device is inundervoltage condition no motion command can be performed. UVLO flag is forced low bylogic reset (power-up included) even if no UVLO condition is present.

    6.11 Thermal warning and thermal shutdown

    An internal sensor allows the L6470 to detect when the device internal temperature exceedsa thermal warning or an overtemperature threshold.

    When the thermal warning threshold (Tj(WRN)) is reached the TH_WRN bit in the STATUS

    register is forced low (see paragraph 9.1.22) until the temperature decrease below Tj(WRN)and a GetStatus command is sent to the IC (see paragraphs 9.1.22and 9.2.20).

    When the thermal shutdown threshold (Tj(OFF)) is reached the device goes in thermalshutdown condition: the TH_SD bit in the STATUS register is forced low, the power bridgesare disabled bridges in high impedance state and the HiZ bit in the STATUS register israised (see paragraph 9.1.22).

    Thermal shutdown condition only expires when the temperature goes below the thermalwarning threshold (Tj(WRN)).

    On exit from thermal shutdown condition the bridges are still disabled (HiZ flag high);whichever motion command makes the device exiting from High Z state (HardStop andSoftStop included).

    6.12 Reset and standby

    The device can be reset and put into standby mode through a dedicated pin. WhenSTBY\RST pin is driven low, the bridges are left open (High Z state), the internal chargepump is stopped, the SPI interface and control logic are disabled and the internal 3 Vvoltage regulator maximum output current is reduced to IREG,STBY; as a result the L6470heavily reduces the power consumption. At the same time the registers values are reset todefault and all protection functions are disabled. STBY\RST input has to be forced low atleast for tSTBY,min in order to ensure the complete switch to standby mode.

    On exit from standby mode, as well as for IC power-up, a delay of up to tlogicwu must be

    given before applying a new command to allow proper oscillator and logic startup and adelay of up to tcpwu must be given to allow the charge pump startup.

    On exit from standby mode the bridges are disabled (HiZ flag high) and whichever motioncommand makes the device exiting from High Z state (HardStop and SoftStop included).

    Attention: It is not recommended to reset device when outputs areactive. The device should be switched to high impedancestate before being reset.

  • 7/28/2019 dSPIN

    29/67

    L6470 Functional description

    Doc ID 16737 Rev 3 29/67

    6.13 External switch (SW pin)

    The SW input is internally pulled-up to VDD and detects if the pin is open or connected toground (see Figure 12).

    The SW_F bit of STATUS register indicates if the switch is open (0) or closed (1) (seeparagraph 9.1.22); the bit value is refreshed at every system clock cycle (125 ns). SW_EVNflag of STATUS register is raised when a switch turn-on event (SW input falling edge) isdetected (see paragraph 9.1.22). A GetStatus command releases the SW_EVN flag (seeparagraph 9.2.20.

    By default a switch turn-on event causes a HardStop interrupt (SW_MODE bit of CONFIGregister set to 0). Otherwise (SW_MODE bit of CONFIG register set to 1), switch inputevents do not cause interrupts and the switch status information are at user disposal (seeTable 34, paragraph 9.1.22).

    The switch input can used by GoUntil and ReleaseSW commands as described inparagraph 9.2.10and 9.2.11.

    If the SW input is not used, it should be connected to VDD.

    Figure 12. External switch connection

    !-V

    %XTERNAL

    3WITCH

    37

    6$$

  • 7/28/2019 dSPIN

    30/67

    Functional description L6470

    30/67 Doc ID 16737 Rev 3

    6.14 Programmable DMOS slew-rate, dead-time and blanking-time

    Using the POW_SR parameter in the CONFIG register, it is possible to set the commutationspeed of the power bridges output (see Table 26, paragraph 9.1.21).

    6.15 Integrated analog to digital converter

    The L6470 integrates a NADC bit ramp-compare analog to digital converter with a referencevoltage equal to VREG. The analog to digital converter input is available through the ADCINpin and the conversion result is available in the ADC_OUT register (see paragraph 9.1.16).

    Sampling frequency is equal to the programmed PWM frequency.

    The ADC_OUT value can be used for motor supply voltage compensation or can be at userdisposal.

    6.16 Internal voltage regulatorThe L6470 integrates a voltage regulator which generates a 3 V voltage starting from motorpower supply (VSA and VSB). In order to make the voltage regulator stable, at least 22 Fshould be connected between VREG pin and ground (suggested value is 47 F).

    The internal voltage regulator can be used to supply the VDD pin in order to make thedevice digital output range 3.3 V compatible (Figure 13). A digital output range 5 Vcompatible can be obtained connecting VDD pin to an external 5 V voltage source. In bothcases, a 10 F capacitance should be connected to VDD pin in order to obtain a correctoperation.

    The internal voltage regulator is able to supply a current up to IREG,MAX, internal logic

    consumption included (Ilogic). When the device is in standby mode the maximum current thatcan be supplied is IREG, STBY, internal consumption included (Ilogic, STBY).

    If an external 3.3 V regulated voltage is available, it can be applied to the VREG pin in orderto supply all the internal logic and avoiding power dissipation of the internal 3 V voltageregulator (Figure 13). External voltage regulator should never sink current from VREG pin.

    Figure 13. Internal 3 V linear regulator

    VREG VDD VSA VSB

    AGNDDGND

    VDD

    C IC

    Vs

    3V

    VREG VDD VSA VSB

    AGNDDGND

    IC

    3.3V

    REG.

    Vs

    VBAT

    Logig supplied by

    INTERNAL voltage regulator

    Logig supplied by

    EXTERNAL voltage regulator

  • 7/28/2019 dSPIN

    31/67

    L6470 Functional description

    Doc ID 16737 Rev 3 31/67

    6.17 BUSY\SYNC pin

    This pin is an open drain output which can be used as busy flag or synchronization signalaccording to SYNC_EN bit value (STEP_MODE register).

    6.17.1 BUSY operation mode

    The pin works as busy signal when SYNC_EN bit is set low (default condition). In this modethe output is forced low while a constant speed, absolute positioning or motion command isunder execution. The BUSY pin is released when command has been executed (targetspeed or target position reached). The STATUS register includes a BUSY flag that is theBUSY pin mirror (see paragraph 9.1.22).

    In case of daisy-chain configuration, BUSY pins of different ICs can be hard-wired to savehost controller GPIOs.

    6.17.2 SYNC operation mode

    The pin works as synchronization signal when SYNC_EN bit is set high. In this mode a stepclock signal is provided on output according to SYNC_SEL and STEP_SEL parameterscombination (see paragraph 9.1.19).

    6.18 FLAG pin

    By default an internal open drain transistor pulls the FLAG pin to ground when at least oneof the following conditions occurs:

    Power-up or standby/reset exit,

    Stall detection on A bridge,

    Stall detection on B bridge, Overcurrent detection,

    Thermal warning,

    Thermal shutdown,

    UVLO,

    Switch turn-on event,

    Wrong command,

    Non performable command.

    It is possible to mask one or more alarm conditions by programming the ALARM_EN

    register (see paragraph 9.1.20, Table 21). If the corresponding bit of ALARM_EN register islow, the alarm condition is masked and it does not cause a FLAG pin transition; all otheractions imposed by alarm conditions are performed anyway. In case of daisy-chainconfiguration, FLAG pins of different ICs can be or-wired to save host controller GPIOs.

  • 7/28/2019 dSPIN

    32/67

    Phase current control L6470

    32/67 Doc ID 16737 Rev 3

    7 Phase current control

    The L6470 controls the phase current applying a sinusoidal voltage to motor windings.

    Phase current amplitude is not directly controlled but depends on phase voltage amplitude,load torque, motor electrical characteristics and rotation speed. Sinewave amplitude isproportional to the motor supply voltage multiplied by a coefficient (KVAL). KVAL ranges from0 to 100% and the sinewave amplitude can be obtained through the following formula:

    Equation 1

    Different KVAL values can be programmed for acceleration, deceleration and constant speedphases and when motor is stopped (HOLD phase) through KVAL_ACC, KVAL_DEC,KVAL_RUN and KVAL_HOLD registers (see paragraph 9.1.10). KVAL value is calculatedaccording following formula:

    Equation 2

    Where KVAL_X is the starting KVAL value programmed for present motion phase(KVAL_ACC, KVAL_DEC, KVAL_RUN or KVAL_HOLD), BEMF_COMP is the BEMFcompensation curve value, VSCOMP and K_THERM are the motor supply voltage andwinding resistance compensation factors and microstep is the current microstep value(fraction of target peak current).

    L6470 offers various methods to guarantee a stable current value, allowing thecompensation of:

    low speed optimization (see paragraph 7.3)

    back electromotive force value (see paragraph 7.4);

    motor supply voltage variation (see paragraph 7.5);

    windings resistance variation (see paragraph 7.6).

    7.1 PWM sinewave generators

    The two voltage sinewaves applied to stepper motor phases are generated by two PWMmodulators.

    The PWM frequency (fPWM) is proportional to the oscillator frequency (fOSC) and can be

    obtained through the following formula:

    Equation 3

    'N' is the integer division factor and 'm' is the multiplication factor. 'N' and 'm' values can beprogrammed by F_PWM_INT and F_PWM_DEC parameters in CONFIG register (seeTable 28and Table 29, paragraph 9.1.21).

    VALSOUT KVV =

    ) ) microstepTHERM_KVSCOMPCOMP_BEMFKK VAL_XVAL +=

    mN512

    ff OSCPWM

    =

  • 7/28/2019 dSPIN

    33/67

    L6470 Phase current control

    Doc ID 16737 Rev 3 33/67

    Available PWM frequencies are listed in paragraph 9.1.21 from Table 30to Table 33.

    7.2 Sensorless stall detection

    Depending on motor speed and load angle characteristics, L6470 offers a motor stallcondition detection using a programmable current comparator.

    When a stall event occurs, the respective flag (STEP_LOSS_A or STEP_LOSS_B) is forcedlow until a GetStaus command or a system reset occurs (see paragraph 9.2.20).

    7.3 Low speed optimization

    When motor is driven at a very low speed using a small driving voltage, the resulting phasecurrent can be distorted. As a consequence, the motor position is different from the idealone (see Figure 14).

    L6470 implements a low speed optimization in order to remove this effect.

    Figure 14. Current distortion and compensation

    The optimization can be enabled setting high the LSPD_OPT bit in MIN_SPEED register(see paragraph 9.1.8) and is active into speed range from zero to MIN_SPEED. When lowspeed optimization is enabled, speed profile minimum speed is forced to zero.

    )PHASE

    )PHASE

    #URRENTDISTORTIO NISHEAVILYREDUCED

    7ITHOUTLOWSPEEDOPTIMIZAZION

    7ITHLOWSPEEDOPTIMIZAZION

    !-6

  • 7/28/2019 dSPIN

    34/67

    Phase current control L6470

    34/67 Doc ID 16737 Rev 3

    7.4 BEMF compensation

    Using the speed information, a compensation curve is added to the amplitude of the voltagewaveform applied to the motor winding in order to compensate the BEMF variations duringacceleration and deceleration (see Figure 15).

    Compensation curve is approximated by a stacked line with a starting slope (ST_SLP) whenspeed is lower than a programmable threshold speed (INT_SPEED) and a fine slope(FN_SLP_ACC and FN_SLP_DEC) when speed is greater than the threshold speed (seeparagraphs 9.1.11, 9.1.12, 9.1.13and 9.1.14).

    To obtain different current values during acceleration and deceleration phase two differentfinal slope values, and consequently two different compensation curves, can beprogrammed.

    Acceleration compensation curve is applied when the motor runs. No BEMF compensationis applied when the motor is stopped.

    7.5 Motor supply voltage compensation

    The sinewave amplitude generated by the PWM modulators is directly proportional to themotor supply voltage (VS). When the motor supply voltage is different from its nominal value,the motor phases are driven with an incorrect voltage. The L6470 can compensate motorsupply voltage variations in order to avoid this effect.

    The motor supply voltage should be connected to the integrated ADC input through aresistor divider in order to obtain VREG/2 voltage at the ADCIN pin when VS is at its nominal

    value (see Figure 16).

    The ADC input is sampled at fS frequency, which is equal to PWM frequency.

    Figure 15. BEMF compensation curve

    !-V

    3PEED

    #OMPENSATION

    VALUE

    ).4?30%%$

    34?3,0

    &.?3,0?!##

    &.?3,0?$%#

  • 7/28/2019 dSPIN

    35/67

    L6470 Phase current control

    Doc ID 16737 Rev 3 35/67

    Motor supply voltage compensation can be enabled setting high the EN_VSCOMP bit of the

    CONFIG register (see Table 22, paragraph 9.1.21). If EN_VSCOMP bit is low thecompensation is disabled and the internal analog to digital converter is at user disposal;sampling rate is always equal to PWM frequency.

    7.6 Winding resistance thermal drift compensation

    The higher is the winding resistance the greater is the voltage to be applied in order toobtain the same phase current.

    The L6470 integrates a register (K_THERM) which can be used to compensate phaseresistance increment due by temperature rising.

    The value in K_THERM register (see paragraph 9.1.15) multiplies duty cycle value allowing

    to face higher phase resistance value.

    The compensation algorithm and the eventual motor temperature measurement should beimplemented by microcontroller firmware.

    Figure 16. Motor supply voltage compensation circuit

    !-V

    !$#).

    !$#

    F07-

    !$#?/54

    63

    62%'

    2!

    2"

    6!$#).

    63X2

    "2

    !2

    "

  • 7/28/2019 dSPIN

    36/67

    Serial interface L6470

    36/67 Doc ID 16737 Rev 3

    8 Serial interface

    The integrated 8bit serial peripheral interface (SPI) is used for a synchronous serial

    communication between the host microprocessor (always master) and the L6470 (alwaysslave).

    The SPI uses chip select (CS), serial clock (CK), serial data input (SDI) and serial dataoutput (SDO) pins. When CS is high the device is unselected and the SDO line is inactive(high-impedance).

    The communication starts when CS is forced low. The CK line is used for synchronization ofdata communication.

    All commands and data bytes are shifted into the device through the SDI input, mostsignificant bit first. The SDI is sampled on the rising edges of the CK.

    All output data bytes are shifted out of the device through the SDO output, most significant

    bit first. The SDO is latched on the falling edges of the CK. When a return value from thedevice is not available, an all zero byte is sent.

    After each byte transmission the CS input must be raised and be kept high for at least tdisCSin order to allow the device to decode the received command and put into the shift registerthe return value.

    All timing requirements are shown in Figure 17(see respective electrical characteristicssection for values).

    Multiple devices can be connected in daisy-chain configuration, as shown in Figure 18.

    Figure 17. SPI timings diagram

    !-V

    #+

    3$)

    3$/

    #3

    -3" ,3"

    ,3"

    . .

    -3"(I:

    . .

    TSET#3

    TEN3$/TSET3$) THOL3$)

    TV3$/THOL3$/

    TR#+ TF#+TH#+ TL#+

    TDIS3$/THOL#3

    TDIS#3

    -3"

  • 7/28/2019 dSPIN

    37/67

    L6470 Serial interface

    Doc ID 16737 Rev 3 37/67

    Figure 18. Daisy-chain configuration

    !-V

    (/34

    (/3430)SIGNALS

    $%6

    #3

    3$/-

    3$)-

    #3#+

    3$)

    3$/

    #3#+

    3$)-

    3$/-

    $%6

    #3

    #+

    3$)

    3$/

    $%6.

    #3

    #+

    3$)

    3$/

    "YTE. "YTE.

    "YTE."YTE.

    "YTE.

    "YTE.

    "YTE

    "YTE

  • 7/28/2019 dSPIN

    38/67

    Programming manual L6470

    38/67 Doc ID 16737 Rev 3

    9 Programming manual

    9.1 Registers and flags description

    Following a map of the user registers available (detailed description in respectiveparagraphs):

    Table 9. Registers map

    Address

    [Hex]Register name Register function

    Len.

    [bit]

    Reset

    Hex

    Reset

    Value

    Remarks(1)

    h01 ABS_POS Current position 22 000000 0 R, WS

    h02 EL_POS Electrical position 9 000 0 R, WS

    h03 MARK Mark position 22 000000 0 R, WR

    h04 SPEED Current speed 20 000000 step/tick

    (0 step/s)R

    h05 ACC Acceleration 12 08A125.5e-12 step/tick2

    (2008 step/s2)R, WS

    h06 DEC Deceleration 12 08A125.5e-12 step/tick2

    (2008 step/s2)R, WS

    h07 MAX_SPEED Maximum speed 10 041248e-6 step/tick

    (991.8 step/s)R, WR

    h08 MIN_SPEED Minimum speed 13 0000 step/tick

    (0 step/s)R, WS

    h15 FS_SPD Full step speed 10 027 150.7e-6 step/tick(602.7 step/s) R, WR

    h09 KVAL_HOLD Holding KVAL 8 29 0.16VS R, WR

    h0A KVAL_RUN Constant speed KVAL 8 29 0.16VS R, WR

    h0B KVAL_ACC Acceleration starting KVAL 8 29 0.16VS R, WR

    h0C KVAL_DEC Deceleration starting KVAL 8 29 0.16VS R, WR

    h0D INT_SPD Intersect speed 14 0408 61.5e-6 step/tick (246 step/s) R, WH

    h0E ST_SLP Start slope 8 19 0.038% s/step R, WH

    h0F FN_SLP_ACC Acceleration final slope 8 29 0.063% s/step R, WH

    h10 FN_SLP_DEC Deceleration final slope 8 29 0.063% s/step R, WH

    h11 K_THERMThermal compensation

    factor4 0 1.0 R, WR

    h12 ADC_OUT ADC output 5 XX(2) R

    h13 OCD_TH OCD threshold 4 8 3.38A R, WR

    h14 STALL_TH STALL threshold 7 40 2.03A R, WR

    h16 STEP_MODE Step mode 8 7 128 microsteps R, WH

    h17 ALARM_EN Alarms enables 8 FF All alarms enabled R, WS

  • 7/28/2019 dSPIN

    39/67

    L6470 Programming manual

    Doc ID 16737 Rev 3 39/67

    9.1.1 ABS_POS

    The ABS_POS register contains the current motor absolute position in agreement to theselected step mode; the stored value unit is equal to the selected step mode (full, half,quarter, etc.). The value is in two's complement format and it ranges from -221 to +221-1.

    At power-on the register is initialized to 0 (HOME position).

    Any attempt to write the register when the motor is running causes the command to beignored and the NOTPERF_CMD flag to rise (see paragraph 9.1.22).

    9.1.2 EL_POS

    The EL_POS register contains the current electrical position of the motor. The two MSbitsindicate the current step and the other bits indicate the current microstep (expressed instep/128) within the step.

    When the EL_POS register is written by the user the new electrical position is instantlyimposed. When the EL_POS register is written its value must be masked in order to matchwith the step mode selected in STEP_MODE register in order to avoid a wrong microstepvalue generation (see paragraph 9.1.19); otherwise the resulting microstep sequence will beincorrect.

    Any attempt to write the register when the motor is running causes the command to beignored and the NOTPERF_CMD flag to rise (see paragraph 9.1.22).

    h18 CONFIG IC configuration 16 2E88

    Internal oscillator,2MHz OSCOUT clock,

    supply voltage compensation

    disabled,

    overcurrent shutdown enabled,

    slew-rate = 290 V/s

    PWM frequency = 15.6kHz.

    R, WH

    h19 STATUS Status 16 XXXX(2)High impedance state,

    UVLO/Reset flag set.R

    h1A RESERVED Reserved address

    h1B RESERVED Reserved address

    1. R: Readable, WH: writable only when outputs are in high impedance, WS: writable only when motor is stopped, WR:always writable.

    2. According to startup conditions.

    Table 9. Registers map (continued)

    Address

    [Hex]Register name Register function

    Len.

    [bit]

    Reset

    Hex

    Reset

    Value

    Remarks(1)

    Table 10. EL_POS register

    Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

    STEP MICROSTEP

  • 7/28/2019 dSPIN

    40/67

  • 7/28/2019 dSPIN

    41/67

    L6470 Programming manual

    Doc ID 16737 Rev 3 41/67

    9.1.6 DEC

    The DEC register contains the speed profile deceleration expressed in step/tick2 (formatunsigned fixed point 0.40).

    In order to convert DEC value in step/s2

    the following formula can be used:

    Equation 6

    where DEC is the integer number stored into the register and tick is 250 ns.

    The available range is from 14.55to 59590 step/s2 with a resolution of 14.55 step/s2.

    When the device is working in infinite acceleration mode this value is ignored.

    Any attempt to write the register when the motor is running causes the command to be

    ignored and the NOTPERF_CMD flag to rise (see paragraph 9.1.22).

    9.1.7 MAX_SPEED

    The MAX_SPEED register contains the speed profile maximum speed expressed instep/tick (format unsigned fixed point 0.18).

    In order to convert it in step/s the following formula can be used:

    Equation 7

    where MAX_SPEED is the integer number stored into the register and tick is 250 ns.

    The available range is from 15.25 to 15610 step/s with a resolution of 15.25 step/s.

    9.1.8 MIN_SPEED

    The MIN_SPEED register contains following parameters:

    The MIN_SPEED parameter contains the speed profile minimum speed. Its value isexpressed in step/tick and to convert it in step/s the following formula can be used:

    [ ]2

    402

    tick

    2DECs/step

    =

    [ ]tick

    2SPEED_MAXs/step

    18

    =

    Table 11. MIN_SPEED register

    Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

    LSPD_OPT MIN_SPEED

    [ ]tick

    2SPEED_MINs/step

    24

    =

  • 7/28/2019 dSPIN

    42/67

  • 7/28/2019 dSPIN

    43/67

    L6470 Programming manual

    Doc ID 16737 Rev 3 43/67

    9.1.11 INT_SPEED

    The INT_SPEED register contains the speed value at which the BEMF compensation curvechanges slope (see paragraph 7.4for details). Its value is expressed in step/tick and toconvert it in [step/s] the following formula can be used:

    Equation 9

    where INT_SPEED is the integer number stored into the register and tick is 250 ns.

    The available range is from 0 to 3906 step/s with a resolution of 0.238 step/s.

    Any attempt to write the register when the motor is running causes the command to beignored and the NOTPERF_CMD flag to rise (see paragraph 9.1.22).

    9.1.12 ST_SLPThe ST_SLP register contains the BEMF compensation curve slope that is used when thespeed is lower than the intersect speed (see paragraph 7.4for details). Its value isexpressed in s/step and the available range is from 0 to 0.004 with a resolution of 0.000015.

    When ST_SLP, FN_SLP_ACC and FN_SLP_DEC parameters are set to zero no BEMFcompensation is performed.

    Any attempt to write the register when the motor is running causes the command to beignored and the NOTPERF_CMD flag to rise (see paragraph 9.1.22).

    9.1.13 FN_SLP_ACC

    The FN_SLP_ACC register contains the BEMF compensation curve slope that is used whenthe speed is greater than the intersect speed during acceleration (see paragraph 7.4fordetails). Its value is expressed in s/step and the available range is from 0 to 0.004 with aresolution of 0.000015.

    When ST_SLP, FN_SLP_ACC and FN_SLP_DEC parameters are set to zero no BEMFcompensation is performed.

    Any attempt to write the register when the motor is running causes the command to beignored and the NOTPERF_CMD flag to rise (see paragraph 9.1.22).

    Table 12. Voltage amplitude regulation registers

    KVAL_X [7..0] Output voltage

    0 0 0 0 0 0 0 0 0

    0 0 0 0 0 0 0 1 VS x (1/256)

    1 1 1 1 1 1 1 0 VS x (254/256)

    1 1 1 1 1 1 1 1 VS x (255/256)

    [ ]tick

    2SPEED_INTs/step

    24

    =

  • 7/28/2019 dSPIN

    44/67

    Programming manual L6470

    44/67 Doc ID 16737 Rev 3

    9.1.14 FN_SLP_DEC

    The FN_SLP_DEC register contains the BEMF compensation curve slope that is used whenthe speed is greater than the intersect speed during deceleration (see paragraph 7.4fordetails). Its value is expressed in s/step and the available range is from 0 to 0.004 with aresolution of 0.000015.

    When ST_SLP, FN_SLP_ACC and FN_SLP_DEC parameters are set to zero no BEMFcompensation is performed.

    Any attempt to write the register when the motor is running causes the command to beignored and the NOTPERF_CMD flag to rise (see paragraph 9.1.22).

    9.1.15 K_THERM

    The K_THERM register contains the value used by the winding resistance thermal driftcompensation system (see paragraph 7.6).

    The available range is from 1 to 1.46875 with a resolution of 0.03125 as shown in Table 13.

    9.1.16 ADC_OUT

    The ADC_OUT register contains the result of the analog to digital conversion of the ADCINpin voltage; the result is available even if the supply voltage compensation is disabled.

    Any attempt to write to the register causes the command to be ignored and theNOTPERF_CMD flag to r ise (see paragraph 9.1.22).

    Table 13. Winding resistance thermal drift compensation coefficient

    K_THERM [3..0] Compensation coeff.

    0 0 0 0 1

    0 0 0 1 1.03125

    1 1 1 0 1.4375

    1 1 1 1 1.46875

    Table 14. ADC_OUT value and motor supply voltage compensation feature

    VS VADCIN/VREGADC_OUT

    [4..0]

    Compensation

    coefficient

    Greater than VS,nom + 50% > 24/32 1 1 X X X 0.65625

    VS,nom + 50% 24/32 1 1 0 0 0 0.65625

    VS,nom 16/32 1 0 0 0 0 1

    VS,nom 50% 8/32 0 1 0 0 0 1.968875

    Lower than VS,nom 50% < 8/32 0 0 X X X 1.968875

  • 7/28/2019 dSPIN

    45/67

    L6470 Programming manual

    Doc ID 16737 Rev 3 45/67

    9.1.17 OCD_TH

    The OCD_TH register contains the overcurrent threshold value (see paragraph 6.9fordetails). The available range is from 375 mA to 6 A, steps of 375 mA as shown in Table 15.

    9.1.18 STALL_THThe STALL_TH register contains the stall detection threshold value (see paragraph 7.2fordetails). The available range is from 31.25 mA to 4 A with a resolution of 31.25 mA.

    9.1.19 STEP_MODE

    The STEP_MODE register has the following structure:

    The STEP_SEL parameter selects one of eight possible stepping modes:

    Table 15. Overcurrent detection threshold

    OCD_TH [3..0] Overcurrent detection threshold

    0 0 0 0 375 mA

    0 0 0 1 750 mA

    1 1 1 0 5.625 A

    1 1 1 1 6 A

    Table 16. Stall detection threshold

    STALL_th [6..0] Stall detection threshold

    0 0 0 0 0 0 0 31.25 mA

    0 0 0 0 0 0 1 62.5 mA

    1 1 1 1 1 1 0 3.969 A1 1 1 1 1 1 1 4 A

    Table 17. STEP_MODE register

    Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

    SYNC_EN SYNC_SEL 0 (1)

    1. When the register is written this bit should be set to 0.

    STEP_SEL

  • 7/28/2019 dSPIN

    46/67

    Programming manual L6470

    46/67 Doc ID 16737 Rev 3

    Every time the step mode is changed the electrical position (i.e. the point of microstepping

    sinewave that is generated) is reset to the first microstep.

    Warning: Every time STEP_SEL is changed the value in ABS_POSregister looses meaning and should be reset.

    Any attempt to write the register when the motor is running causes the command to beignored and the NOTPERF_CMD flag to rise (see paragraph 9.1.22).

    When when SYNC_EN bit is set low BUSY/SYNC output is forced low during commandsexecution, otherwise, when SYNC_EN bit is set high, BUSY/SYNC output provides a clocksignal according to SYNC_SEL parameter.

    Table 18. Step mode selection

    STEP_SEL[2..0] Step mode

    0 0 0 Full step

    0 0 1 Half step

    0 1 0 1/4 microstep

    0 1 1 1/8 microstep

    1 0 0 1/16 microstep

    1 0 1 1/32 microstep

    1 1 0 1/64 microstep

    1 1 1 1/128 microstep

    Table 19. SYNC output frequency

    STEP_SEL

    (fFS is the full step frequency)

    000 001 010 011 100 101 110 111

    SYNC_

    SE

    L

    000 fFS /2 fFS /2 fFS /2 fFS /2 fFS /2 fFS /2 fFS /2 fFS /2

    001 NA fFS fFS fFS fFS fFS fFS fFS

    010 NA NA 2 fFS 2 fFS 2 fFS 2 fFS 2 fFS 2 fFS

    011 NA NA NA 4 fFS 4 fFS 4 fFS 4 fFS 4 fFS

    100 NA NA NA NA 8 fFS 8 fFS 8 fFS 8 fFS

    101 NA NA NA NA NA 16 fFS 16 fFS 16 fFS

    110 NA NA NA NA NA NA 32 fFS 32 fFS

    111 NA NA NA NA NA NA NA 64 fFS

  • 7/28/2019 dSPIN

    47/67

    L6470 Programming manual

    Doc ID 16737 Rev 3 47/67

    the synchronization signal is obtained starting from electrical position information (EL_POSregister) according to following Table 10:

    9.1.20 ALARM_EN

    The ALARM_EN register allows selecting which alarm signals are used to generate theFLAG output. If the respective bit of ALARM_EN register is set high, the alarm conditionforces the FLAG pin output down.

    9.1.21 CONFIG

    The CONFIG register has the following structure:

    Table 20. SYNC signal source

    SYNC_SEL[2..0] Source

    0 0 0 EL_POS[7]

    0 0 1 EL_POS[6]

    0 1 0 EL_POS[5]

    0 1 1 EL_POS[4]

    1 0 0 EL_POS[3]

    1 0 1 EL_POS[2]

    1 1 0 EL_POS[1]

    1 1 1 EL_POS[0]

    Table 21. ALARM_EN register

    ALARM_EN bit Alarm condition

    0 (LSB) Overcurrent

    1 Thermal shutdown

    2 Thermal warning

    3 Under-voltage

    4 Stall detection (Bridge A)

    5 Stall detection (Bridge B)

    6 Switch turn-on event

    7 (MSB) Wrong or not performable command

    Table 22. CONFIG register

    Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8

    F_PWM_INT F_PWM_DEC POW_SR

    Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0

    OC_SD RESERVED EN_VSCOMP SW_MODE EXT_CLK OSC_SEL

  • 7/28/2019 dSPIN

    48/67

    Programming manual L6470

    48/67 Doc ID 16737 Rev 3

    The OSC_SEL and EXT_CLK bits set the system clock source:

    The SW_MODE bit sets the external switch to act as HardStop interrupt or not:

    Table 23. Oscillator management

    EXT_CLK OSC_SEL[2..0] Clock source OSCIN OSCOUT

    0 0 0 0

    Internal Oscillator: 16MHz Unused Unused0 0 0 1

    0 0 1 0

    0 0 1 1

    1 0 0 0 Internal Oscillator: 16MHz UnusedSupplies a 2MHz

    clock

    1 0 0 1 Internal Oscillator: 16MHz UnusedSupplies a 4MHz

    clock

    1 0 1 0 Internal oscillator: 16MHz UnusedSupplies a 8MHz

    clock

    1 0 1 1 Internal oscillator: 16MHz UnusedSupplies a 16MHz

    clock

    0 1 0 0External crystal or

    resonator: 8MHz

    Crystal/reson

    ator driving

    Crystal/resonator

    driving

    0 1 0 1External crystal or

    resonator: 16MHz

    Crystal/reson

    ator driving

    Crystal/resonator

    driving

    0 1 1 0External crystal or

    resonator: 24MHz

    Crystal/reson

    ator driving

    Crystal/resonator

    driving

    0 1 1 1External crystal or

    resonator: 32MHz

    Crystal/reson

    ator driving

    Crystal/resonator

    driving

    1 1 0 0

    Ext clock source: 8MHz

    (Crystal/resonator driver

    disabled)

    Clock sourceSupplies inverted

    OSCIN signal

    1 1 0 1

    Ext clock source: 16MHz

    (Crystal/resonator driver

    disabled)

    Clock sourceSupplies inverted

    OSCIN signal

    1 1 1 0

    Ext clock source: 24MHz

    (Crystal/resonator driver

    disabled)

    Clock sourceSupplies inverted

    OSCIN signal

    1 1 1 1

    Ext clock source: 32MHz

    (Crystal/resonator driver

    disabled)

    Clock sourceSupplies inverted

    OSCIN signal

    Table 24. External switch hard stop interrupt mode

    SW_MODE Switch mode

    0 HardStop interrupt

    1 User disposal

  • 7/28/2019 dSPIN

    49/67

    L6470 Programming manual

    Doc ID 16737 Rev 3 49/67

    The OC_SD bit sets if an overcurrent event causes or not the bridges to turn-off; the OCDflag in status register is forced low anyway:

    The POW_SR bits set the slew rate value of power bridge output:

    The EN_VSCOMP bit sets if the motor supply voltage compensation is enabled or not.

    The F_PWM_INT bits set the integer division factor of PWM frequency generation.

    Table 25. Overcurrent event

    OC_SD Overcurrent event

    1 Bridges shut down

    0 Bridges do not shut down

    Table 26. Programmable power bridge output slew-rate values

    POW_SR

    [1..0]

    Output Slew-rate (1)

    [V/s]

    1. See SRout_r and SRout_f parameters in the electrical characteristics Table 5for details.

    0 0 180

    0 1 180

    1 0 290

    1 1 530

    Table 27. Motor supply voltage compensation enable

    EN_VSCOMP Motor supply voltage compensation

    0 Disabled

    1 Enabled

    Table 28. PWM frequency: integer division factor

    F_PWM_INT

    [2..0]Integer division factor

    0 0 0 1

    0 0 1 2

    0 1 0 3

    0 1 1 4

    1 0 0 5

    1 0 1 6

    1 1 0 7

    1 1 1

  • 7/28/2019 dSPIN

    50/67

    Programming manual L6470

    50/67 Doc ID 16737 Rev 3

    The F_PWM_DEC bits set the multiplication factor of PWM frequency generation.

    In the following tables all available PWM frequencies are listed according to oscillatorfrequency, F_PWM_INT and F_PWM_DEC values (CONFIG register OSC_SEL parameterhas to be correctly programmed).

    Table 29. PWM frequency: multiplication factor

    F_PWM_DEC [2..0] Multiplication factor

    0 0 0 0.625

    0 0 1 0.75

    0 1 0 0.875

    0 1 1 1

    1 0 0 1.25

    1 0 1 1.5

    1 1 0 1.75

    1 1 1 2

    Table 30. Available PWM frequencies [kHz]: 8 MHz oscillator frequency

    F_PWM_DEC

    F_PWM_

    INT000 001 010 011 100 101 110 111

    000 9.8 11.7 13.7 15.6 19.5 23.4 27.3 31.3

    001 4.9 5.9 6.8 7.8 9.8 11.7 13.7 15.6

    010 3.3 3.9 4.6