dm00114736

UM1756
User manual
EVAL6480H-DISC and EVAL6482H-DISC: high power stepper
motor driver based on the L6480H/L6482H and STM32™
Introduction
The EVAL6480H-DISC and EVAL6482H-DISC are low cost development tools based on the
L648xH controllers and STM32™.
The EVAL6480H-DISC/EVAL6482H-DISC is an ideal starter-kit for both beginners and
experienced users, it is autonomous and can be used with a software interface, or it can be
used with custom firmware thanks to the embedded microcontroller with the 128 kB Flash
memory and 64 kB RAM.
Through the available GUI the user can easily set the full configuration of application
parameters.
They are “Plug and Play” tools suitable for high power solutions thanks to the wide operating
voltage range from 10.5 V to 85 V and the current capability up to 8 Ar.m.s.
Figure 1. EVAL6482H-DISC board photo
April 2015
DocID026263 Rev 2
1/49
www.st.com
49
Contents
UM1756
Contents
1
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2
Board specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3
4
2.1
EVAL6480H-DISC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2
EVAL6482H-DISC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
General description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.1
Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2
L6480 and L6482 stepper motor controller . . . . . . . . . . . . . . . . . . . . . . . 19
3.3
Charge pump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Device configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.1
Gate drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2
Voltage mode driving (EVAL6480H-DISC) . . . . . . . . . . . . . . . . . . . . . . . . 22
Advanced current control (EVAL6482H-DISC) . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5
4.3
Overcurrent protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4
Stall detection (EVAL6480H-DISC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Programming section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1
STM32F105RB microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2
Firmware loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3
2/49
5.2.1
DfuSe installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.2
Generate a DFU file from a HEX file . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.3
Board settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5.2.4
DFU loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Using the EVAL6480H-DISC or EVAL6482H-DISC with the firmware
for the GUI (FWGUI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.3.1
Sanity check of the board with the firmware for the GUI (FWGUI) . . . . 34
5.3.2
Parameters exportation from the GUI to the FW library . . . . . . . . . . . . . 40
DocID026263 Rev 2
UM1756
Contents
5.4
Using the EVAL6480H-DISC or EVAL6482H-DISC with the firmware
library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4.1
Package contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4.2
L648x FW library description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4.3
Demo sequence description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.4.4
Create a project using the FW library package . . . . . . . . . . . . . . . . . . . 46
6
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
DocID026263 Rev 2
3/49
49
List of tables
UM1756
List of tables
Table 1.
Table 2.
Table 3.
Table 4.
Table 5.
Table 6.
Table 7.
Table 8.
4/49
EVAL6480H-DISC electrical specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
EVAL6480H-DISC bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
EVAL6482H-DISC electrical specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
EVAL6482H-DISC bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
L6480 and L6482 recommended operating conditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Settings gate driving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Voltage mode driving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
DocID026263 Rev 2
UM1756
List of figures
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6.
Figure 7.
Figure 8.
Figure 9.
Figure 10.
Figure 11.
Figure 12.
Figure 13.
Figure 14.
Figure 15.
Figure 16.
Figure 17.
Figure 18.
Figure 19.
Figure 20.
Figure 21.
Figure 22.
Figure 23.
Figure 24.
Figure 25.
Figure 26.
Figure 27.
Figure 28.
Figure 29.
Figure 30.
Figure 31.
Figure 32.
Figure 33.
Figure 34.
Figure 35.
Figure 36.
Figure 37.
EVAL6482H-DISC board photo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
EVAL6480H-DISC board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
EVAL6480H-DISC schematic (microcontroller supply part) . . . . . . . . . . . . . . . . . . . . . . . . . 8
EVAL6480H-DISC schematic (microcontroller part) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
EVAL6480H-DISC schematic (motion driver part) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
EVAL6480H-DISC layout top layer and bottom layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
EVAL6482H-DISC board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
EVAL6482H-DISC schematic (microcontroller supply part) . . . . . . . . . . . . . . . . . . . . . . . . 13
EVAL6482H-DISC schematic (microcontroller part) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
EVAL6482H-DISC schematic (motor driver part) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
EVAL6482H-DISC layout top layer and bottom layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Power supply section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Charge pump section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
B.E.M.F compensation - SPIN family evaluation software . . . . . . . . . . . . . . . . . . . . . . . . . 22
Overcurrent protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Example of stall detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
STM32F105xx and STM32F107xx block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
DFU file Manager (action). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
DFU file Manager (Generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Board settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
DFU loading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
DFU file (open) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
DFU file (upgrade) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
DFU file (confirmation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
DFU file (download OK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Starting board (boot mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Starting board (motor power supply) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Starting board (USB connection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Starting board (error case) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Starting board (board OK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Starting board (display board ID) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Starting board (action left key) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Starting board (action right key) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Starting board (action reset key). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Parameters exportation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Parameters exportation (save file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
DocID026263 Rev 2
5/49
49
Main features
1
UM1756
Main features
The characteristics of the EVAL6480H-DISC and EVAL6482H-DISC boards are following:

DC voltage range from 10.5 V to 85 V

Maximum load phase current at 8 A r.m.s.

Footprint for external resonator or crystal

Control interface through trimmer - user keys and limit switch input

Control through LED indicators

Interface control by USB and debug outputs

Compatible with SPIN family evaluation tool

Autonomous board thanks to the embedded firmware

Up to 1/128 microstepping (EVAL6480H-DISC)

Up to 1/16 microstepping (EVAL6482H-DISC)

Optimized layout on 2-layer board - low cost and high thermal performance
The possibility with these boards is double:
6/49

To adapt the settings with your specific application (motor - voltage) and exploring the
device features by using the dedicated PC application.

To use the board (with user parameters) directly on site - without a connected PC
writing custom firmware.
DocID026263 Rev 2
UM1756
Board specifications
2
Board specifications
2.1
EVAL6480H-DISC
Figure 2. EVAL6480H-DISC board
Table 1. EVAL6480H-DISC electrical specifications
Name
Value
Supply voltage (VS)
10.5 to 85 V
Maximum output current (each phase)
8 A r.m.s
Logic supply voltage (VREG)
3 V (L6480 regulator supply)
Logic interface voltage (VDD)
3.3 V (USB supply)
Low level logic inputs voltage
0V
High level logic input voltage
VDD
Stepping
Up to 1/128 microstepping
Operating temperature
0 to 85 °C
DocID026263 Rev 2
7/49
49
Board specifications
UM1756
Figure 3. EVAL6480H-DISC schematic (microcontroller supply part)
9''
9''
-
6+(//
6+(//
6+(//
6+(//
86%B9&&
86%'0
86%'3
,'
86%B*1'
9
86%'0
86%'3
1&
9287
9287
1&
.(<6721(
&
8)
/''7 5
8
5
0
*1'
9287
9287
9,1
&
1)
73
8
&
1)
,2
,2
*1'
9%86
,2
86%'0
9''
,2
86%'3
&
1)
86%B,7
5
86%/&3
.
$0
Figure 4. EVAL6480H-DISC schematic (microcontroller part)
9''
9''
9''
5
.
5
.
5
5
5
5
5
5
.
.
.
.
.
%227
-
5
-
23(1
&
1)
9''
-7$*B7',
-7$*B7&.
1)
&
1)
%227
&
8)
-7$*B17657
-7$*B7'2
5(6(7
&
5
5
5
.
.
.
5(6(7
/('B63$5(
/('B(5525
/('B%86<
/('B5($'<
5
5
5
5
5
<(//2:
'
5
'
'
5('
25$1*(
6:B02725
%87721B$
%87721B%
*5((1
9''
&
&
8)
1)
9''
*1'
9''
9''
9''
*1'
3$B706
86%'3
86%'0
3$B8$57B5;
3$B8$57B7;
&
5
1) .
5
.
73
73
73
3$B8$57B&.
86%B,7
%2$5'B,'B
%2$5'B,'B
%2$5'B,'B
%2$5'B,'B
5
5
.
%86< 5($'<
67&.
63$5( (5525
3$
966B
9''
3$
3$
3$
3$
3&
3&
3%
3%
3%
3%
3%
966B
9''B
'
*1'
5
9''B
966B
3$
3$
3$
3$
3$
3$
3&
3&
3&
3&
3%
3%
3%
3%
9''
5
.
5
13
13
%227
)/$*
%86<
3)
5
9%$7
3&7$03(557&
3&26&B,1
3&26&B287
8
3'26&B,1
3'26&B287
1567
670)5%7
3&
3&
3&
3&
966$
9''$
3$:.83
3$
3$
9''
&
9''
5
0
9''B
966B
3%
3%
%227
3%
3%
3%
3%
3%
3'
3&
3&
3&
3$
3$
<
0+]
63,B166
63,B1&.
63,B0,62
63,B026,
6:
67%<B5(6(7
3)
&
9''
&
1)
5
.
5
.
5
.
5
.
&
1)
&
1)
&
&
6
1)
6
1)
6:,7&+02725
5(6(7
5
-
23(1
6
1)
&
5
/()7
5,*+7
$0
8/49
DocID026263 Rev 2
UM1756
Board specifications
Figure 5. EVAL6480H-DISC schematic (motion driver part)
96
-
96
73
1)
' %$5
965(*
73
9&&
73
5 13
73
&
5 5
*1'
&
8)
9
%$7=),/0
'
&
&
&
1)
&
1)
1)
1)
'
9''
5
73
67%<B5(6(7 6:
67&.
26&287
5
.
5
63,B166
63,B1&.
63,B026,
63,B0,62
%86<
)/$*
.
*B+6B$
287B$
*B/6B$
*B+6B$
287B$
*B/6B$
26&B,1
26&B287
5
13
96
1& 9%227
$'&B,1
26&,1
1)
8
/+
95(*
9''
$'&,1
$'&,1
&3
9&&B5(*
&
96
9&&
5
96B5(*
%$7=),/0
67%<B5(6
6:
67&.
*B+6B%
287B%
*B/6B%
&6
&.
6',
6'2
*B+6B%
287B%
*B/6B%
%86<B6<1&
)/$*
*B+6B$
287$
*B/6B$
*B+6B$
287$
*B/6B$
*B+6B%
287%
*B/6B%
*B+6B%
287%
*B/6B%
'
5
. &
3*1' '*1' $*1'
9
3)
3*1'
3*1'
*1'
96
96
4
1)
& 1)
4
4
*B+6B%
*B+6B%
%
-
67/1)
67/1)
*B+6B$
67/1)
%
67/1)
-
$
287%
287%
4
*B+6B$
&
$
287$
287$
4
4
67/1)
67/1)
*B/6B%
*B/6B%
4
4
67/1)
67/1)
*B/6B$
*B/6B$
$0
DocID026263 Rev 2
9/49
49
Board specifications
UM1756
Figure 6. EVAL6480H-DISC layout top layer and bottom layer
$0
$0
Table 2. EVAL6480H-DISC bill of material
Item
Qty.
Reference
Value
Package
C1, C12
2
CAP. CER. 10 µF 10 V X7R 0805
10 µF
0805
C2, C6, C13, C14, C17,
C23 - C25, C27 - C29
11
CAP. CER. 100 nF 50 V X7R 0603
100 nF
0603
C3
1
CAP. ELEC. 220 µF 100 V
220 µF
CAPES-R18H17
C4, C9
2
CAP. CER. 470 nF 25 V X7R 0603
470 nF
0603
C5
1
CAP. CER. 4.7 nF 50 V X7R 0603
4.7 nF
0603
C7
1
CAP. CER. 47 nF 100 V X7R/X7S
0805
47 nF
0805
C8,
1
CAP. CER. 220 nF 35 V X7R 0603
220 nF
0603
C10, C19, C20
3
CAP. CER. 220 nF 100 V X7R 0805
220 nF
0805
C11, C22, C26
3
CAP. CER. 10 nF 50 V X7R 0603
10 nF
0603
C15, C16
2
CAP. CER. 20 pF 50 V COG 0603
20 pF
0603
C18
1
CAP. CER. 100 pF 50 V COG 0603
100 pF
0603
C21
1
CAP. CER. 1 µF 10 V X7R 0805
1 µF
0805
D1
1
Double diode - high speed
switching diode
BAR43
SOT23
D2, D3
2
Diode Schottky 150 mA
BAT46ZFILM
SOD 123
D4
1
Zener regulator
3.6 V
SOD 523
D5
1
LED yellow - 0805 -6mcd - 588nm
Yellow
0805
D6
1
LED red - 0805 -2mcd - 621nm
Red
0805
D7
1
LED orange - 0805 -2mcd - 602nm
Orange
0805
D8
1
LED green - 0805 -6mcd - 569nm
Green
0805
FIX1 - FIX4
4
Hole
10/49
DocID026263 Rev 2
Diam. 3 mn
UM1756
Board specifications
Table 2. EVAL6480H-DISC bill of material (continued)
Item
Qty.
Reference
Value
Package
J1 - J3
3
Screw connector 2 poles MKDSN
1.5/2-5.08
MKDSN1.5/2-5.08
MKDSN1.5/2-5.08
J4
1
JTAG CON. - STRAIGHT 10 x 2-180 M
CON-STRAIGHT10 x 2 - 180 M
CON-FLAT 10 x 2 - 180 M
J5, J6
2
JUMP254P-M-2
OPEN
2.54 mn
J7
1
USB_B_MINI_AMP_1734035-1
CN-USB
CMS mini USB
MIRE1-MIRE3
3
OPTICAL_TARGET
OPTICAL_TARGET
Diam 1mn
Q1 - Q8
8
N-channel 100 V, 27 m, 8 A
STripFET™ VII DeepGATE™
Power MOSFET in PowerFLAT™
5 x 6 package
STL30N10F7
PowerFLAT 5 x 6
R1, R16
2
Res. 1 M 1/10 W 5% 0603 SMD
1 M
0603
R2, R27, R28
3
Res. NP 0603
NP
0603
R3, R35
2
Res. 0  5% 1/10 W 0603
0
0603
R4
1
Res. 1.5 K 1/10 W 5% 0603 SMD
1.5 K
0603
R5, R7, R11, R14, R15,
R17, R18, R29, R31,
R32
10
Res. 10 K 5% 1/10 W 0603 SMD
10 K
0603
R6, R8 - R10
4
Res. 4.7 K 5% 1/10 W 0603 SMD
4.7 K
0603
R12, R33
2
Res. 100  5% 1/10 W
100 
0603
R13
1
Res. NP 0805
NP
0805
R19
1
Res. 11.5 K 1% 1/10 W 0603
11.5 K
0603
R20
1
Trimmer 100 K
100 x 50 x 110 64 W
100 K
Trimm. 100 x 50 x 110
R21 - R24
4
Res. 470  5% 1/10 W 0603
470 
0603
R25, R26, R34
3
Res. 1 K 5% 1/10 W 0603 SMD
1 K
0603
R30
1
Res. 100 K 5% 1/10 W 0603 SMD
100 K
0603
R36
1
Res. 2.2 K 1/10 W 5% 0603 SMD
2.2 K
0603
S1 - S3
3
Switch button SMD
EVQQ2D03W
CMS 6.5 x 6 x 3.1
TP1, TP3 - TP9
8
Test point red
KEYSTONE-5000
TH
TP2
1
Test point black
KEYSTONE-5001
TH
U1
1
IC REG 1300 MA LN 3.3 V
LD1117D33TR
SO8
U2
1
IC, MCU, RISC, 72 MHz, 3.6 V,
32-bit, 64-pin, LQFP
STM32F105RBT6
LQFP64 10 x 10
U3
1
USBLC6-2P6 - TVS USB2
USBLC6-2P6
SOT 666
U4
1
L6480 motor controller
L6480H
HTSSOP38
Y1
1
XTAL 8 MHz - 30 PPM - 20 pF
8 MHz
HC49/US-SM
DocID026263 Rev 2
11/49
49
Board specifications
2.2
UM1756
EVAL6482H-DISC
Figure 7. EVAL6482H-DISC board
Table 3. EVAL6482H-DISC electrical specifications
12/49
Name
Value
Supply voltage (VS)
10.5 to 85 V
Maximum output current (each phase)
8 A r.m.s
Logic supply voltage (VREG)
3 V (L6482 regulator supply)
Logic interface voltage (VDD)
3.3 V (USB supply)
Low level logic inputs voltage
0V
High level logic input voltage
VDD
Stepping
Up to 1/16 microstepping
Operating temperature
0 to 85 °C
DocID026263 Rev 2
UM1756
Board specifications
Figure 8. EVAL6482H-DISC schematic (microcontroller supply part)
9''
9''
-
6+(//
6+(//
6+(//
6+(//
86%B9&&
86%'0
86%'3
,'
86%B*1'
9
86%'0
86%'3
1&
9287
9287
1&
.(<6721(
&
8)
8
,2
5
0
*1'
9287
9287
9,1
/''7 5
&
1)
73
8
&
1)
,2
*1'
9%86
,2
,2
86%'0
9''
86%'3
&
1)
86%B,7
5
86%/&3
.
$0
Figure 9. EVAL6482H-DISC schematic (microcontroller part)
9''
9''
9''
5
.
5
.
5
5
5
5
5
5
.
.
.
.
.
%227
-
5
-
23(1
&
1)
9''
1)
-7$*B7',
-7$*B7&.
&
1)
%227
&
8)
-7$*B17657
-7$*B7'2
5(6(7
&
5
5
5
.
.
.
5(6(7
/('B63$5(
/('B(5525
/('B%86<
/('B5($'<
5
5
5
5
5
<(//2:
'
5
'
'
5('
25$1*(
6:B02725
%87721B$
%87721B%
*5((1
9''
&
&
8)
1)
%86< 5($'<
67&.
63$5( (5525
3$
966B
9''
3$
3$
3$
3$
3&
3&
3%
3%
3%
3%
3%
966B
9''B
'
9''
*1'
9''
9''
9''
*1'
5
9''B
966B
3$
3$
3$
3$
3$
3$
3&
3&
3&
3&
3%
3%
3%
3%
&
5
1) .
*1'
3$B706
86%'3
86%'0
3$B8$57B5;
3$B8$57B7;
9''
5
.
73
73
73
3$B8$57B&.
86%B,7
%2$5'B,'B
%2$5'B,'B
%2$5'B,'B
%2$5'B,'B
5
5
13
13
5
5
.
13
%227
)/$*
%86<
3)
5
9%$7
3&7$03(557&
3&26&B,1
3&26&B287
3'26&B,1
8
3'26&B287
1567
670)5%7
3&
3&
3&
3&
966$
9''$
3$:.83
3$
3$
9''
&
9''
5
0
9''B
966B
3%
3%
%227
3%
3%
3%
3%
3%
3'
3&
3&
3&
3$
3$
<
0+]
63,B166
63,B1&.
63,B0,62
63,B026,
6:
67%<B5(6(7
3)
&
9''
&
5
.
1)
5
.
5
.
5
.
&
1)
&
&
&
1)
6
1)
6
1)
5(6(7
6:,7&+02725
5
-
23(1
6
1)
&
5
/()7
5,*+7
DocID026263 Rev 2
$0
13/49
49
Board specifications
UM1756
Figure 10. EVAL6482H-DISC schematic (motor driver part)
96
-
96
73
73
1)
' %$5
965(*
73
9&&
5 13
73
5 5
&
8)
9
*1'
&
%$7=),/0
'
&
&
&
1)
&
1)
1)
1)
'
9''
5
73
67%<B5(6(7 6:
67&.
26&287
5
.
5
63,B166
63,B1&.
63,B026,
63,B0,62
%86<
)/$*
.
*B+6B$
287$
*B/6B$
/+
*B+6B$
287B$
*B/6B$
26&B,1
26&B287
5
13
96
*B+6B$
287B$
*B/6B$
$'&B,1
26&,1
1)
95(*
9''
$'&,1
$'&,1
8
9&&B5(*
&
1& 9%227
9&&
5
&3
96B5(*
%$7=),/0
96
67%<B5(6
6:
67&.
*B+6B%
287B%
*B/6B%
&6
&.
6',
6'2
*B+6B%
287B%
*B/6B%
%86<B6<1&
)/$*
*B+6B$
287$
*B/6B$
*B+6B%
287%
*B/6B%
*B+6B%
287%
*B/6B%
'
5
. &
3*1' '*1' $*1'
9
3)
6(16($ 6(16(% *1'
6(16(%
6(16($
96
96
&
1)
& 1)
4
4
4
*B+6B%
*B+6B%
-
%
*B+6B$
*B+6B$
67/1)
67/1)
%
67/1)
$
287%
287%
67/1)
-
4
$
287$
287$
4
4
4
4
*B/6B%
*B/6B%
67/1)
67/1)
*B/6B$
*B/6B$
67/1)
67/1)
6(16(%
6(16($
5
5
5
5
$0
14/49
DocID026263 Rev 2
UM1756
Board specifications
Figure 11. EVAL6482H-DISC layout top layer and bottom layer
$0
DocID026263 Rev 2
$0
15/49
49
Board specifications
UM1756
Table 4. EVAL6482H-DISC bill of material
Item
Qty.
Reference
Value
Package
C1, C12
2
CAP. CER. 10 µF 10 V X7R 0805
10 µF
0805
C2, C6, C13, C14,
C17, C23-C25, C27 C29
11
CAP. CER. 100 nF 50 V X7R 0603
100 nF
0603
C3
1
CAP. ELEC. 220 µF 100 V
220 µF
CAPES-R18H17
C4, C9
2
CAP. CER. 470 nF 25 V X7R 0603
470 nF
0603
C5,
1
CAP. CER. 4.7 nF 50 V X7R 0603
4.7 nF
0603
C7,
1
CAP. CER. 47 nF 100 V X7R/X7S
0805
47 nF
0805
C8,
1
CAP. CER. 220 nF 35 V X7R 0603
220 nF
0603
C10, C19, C20
3
CAP. CER. 220 nF 100 V X7R 0805
220 nF
0805
C11, C22, C26
3
CAP. CER. 10 nF 50 V X7R 0603
10 nF
0603
C15, C16
2
CAP. CER. 20 pF 50 V COG 0603
20 pF
0603
C18
1
CAP. CER. 100 pF 50 V COG 0603
100 pF
0603
C21
1
CAP. CER. 1 µF 10 V X7R 0805
1 µF
0805
D1
1
Double diode - high speed switching
diode
BAR43
SOT23
D2, D3
2
Diode Schottky 150 mA
BAT46ZFILM
SOD 123
D4
1
Zener regulator
3.6 V
SOD 523
D5
1
LED yellow - 0805 -6mcd - 588nm
Yellow
0805
D6
1
LED red - 0805 -2mcd - 621nm
Red
0805
D7
1
LED orange - 0805 -2mcd - 602nm
Orange
0805
D8
1
LED green - 0805 -6mcd - 569nm
Green
0805
FIX1 - FIX4
4
Hole
J1 - J3
3
Screw connector 2 poles MKDSN
1.5/2-5.08
MKDSN1.5/2-5.08
MKDSN1.5/2-5.08
J4
1
JTAG CON. - STRAIGHT 10 x 2 -180 M
CON. - STRAIGHT 10 x 2 - 180 M
CON. - FLAT 10 x 2 - 180 M
J5, J6
2
JUMP254P-M-2
OPEN
2.54 mn
J7
1
USB_B_MINI_AMP_1734035-1
CN-USB
CMS mini USB
MIRE1-MIRE3
3
OPTICAL_TARGET
OPTICAL_TARGET
Diam. 1 mn
Item
Qua
ntity
Reference
Value
Package
Q1 - Q8
8
N-channel 100 V, 27 m, 8 A
STripFET™ VII DeepGATE™
Power MOSFET in PowerFLAT™
5 x 6 package
STL30N10F7
PowerFLAT 5 x 6
R1, R16
2
RES. 1 M 1/10 W 5% 0603 SMD
1 M
0603
16/49
DocID026263 Rev 2
Diam 3mn
UM1756
Board specifications
Table 4. EVAL6482H-DISC bill of material (continued)
Item
Qty.
Reference
Value
Package
R2, R25, R26, R28
4
RES. NP 0603
NP
0603
R3, R35
2
RES. 0  5% 1/10 W 0603
0
0603
R4
1
RES. 1.5 K 1/10 W 5% 0603 SMD
1.5 K
0603
R5, R7, R11, R14,
R15, R17, R18, R29,
R31, R32
10
RES. 10 K 5% 1/10 W 0603 SMD
10 K
0603
R6, R8 - R10
4
RES. 4.7 K 5% 1/10 W 0603 SMD
4.7 K
0603
R12, R33
2
RES. 100  5% 1/10 W
100 
0603
R13
1
RES. NP 0805
NP
0805
R19
1
RES. 11.5 K 1% 1/10 W 0603
11.5 K
0603
R20
1
Trimmer 100 K 100 x 50 x 110 64 W
100 K
Trimm. 100 x 50 x 110
R21 - R24
4
RES. 470  5% 1/10 W 0603
470 
0603
R27, R34
2
RES. 1 K 5% 1/10 W 0603 SMD
1 K
0603
R30
1
RES. 100 K 5% 1/10 W 0603 SMD
100 K
0603
R36
1
RES. 2.2 K 1/10 W 5% 0603 SMD
2.2 K
0603
R37, R38
2
RES. 0.02  5% 3 W 2512
0.02 
2512
S1 - S3
3
Switch button SMD
EVQQ2D03W
CMS 6.5 x 6 x 3.1
TP1, TP3 - TP9
8
Test point red
KEYSTONE-5000
TH
TP2
1
Test point black
KEYSTONE-5001
TH
U1
1
IC REG 1300 MA LN 3.3 V
LD1117D33TR
SO8
U2
1
IC, MCU, RISC, 72 MHz, 3.6 V,
32-bit, 64-pin, LQFP
STM32F105RBT6
LQFP64 10 x 10
U3
1
USBLC6-2P6 - TVS USB2
USBLC6-2P6
SOT 666
U4
1
L6482 motor controller
L6482H
HTSSOP38
Y1
1
XTAL 8 MHz-30 PPM-20 pF
8 MHz
HC49/US-SM
DocID026263 Rev 2
17/49
49
General description
UM1756
3
General description
3.1
Power supply
The EVAL6480H-DISC and EVAL6482H-DISC boards are designed to be powered via:

Connector J1: power of the power stage and motor controller.

USB connector J5: power of the microcontroller and the logic control.
The USB cable supplies the digital part through a dedicated LDO (U1) providing 3.3 V.
The VS supply (J1) must be set according to the voltage required by the user motor.
Note:
Both the supply sources (USB connector and J1 connector) must be present to make
the board operative.
Figure 12. Power supply section
18/49
DocID026263 Rev 2
UM1756
3.2
General description
L6480 and L6482 stepper motor controller
Features

Operating voltage: 7.5 - 85 V

Dual full-bridge gate driver for N-channel MOSFETs

Fully programmable gate driving

Programmable speed profile

Integrated voltage regulators

SPI interface

Low quiescent standby currents

Programmable non-dissipative overcurrent

Overtemperature protection
Only for L6480H

Up to 1/128 microstepping

Sensorless stall detection
Only for L6482H

Up to 1/16 microstepping

Advanced current control with auto-adaptive decay mode.
Figure 13. Block diagram
L6480H
L6482H
DocID026263 Rev 2
19/49
49
General description
UM1756
Table 5. L6480 and L6482 recommended operating conditions
3.3
Symbol
Parameter
VDD
Test condition
Value
Unit
Logic interface supply voltage
3.3
V
VREG
Logic supply voltage
3.3
V
VS
Motor supply voltage
Mini: VSREG
Maxi: 85
V
VSREG
Internal VCC voltage regulator
Mini: VCC +3
Maxi: VS
V
VCC
Gate driver supply voltage
VCC voltage imposed by
external source (VSREG = VCC)
Mini: 7.5
Maxi: 15
V
VCCREG
Internal VREG voltage regulator
supply voltage
VREG voltage internally
generated
Mini: 6.3
Maxi: VCC
V
VADC
Integrated ADC input voltage
range (ADCIN pin)
Mini 0
Maxi: VREG
V
Charge pump
The L6480H and L6482H devices use an internal charge pump for driving correctly the
external high-side MOSFETs. The charge pump is obtained through an oscillator and few
external components.
Figure 14. Charge pump section
20/49
DocID026263 Rev 2
UM1756
4
Device configuration
Device configuration
This section offers an overview of the basic configuration steps which are required to make
the demonstration board operative.
Warning:
4.1
Important - the device configuration is mandatory. The
default configuration is not operative.
Before changing the device configuration verify that the
device is in high impedance status (power stage is disabled).
Gate drivers
The system allows controlling a wide range of motors - thanks to a large driver's settings
choice.
For details please refer to the AN4354: “L648x devices: gate drivers setup” - application
note available on www.st.com.
The board includes 2 STL30N10F7 - half bridge N-channel MOSFETs. These MOSFETs
presents low RDSon adding high switching performance. Few several settings could by
applied depending on choice of supply voltage motors, EMI tolerance vs. speed of the
communication.
We propose two configurations according to the user choice:

Performance: low power dissipation vs. fast commutation - high electromagnetic
interference.

Recommended: medium power dissipation, commutation and electromagnetic
interference.
Table 6. Settings gate driving
Parameter
Performance solution
(value)
Recommended solution
(value)
Unit
Gate current
96
32
mA
VCC value
7.5
7.5
V
UVLO thresholds
7
7
V
Turn OFF boost time
Disabled
Disabled
ns
Controlled current time
250
750
ns
Blanking time
250
250
ns
Deadtime
125
125
ns
DocID026263 Rev 2
21/49
49
Device configuration
4.2
UM1756
Voltage mode driving (EVAL6480H-DISC)
The configuration parameters of the voltage mode driving can be obtained through the
BEMF compensation tool embedded into the SPIN family software.
A wrong setup of these parameters could cause several issues, in particular:

The phase current decreases with the speed and the motor is stall.

The wrong voltage is applied to the motor and the system is very noisy.

The phase current reaches the overcurrent limit.
The BEMF compensation form uses the application parameters as inputs in order to
evaluate the proper device setup.
The required inputs are:

Supply voltage.

Target phase current (r.m.s. value) at different motion conditions (acceleration,
deceleration, constant speed and holding).

Target operating speed (maximum speed).

Motor characteristics.
The motor characteristics are: the electrical constant (Ke), phase inductance and
resistance. The inductance and the resistance of the phase are given in the motor
datasheet. The Ke is rarely given in the specification and must be measured.
In the help section of the SPIN family software, a step by step procedure is explained. The
same procedure can also be found in the application note AN4144: “Voltage mode control
operation and parameter optimization” on www.st.com.
Click on the “evaluate” button to get the suggested setup for the voltage mode driving. Then
click on the “write” button to copy the data into the registers of the device.
Figure 15. B.E.M.F compensation - SPIN family evaluation software
22/49
DocID026263 Rev 2
UM1756
Device configuration
Advanced current control (EVAL6482H-DISC)
The following configuration gives good results with most of motors:
Table 7. Voltage mode driving
Parameter
Value
Unit
Minimum ON time
4
s
Minimum OFF time
21
s
Maximum fast decay (TOFF_FAST)
10
s
Maximum fast decay at step change (FAST_STEP)
16
s
Target switching time
48
s
The impacts of the timing parameters are explained in the application note AN4158: “Peak
current control with automatic decay adjustment and predictive current control: basics and
setup”.
4.3
Overcurrent protection
The overcurrent protection monitors the drain-source voltage drop of all the external Power
MOSFETs and disables the power stage when the programmed threshold is reached.
Warning:
The overcurrent protection can be disabled setting the flag
“Over-current- shutdown”.
However it is not recommended to disable this protection.
The stall detection threshold should be just above the operating peak current of the
application. During the preliminary stages of evaluation, it can be set to the maximum value.
Figure 16. Overcurrent protection
DocID026263 Rev 2
23/49
49
Device configuration
4.4
UM1756
Stall detection (EVAL6480H-DISC)
The L6480 device also includes a sensorless stall detection system. This feature allows the
device to detect the stall condition of the motor measuring the increase of the phase current
caused by the sudden cancellation of the back electromotive force.
The stall detection threshold must be set above the nominal peak current.
Figure 17. Example of stall detection
24/49
DocID026263 Rev 2
UM1756
Programming section
5
Programming section
5.1
STM32F105RB microcontroller
The STM32F105xx device incorporates the high-performance ARM® Cortex™-M3 32-bit
RISC core operating at a 72 MHz frequency, high-speed embedded memories (Flash
memory up to 256 Kbytes and SRAM 64 Kbytes), and an extensive range of enhanced I/O
and peripherals connected to two APB buses. All devices offer two 12-bit ADCs, four
general-purpose 16-bit timers plus a PWM timer, as well as standard and advanced
communication interfaces: up to two I2Cs, three SPIs, two I2Ss, five USARTs, an USB OTG
FS and two CANs.
The STM32F105xx operates in the -40 to +105 °C temperature range, from a 2.0 to 3.6 V
power supply. A comprehensive set of power-saving mode allows the design of low-power
applications.
The STM32F105xx offers devices in three different package types: from 64 pins to 100 pins.
Depending on the device chosen, different sets of peripherals are included.
These features make the STM32F105xx and STM32F107xx connectivity line
microcontroller family suitable for a wide range of applications such as motor drives and
application control, medical and handheld equipment, industrial applications, PLCs,
inverters, printers, and scanners, alarm systems, video intercom, HVAC and home audio
equipment.
Please refer to the STM32F105xx datasheet for an overview of the complete range of
peripherals proposed in this family.
Please refer to the STM32F105xx reference manual RM0008 to get more information on the
microcontroller operation.
The STM32F105RBT6 has a 64-pin LQFP package with 128 KBytes Flash memory and
operates in the -40 to +85 °C temperature range.
DocID026263 Rev 2
25/49
49
Programming section
UM1756
Figure 18 shows the general block diagram of the STM32F105xx and STM32F107xx family.
Figure 18. STM32F105xx and STM32F107xx block diagram
(70
7UDFH7ULJ
,EXV
&RUWH[0&38
6\VWHP
19,&
*3'0$
#9''
;7$/RVF
0+]
1567
9''$
966$
26&B,1
26&B287
&B2
,:'* 3&/.
3&/.
+&/.
)&/.
3//
6WDQGE\
LQWHUIDFH
9%$7 9WR9
#9%$7
;7$/N+]
%DF NXS
UHJLVWHU
57&
$:8
'35$0.% '35$0.%
26&B,1
26&B287
7$03(557&
$/$506(&21'287
%DFNXSLQWHUIDFH
86%27*)6
$+%WR
$3%
$+%WR
$3%
(;7,7
:.83
*3,2SRUW&
3'>@
*3,2SRUW'
3(>@
*3,2SRUW(
$3%) PD[ 0+]
3&>@
7,0
&KDQQHOV (75
DV$)
7,0
&KDQQHOV (75
DV$)
7,0
&KDQQHOV (75
DV$)
7,0
&KDQQHO V(75
DV$ )
5;7;&76576
&.DV$)
86$57
5;7;&76576
&.DV$)
86$57
5;7;DV$)
8$57
5;7;DV$)
8$57
63,,6
[[E
LW
7,0
63,,6
[[E
LW
63,
::'*
86$57
026,6'0,620&.
6&.&.166:6DV$)
026,6'0,620&.
6&.&.166:6DV$)
,&
6&/6'$ 60%$
DV$)
,&
6&/6'$60%$
DV$)
E[ &$1
&$1B7;DV$)
&$1B5;DV$)
65$0%
7HP SVHQVRU
95()
95()
3253'5
#9''$
'0$(WKHUQHW
*3,2SRUW%
3
$'&B,1V
FRPPRQWR
$'&$'&
6XSSO\
VXSHUYLVLRQ
,QW
3//
5HVHW
FORFN
FRQWURO
966
39'
3//
(WKHUQHW 0$&
3%> @
5;7;&76576
&.DV$)
325
5HVHW
5&/6
*3'0$
*3,2SRUW$
3
026,0,62
6&.166DV$)
5&+6
3//
3$> @
&KDQQHOV
FRPSO &KDQQHOV
%.,1(75LQSXWDV$)
#9''$
FKDQQHOV
65$0.%
$)
ELW
65$0
.%
FKDQQHOV
9'' WR9
#9''
$3%)PD[ 0+]
62)
9%86
,'
'0
'3
)ODVK.%
$+%
0,,B7;'>@50,,B7;'>@
0,,B7;B&/.50,,B7;B&/.
0,,B7;B(150,,B7;B(1
0,,B5;'>@50,,B5;'>@
0,,B5;B(550,,B5;B(5
0,,B5;B&/.50,,B5()B&/.
0,,B5;B'950,,B&56B'9
0,,B&56
0,,B&2/50,,B&2/
0'&
0',2
336B287
9ROWDJHUHJ
9WR9
'EXV
)PD[ 0+]
3RZHU
9''
,QWHUIDFH
73,8
6:-7$*
)ODVKO REO
DV$)
1-7567
-7',
-7&.6:&/.
-7066:',2
-7'2
DV$ )
%XV 0DWUL [
75$&(&/.
75$&('>@
E[ &$1
EL W$'& ,)
ELW$'&
,)
&$1B7;D
V $)
&$1B5;DV$)
7,0
,) ELW '$&
,)
'$&B287DV$)
7,0
ELW'$& '$&B287DV$)
#9''$
#9''$
DL
26/49
DocID026263 Rev 2
UM1756
5.2
Programming section
Firmware loading
This section describes how to load firmware into the board by using the DfuSe
demonstration software.
5.2.1
DfuSe installation
You need first to download the DfuSe demonstration software from www.st.com.
The DfuSe tool is referenced under the development suite STSW-STM32080.
Once downloaded, run the setup.exe file.
More details on the DfuSe are given in the UM0412: “Getting started with DfuSe USB device
firmware upgrade STMicroelectronics extension” user manual.
5.2.2
Generate a DFU file from a HEX file
If the file you want to download to the discovery board is not a DFU file but a HEX file, you
will need first to convert it.
In this purpose:

