English
Language : 

TN0516 Datasheet, PDF (6/11 Pages) STMicroelectronics – This technical note is an overview of the main features
MC software development kit architecture
Figure 2. Motor control library
TN0516
The Motor Control Library uses the lower STM32Fxxx Standard Peripheral Library layer
extensively for initializations and settings on peripherals. Direct access to STM32 peripheral
registers is preferred when optimizations (in terms of execution speed or code size) are
required. More information about the Motor Control Library, its classes and object oriented
programming can be found in the Advanced developers guide for
STM32F0x/F100xx/F103xx and STM32F2xx/F30x/F4xx MCUs PMSM single/dual FOC
library (UM1053).
The Motor Control Application (MCA) is an application that uses the Motor Control Library in
order to accomplish commands received from the user level. This set of commands is
specified in its Application Programming Interface (API).
During its boot stage, the MCA creates the required controls in accordance with actual
system parameters, defined in specific .h files that are generated by the ST MC Workbench
GUI (or manually edited). It coordinates them continuously for the purpose of accomplishing
received commands, by means of tasks of proper priority and periodicity. More information
about the MCA can be found in User manual STM32F0x/F100xx/F103xx/F2xx/F30x/F4xx
PMSM single/dual FOC SDK v4.0 (UM1052), and details on tasks and implemented
algorithms in the Advanced developers guide for STM32F0x/F100xx/F103xx and
STM32F2xx/F30x/F4xx MCUs PMSM single/dual FOC library (UM1053).
At the user level, a user project has been implemented to demonstrate how to interact with
the MC API to successfully achieve the execution of commands. Depending on definable
options, the user project can act as a Human Interface Device (using a joystick, buttons and
LCD screens), as a command launcher through a serial communication protocol, as a data
logging/displaying utility, or as a tuning tool.
Two versions of this user project are available (STM32F103xx and STM32F2xx only). One
is based on FreeRTOS, the other is not. The demonstration user project can be dismantled
and replaced by the user application layer, or quite easily integrated, as shown in Figure 3:
the user application layer uses the STM32F10x Standard Library for its own purposes and
sends commands directly to the MC API, while the serial communication interface provided
6/11
DocID018733 Rev 4