June 2009 Doc ID 15773 Rev 1 1/85
UM0708
User manual
STM8Sxxx
three-phase BLDC motor control software library V1.0
Introduction
This user manual describes the brushless direct current motor (BLDC) scalar software
library, a scalar control firmware library for 3-phase permanent-magnet (PM) motors
developed for the STM8Sxxx microcontrollers.
ST STM8Sxxx 8-bit microcontrollers come with a set of peripherals that makes them
suitable for performing both PM and AC induction motor scalar control.
The present document describes the STM8Sxxx software library developed to control
trapezoidal driven PM motors in both open loop and speed control mode. These motors may
be equipped with three Hall sensors or may be sensorless. The control of an AC induction
motor equipped with tachogenerator is described in the UM0712 user manual.
The BLDC motor software library is made of several C modules, and is fitted out with STVD
workspace. It is used to quickly evaluate both the MCU and the available tools. In addition,
when used together with the STM8/128-MCKIT motor control starter kit and a PM motor, a
motor can be made to run in a very short time. The BLDC library also eliminates the need
for time-consuming development of low level drive and speed regulation algorithms by
providing ready-to-use functions that let the user concentrate on the application layer.
Moreover, it is possible to get rid of any speed sensor thanks to the sensorless algorithm for
rotor position reconstruction based on BEMF detection.
A prerequisite for using this library is basic knowledge of C programming, PM motor drives
and power inverter hardware. In-depth know-how of STM8Sxxx functions is only required for
customizing existing modules and for adding new ones for a complete application
development.
www.st.com