Start the DFU file manager (V3.0.3 or greater) which has been installed with the DfuSe.

Choose “I want to GENERATE a DFU file from S19, HEX or BIN files”.
Figure 19. DFU file Manager (action)
DocID026263 Rev 2
27/49
49
Programming section
UM1756

Click the “S19 or Hex”… button

Select in the open dialog box the file of type “hex Files”, select the HEX file and click
“OK”.

Click on the “Generate …” button

Give a name to the *.DFU file and click on the “Save” button.
Figure 20. DFU file Manager (Generation)
28/49
DocID026263 Rev 2
UM1756
5.2.3
Programming section
Board settings
To be able to download firmware, the discovery board should be started in the “DFU” mode.
In this purpose:
1.
Remove the jumper from the “Boot” pins.
2.
Plug a USB cable between the discovery board and the PC.
It does not matter if the discovery board is plugged or not to a 5 - 45 V DC supply.
Figure 21. Board settings
DocID026263 Rev 2
29/49
49
Programming section
5.2.4
UM1756
DFU loading
At this step, you are now ready to perform the firmware upgrade.
1.
Start the “DfuSeDemo.exe”.
2.
You must have an “STM Device in DFU Mode” in the list of the “Available DFU
Devices”. Else, it means that your board is not correctly configured or not connected to
the PC.
Figure 22. DFU loading
3.
30/49
In the “Upgrade or Verify Action group”, click on the “Choose…” button.
DocID026263 Rev 2
UM1756
Programming section
4.
Select the *.dfu file of your choice in the “Open” dialog box and click on the “Open”
button.
Figure 23. DFU file (open)
DocID026263 Rev 2
31/49
49
Programming section
5.
UM1756
Click on the “Upgrade” button
Figure 24. DFU file (upgrade)
32/49
DocID026263 Rev 2
UM1756
Programming section
6.
If this dialog box appears, click “Yes”.
Figure 25. DFU file (confirmation)
7.
Once the download is performed, you should have:
Figure 26. DFU file (download OK)
8.
Do no forget to put the jumper back on the “Boot” pins in order to restart the discovery
board to the normal mode!
DocID026263 Rev 2
33/49
49
Programming section
5.3
UM1756
Using the EVAL6480H-DISC or EVAL6482H-DISC with the
firmware for the GUI (FWGUI)
By default the discovery board is loaded with the FWGUI. This firmware offers the capability
to connect the board with a GUI: the SPIN family evaluation tool. This GUI provides direct
access to all device registers and allows sending application commands.
Both the FWGUI and the GUI can be downloaded on the “Design Resources” page of the
board.
The FWGUI can be downloaded to the discovery board as detailed in Section 5.2 on page
27.
The behavior of the GUI is detailed in the Help.chm file which is provided with the setup file
of the GUI.
5.3.1
Sanity check of the board with the firmware for the GUI (FWGUI)
At the startup of the FWGUI, a sanity check is performed to confirm the discovery board is
working correctly. The status is returned via the board LEDs.
To have a correct execution of the sanity check, please follow the steps below:
1.
Place a jumper on the boot pins (bottom left corner of the board):
Figure 27. Starting board (boot mode)
34/49
DocID026263 Rev 2
UM1756
Programming section
2.
Connect the board to a 5 V - 45 V DC power supply:
Figure 28. Starting board (motor power supply)
3.
Plug a USB cable (which must at least provides a power supply).
Figure 29. Starting board (USB connection)
4.
The board should switch on automatically.
DocID026263 Rev 2
35/49
49
Programming section
5.
UM1756
At this step:
a)
If a problem is detected, the “ready” LED (green) and the “error” LED (red) will
switch on without blinking. This means that:
–
Either the board ID is no recognized by the FW (bad FW versions used).
–
Or there is a problem with the SPI (no connection between the MCU and the
L648x via the SPI).
–
Or there is no 5 V - 45 V DC power supply.
Figure 30. Starting board (error case)
36/49
DocID026263 Rev 2
UM1756
Programming section
b)
If no problem is detected, the LEDs will start an infinite two-step loop:
–
In the first step, the four LEDs will switch on one after the other by starting by the
green one and ending by the yellow one.
Figure 31. Starting board (board OK)
DocID026263 Rev 2
37/49
49
Programming section
–
UM1756
In the second step, only the LEDs which correspond to the board Id are switched
on all in the same time.
For the L6480 device, there are the green and orange LEDs.
For the L6482 device, there are the green, red, and yellow LEDs.
Figure 32. Starting board (display board ID)
6.
Press the “Left” button and check the two-step loop stops after a few seconds. Only the
green LED remains switched on
Figure 33. Starting board (action left key)
38/49
DocID026263 Rev 2
UM1756
Programming section
7.
Press the “Right” button and check the two-step loops restarts.
Figure 34. Starting board (action right key)
8.
Press the “Reset” button and check that the LEDs restart there two-step loop after the
board reset.
Figure 35. Starting board (action reset key)
Note:
Please note that once you have connected the discovery board to the GUI, the LEDs
meaning is different. You then need to restart the board to perform a new auto-check and to
have a valid status from the LEDs.
DocID026263 Rev 2
39/49
49
Programming section
5.3.2
UM1756
Parameters exportation from the GUI to the FW library
Once you have customized the L6480/L6482 parameters with the GUI, you can export them
to a header file in order to use it with the FW demonstration library.
In this purpose:
1.
Press the “header file” button on the main window of the GUI.
Figure 36. Parameters exportation
40/49
DocID026263 Rev 2
UM1756
Programming section
2.
Replace the existing “cspin_config.h” of your current demonstration FW library by the
new one.
Figure 37. Parameters exportation (save file)
3.
Then you only need to recompile your project “demo FW library” as usual to use the
exported parameters.
DocID026263 Rev 2
41/49
49
Programming section
5.4
UM1756
Using the EVAL6480H-DISC or EVAL6482H-DISC with the
firmware library
The L648x firmware library is supplied as an IAR workspace with source, include and
project files. If you are using the IAR design environment, you just need to load the
“cspin.eww” file and use the “fwlibrairies_cspin_discoverykit” project which is already active.
If you are using a different design environment, you will find instructions in this user manual
to build a new project on your preferred IDE.
The L648x firmware library is also supplied as an executable file in a HEX and in a DFU
format. It can be loaded into the EVAL6480H-DISC or the EVAL6482H-DISC board as
explained in Section 5.2 on page 27.
5.4.1
Package contents

