1/31
AN1083
APPLICATION NOTE
ST72141 BLDC MOTOR CONTROL SOFTWARE AND
FLOWCHART EXAMPLE
by Microcontroller Division Applications
INTRODUCTION
The purpose of this application note is to give the flowcharts of the software examples showing
how to drive a motor in both current and voltage modes and give examples of Open Loop or
Closed Loop speed regulation.
The software examples described in this application note are those generated by the
ST7MTC2 Kanda kit for Sensorless mode. 80% of the code is generic, the remaining 20% is
specific to the implementation of the ST72141 microcontroller (MCU) in the ST7MTC2 kit (user
interface and communication data).
Note
: Please refer to Application Note 1321 for details concerning Sensor mode.
The software examples given in the file attached with this application note illustrate Current
mode and Closed Loop driving mode for a 4-pole, brushless DC (BLDC) motor.
1 DESCRIPTION OF SOURCE FILES
The source files described in this section refer to the software provided in the file attached with
this application note.
–
Aut_cc.asm is the main file and also contains the interrupt routines,
–
Sub_cc.asm contains the software subroutines,
–
Sub_cc.inc contains the subroutine declarations,
–
Cst_cc.asm and Cst_cc.inc contain the constant declarations,
–
ST72e141.asm and st72e141.inc are the map files.
Paramcc.txt is a complete set of motor parameters. These parameters are declared in the
ROM part of the ST72141 MCU (with an include file) and then transferred to the RAM part of
the ST72141 MCU at the beginning of the main file. This is because the value of some param-
eters can be changed while the motor is running. Most of these parameters are coded as indi-
cated in the datasheet.
Deframp.txt is the ramp table for the start-up sequence of the motor. It contains 38 consecu-
tive decreasing step times required to accelerate the motor and to detect the first Back-EMF
zero-crossing event.
Def_prep.txt is the current ramp for the pre-positioning phase of the motor. It contains 25 steps
of increasing current values required to set the rotor in a given position.
1
本文档介绍了如何使用ST72141微控制器控制无传感器BLDC电机的电流模式和闭环速度调节,提供了一个包含启动序列、预定位阶段的软件例子和流程图。
803

被折叠的 条评论
为什么被折叠?



