English
Language : 

AN3980 Datasheet, PDF (1/19 Pages) STMicroelectronics – This application note describes the implementation
AN3980
Application note
STM32™ firmware library for dSPIN L6470
1
Introduction
This application note describes the implementation of the STM32 firmware library for the dSPIN
stepper motor control product (L6470). It provides a guide on how to use the library for final
application development.
The L6470 is a fully integrated microstepping motor driver with embedded motion engine and SPI
communication interface. A low RDSON DMOS power stage is also a part of the IC. The chip
supports different operating modes including a 128-microstep resolution. It is based on digital
control core surrounded with a number of different peripherals and protections. Chip operating
mode, motion profiles, and all the other parameters are memorized in an embedded set of
registers. Communication with the IC is done through an integrated 5 MHz SPI periphery in
determined data format according to the documentation. See the L6470 datasheet for more details
about registers, application commands, etc. The firmware library speeds up the application
development process and saves time consumed by register constant definitions and command
routine implementation in the microcontroller source code.
Firmware library main features
■ Designed for the STM32F1xx microcontroller family
■ STEVAL-PCC009V2 + STM32 value line Discovery demonstration boards supported with library
configuration (dspin.h) and development tools project files
■ Easy portability due to ANSI C standard compliance
– Only HAL (“Hardware Abstraction Layer”) routines should be modified when used with
another platform
– Simple portability to STM8™ families thanks to similar HAL routines for peripherals - SPI,
GPIOs, etc.
■ Library contains project folders (files) for development tools:
– IAR™ - EWARM v5
J-Link for STEVAL-PCC009V2
ST-Link for STM32 VL Discovery
– IAR - EWARM v6
J-Link for STEVAL-PCC009V2
– KEIL - µVision® v4.03, v4.20
ULINK2® for STEVAL-PCC009V2
ULINK Pro for STEVAL-PCC009V2
ST-Link for STM32 VL Discovery
– Raisonance - RIDE v7
R-Link for STEVAL-PCC009V2
November 2011
Doc ID 022200 Rev 1
1/18
www.st.com