L648x FW library
–

–

/stm32f10x/CMSIS
Library used by the L648x FW library
STM32F10x standard peripherals library drivers
–

Described in Section 5.4.2.
CMSIS library
/stm32f10x/STM32F10x_StdPeriph_Driver Library used by the L648x FW library
IAR workspace files
–
/user_motion/project/ewarm6/fwlibraries/cspin/cspin.eww
- a workspace file
–
user_motion/project/ewarm6/fwlibraries/cspin/settings/cspin.wsdt
- a workspace settings file
–
/user_motion/project/ewarm6/fwlibraries/cspin/discoverykit
- a directory containing discovery board project files and subdirectories
–
/user_motion/project/ewarm6/fwlibraries/cspin/discoverykit/Debug/Exe/
- a directory containing the *.HEX and *.DFU executable files
–
/user_motion/project/ewarm6/fwlibraries/cspin/pcc009v2
- a directory containing the PCC009V2 board project files and subdirectories.
5.4.2
L648x FW library description
The L648x FW library has the following features:
42/49

Register read, write and check

Register values conversion

Device configuration

Motion commands

FLAG and BUSY interrupts management

Button interrupts management

Step “Clock mode” management

Initialization routine using “GoUntil: and “ReleaseSW” commands

“Daisy Chain” mode.
DocID026263 Rev 2
UM1756
Programming section
The L648x FW library has been tested on the L6480H Discovery board R1 and the L6482H
Discovery R1. The main program contains a commented demonstration sequence which
uses all the library supported features. This sequence is interactive and to proceed to the
end some user action is necessary.
For the “GoUntil” feature demonstration, when the LED SPARE is blinking for the first time,
the user shall close the SW MOTOR jumper J8. This triggers a switch turn-on event at the
L648x SW pin.
For the “ReleaseSW” feature demonstration, when the LED SPARE is blinking again, the
user shall open the SW MOTOR jumper J8. This triggers a L648x SW pin release.
At the end of the demonstration sequence, the GPIO connected to the LEFT and RIGHT
buttons are configured to trigger interrupts on the microcontroller:
On a LEFT button press, the microcontroller starts the motor at quarter of max. speed if it is
stopped, or doubles the motor speed if it is already running.
On a LEFT button press, the microcontroller disables the power bridges after a smooth stop
if the motor is running at minimum speed, or halves the motor speed if the motor is running
above minimum speed.
Even if the “Daisy Chain” mode is supported in the L648x FW library, the board HW does not
allow it. Please contact ST support if you want more information on “Daisy Chain” mode
testing or implementation.
The L648x FW library consists of the following files:
5.4.3

