July 2018 AN5143 Rev 3 1/32
1
AN5143
Application note
How to migrate motor control application software
from SDK v4.3 to SDK v5.x
Introduction
The STM32 motor control software development kit (MC SDK) is part of the
STMicroelectronics motor-control ecosystem. It is referenced as X-CUBE-MCSDK or X-
CUBE-MCSDK-FUL according to the software license agreement applied. It includes the:
ST
MC FOC firmware library for permanent-magnet synchronous motor (PMSM) field-
oriented control (FOC)
ST MC Workbench software tool, a graphical user interface for the configuration of
MC SDK firmware library parameters
This application note helps when
migrating motor-control application software from the
SDK v4.3 to the SDK v5.x framework. It covers f
irmware aspects as well as the use of the
MC software tool.
Note: SDK v5.x must be used for new project
s because it provides users with new APIs.
www.st.com
Contents AN5143
2/32 AN5143 Rev 3
Contents
1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Related documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 SDK v5.x versus SDK v4.3 comparison summary . . . . . . . . . . . . . . . . . 7
4 Supported STMicroelectronics boards . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5 Development workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6 Simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.1 Conversion of objects to pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 Translation of motor-control APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7 Cubification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1 Conversion of library use from SPL to HAL or LL . . . . . . . . . . . . . . . . . . 30
7.2 Use of STM32CubeMX tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31