user_motion/cspin/inc/stm32f10x_conf.h Library configuration file

user_motion/cspin/src/stm32f10x_it.c
Interrupt handlers

user_motion/cspin/inc/stm32f10x_it.h
Header for stm32f10x_it.c

user_motion/cspin/inc/clock.h
System clock setup related header

user_motion/cspin/src/clock.c
System clock source file

user_motion/cspin/inc/cspin.h
Definitions header

user_motion/cspin/src/cspin.c
Routines source file

user_motion/cspin/inc/cspin_config.h
Configuration parameters (this file can be
generated by the GUI)

user_motion/cspin/inc/main.h
Main header file

user_motion/cspin/src/main.c
Main program

user_motion/cspin/inc/pre_include.h
First header file included by the preprocessor

user_motion/cspin/readme.txt
Information on the files
Demo sequence description
The demonstration sequence description is for one L6480 or L6482 device without daisy
chaining. The application commands used are noted after the pipe character. The
application commands traffic can be seen on the SPI interface, pins 18, 19, 20 and 23 which
are respectively SDO, CK, SDI and CS.
DocID026263 Rev 2
43/49
49
Programming section
UM1756
Initialization and configuration
1.
Initialize peripherals
2.
LED_READY (GREEN) is lighted up, other LEDs are switched off.
3.
LED check sequence:
a)
LED_ERROR (RED) is switched ON
b)
LED_BUSY (ORANGE) is switched ON
c)
LED_SPARE (YELLOW) is switched ON
d)
LED_ERROR (RED), LED_BUSY (ORANGE) and LED_SPARE (YELLOW) are
switched OFF
4.
Resets and puts device into standby mode. The STBY_RESET pin goes low for a few
hundreds of s and then goes high.
5.
Program all registers | SetParam (PARAM, VALUE).
Flag signal management
6.
Read Status register content | GetStatus
7.
Interrupt configuration for FLAG signal
8.
Motor runs at constant speed of 400 steps/s forward direction | Run (DIR, SPD)
9.
Tentative to write to the current motor absolute position register while the motor is
running, as a consequence the LED_ERROR (RED) is lighted up | SetParam
(PARAM, VALUE)
10. Get Status to clear FLAG due to non-performable command, as a consequence the
LED_ERROR (RED) is switched off | GetStatus
11. Motor stops smoothly | SoftStop
12. Wait until not busy - busy pin test (L648x pin 22).
Busy signal management
13. Interrupt configuration for BUSY signal
14. Motor moves by 100,000 steps in reverse direction | Move (DIR, N_STEP)
15. During busy time the LED_BUSY (ORANGE) is switched ON
16. Device disables the power bridges after a deceleration to zero phase | SoftHiZ
17. LED_BUSY (ORANGE) is switched OFF.
The LED_BUSY after the point 7 and the LED_ERROR after the point 13 are tied
respectively to the BUSY/SYNC pin and the FLAG pin. So for example they are lighted up
when the motor accelerates or decelerates. This is happening in the remaining part of the
demonstration although not mentioned.
Various application commands examples
18. Motor moves by 60,000 steps forward | Move (DIR, N_STEP)
19. Wait until not busy - busy pin test (pin 22).
20. The L6480 only: sends the device command setting hold duty cycle to 0.5%, sends the
device command changing hold current to 40 mA.
The L6482 only: sends the device command setting hold current to 40 mA, sends the
device command setting run current to 200 mA.| SetParam (PARAM, VALUE).
44/49
DocID026263 Rev 2
UM1756
Programming section
21. Motor runs at constant speed of 50 steps/s in reverse direction | Run (DIR, SPD).
22. Motor softly stops after a few seconds | SoftStop.
23. The L6480 only: RESET KVAL_HOLD to initial value, RESET KVAL_RUN to initial
value.
The L6482 only: RESET TVAL_HOLD to initial value, RESET TVAL_RUN to initial
value. | SetParam (PARAM, VALUE).
24. Wait until not busy - busy status check in the Status register | GetStatus.
25. Motor moves by 100,000 steps forward | Move (DIR, N_STEP).
26. Wait until not busy - busy status check in the Status register | GetStatus.
27. Test of the Flag pin (pin 24) by polling, wait in endless cycle if problem is detected.
28. Motor moves to its home position | GoHome.
29. Wait until not busy - busy pin test (pin 22).
30. Motor goes to the absolute position 65535 through the shortest path | GoTo
(ABS_POS).
31. Wait until not busy - busy pin test (pin 22).
32. Motor goes in forward direction to the absolute position 131071 | GoTo_DIR
(DIR, ABS_POS).
33. Wait until not busy - busy pin test (pin 22).
34. The L6480 only: read run duty cycle (cSPIN_KVAL_RUN) parameter from device, read
intersect speed (cSPIN_INT_SPD) parameter from device.
The L6482 only: read run current (cSPIN_TVAL_RUN) parameter from device. |
GetParam(PARAM).
35. Read Status register content | GetStatus.
36. Read absolute position (cSPIN_ABS_POS) parameter from device |
GetParam(PARAM).
37. Reset position counter, actually | ResetPos.
38. Read absolute position (cSPIN_ABS_POS) parameter from device |
GetParam(PARAM).
39. Device disable power stage (High Impedance) immediately, as a consequence the
supply current drops | HardHiZ.
“Go until” example
40. Interrupt configuration for the SW MOTOR.
41. Motor motion in forward direction at speed 400 steps/s until the user puts a jumper on
J8, the LED_SPARE (YELLOW) toggles until the user puts a jumper on J8 |
GoUntil (ACT, DIR, SPD)
42. Motor stops.
43. The LED_SPARE (YELLOW) is switched off.
44. Wait until not busy - busy pin test (pin 22).
45. Motor moves by 50,000 steps reverse | Move (DIR, N_STEP)
46. Motor moves to the position saved by the GoUntil command into the MARK register, so
50000 steps forward | GoMark.
47. Wait until not busy - busy pin test (pin 22).
48. Nothing happens during a few seconds.
DocID026263 Rev 2
45/49
49
Programming section
UM1756
Release SW example
49. Motor motion in reverse direction at minimum speed until the user removes the jumper
on J8, the LED_SPARE (YELLOW) toggles until the user removes the jumper on
J8 | ReleaseSW (ACT, DIR).
50. The LED_SPARE (YELLOW) is switched off.
51. Motor moves by 100,000 steps forward | Move (DIR, N_STEP).
52. Wait until not busy - busy pin test (pin 22).
53. Motor goes to the home position set by the ReleaseSW command | GoHome.
54. Wait until not busy - busy pin test (pin 22).
Step clock mode example
55. Get Status to clear FLAG due to switch turn-on event (falling edge on the SW pin) |
GetStatus.
56. Motor runs in step clock mode at 2000 steps/s in forward direction for a few seconds
while a 2 kHz clock signal from the MCU is applied to the STCK pin (25) | StepClock
(DIR).
57. The above cited clock is stopped.
Buttons interrupt example
58. Buttons interrupt configuration
5.4.4
a)
Button_A
–
Starts the motor at quarter of max. speed if it is stopped | Run (DIR, SPD).
–
Doubles the motor speed if it is already running | Run (DIR, SPD).
b)
Button_B
–
Disables the power bridges after a smooth stop if the motor is running at minimum
speed | SoftHiZ.
–
Halves the motor speed if the motor is running above minimum speed | Run
(DIR, SPD).
Create a project using the FW library package
Using your preferred IDE, create a new project.
In project options, properties or settings:

Select for the device, the ST STM32F105xB.

Use the CMSIS library.
Edit the preprocessor defined symbols and add:

STM32F10X_CL

USE_STDPERIPH_DRIVER

ST_CSPIN_6480H_DISCOVERY
The flag ST_CSPIN_6480H_DISCOVERY is used for both L6480 and L6482 chips. It is
used to distinguish boards (i.e. the DISC board from the PCC009V2 board).
46/49
DocID026263 Rev 2
UM1756
Programming section
Edit the preprocessor including directories and add:

$PROJ_DIR$\.…\…\…\…\…\…\stm32f10x\CMSIS\CM3\DeviceSupport\ST\STM32F10x

$PROJ_DIR$\…\…\…\…\…\…\stm32f10x\STM32F10x_StdPeriph_Driver\inc

$PROJ_DIR$\…\…\…\…\…\cspin\inc
Edit the “Linker” configuration file:
- $PROJ_DIR$\config\stm32f10x_flash.icf
Where $PROJ_DIR$ is a variable containing the path to the project directory.
Add the required library source files:

startup_stm32f10x_cl.s

system_stm32f10x.c

misc.c

stm32f10x_exti.c

stm32f10x_flash.c

stm32f10x_gpio.c

stm32f10x_rcc.c

stm32f10x_spi.c

stm32f10x_tim.c
For the debugger, for example, select the ST-LINK and configure it to run to main, to verify
download, to use the Flash loader and to override the “default.board” file with the
“FlashSTM32F105xB.board”.
DocID026263 Rev 2
47/49
49
References
6
UM1756
References
This user manual provides information on the hardware features and use of the
EVAL6480H-DISC board along with the demonstration firmware and software. For
additional information, refer to the following:
7
1.
STM32F105xx datasheet (CD00220364).
2.
STM32F105xx reference manual (RM0008).
3.
Voltage mode control operation and parameter optimization application note (AN4144).
4.
L648x devices gate drivers setup application note(AN4354).
5.
L648x devices: high power stepper motor controllers application note (AN4355).
6.
L647x, L648x and powerSTEP01 family communication protocol application note
(AN4290).
Revision history
Table 8. Document revision history
Date
Revision
30-May-2014
1
Initial release.
2
Updated whole document (removed/replaced “cSPIN™”
“cSPIN”, and “cSPIN™ microstepping motor driven” by
“L648x”/”L648xH controllers”/”L6480 motor controller”/
“L6482 motor controller”/”device”/“motor”/board”.
Removed “Figure 6. EVAL6480H-DISC layout (silk
screen)” from page 10 and “Figure 12. EVAL6482HDISC layout (silk screen)” from page 16.
Replaced “FWPSPIN” by “FWGUI” and removed web
link from Section 5.3 on page 34.
Removed “FW cSPIN”, “FW library”, and “cSPIN
Discovery” from Section 5.4 on page 42.
Updated Section : Various application commands
examples on page 44.
Updated Section 6 on page 48 (updated title of AN4354,
AN4355, and AN4290).
Minor modifications throughout document.
09-Mar-2015
48/49
Changes
DocID026263 Rev 2
UM1756
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on
ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or
the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2015 STMicroelectronics – All rights reserved
DocID026263 Rev 2
49/49
49