STSW-TTM005
Data brief

STM32 firmware example for resolver sensor signals decoding using the STEVALTTM005AFeatures•••••Product summary••Firmware example for an STM32 microcontroller to estimate the rotor angularposition and speed decoding the resolver signals
The angular speed and position of the rotor flux are used to achieve the controlof the motor in an embedded application based on the X-CUBE-MCSDK v5.4.8
Compatible with a system composed of a NUCLEO-G431RB, plus a STEVALIPM10B, plus an X-NUCLEO-IHM09M2, plus the STEVAL-TTM005A
Programmable excitation frequency
Low CPU workload for sin and cos input signals demodulation using ADC
trigger conversion with programmable delay
Support to multiturn resolvers
Compatible with X-CUBE-MCSDK and STM32CubeMX architecture for fully
configurability of the user application

STM32 firmware
example for resolver
sensor signals
decoding using theSTEVAL-TTM005A

STSW-TTM005

Description

Resolver board
reading for motor
position estimation

STEVALTTM005A

The STSW-TTM005 is an STM32 firmware application example that estimates therotor angular position and speed, providing the excitation signal and decoding theresolver sin and cos signals.

STM32 Motor Control
SoftwareDevelopment Kit(MCSDK)X-CUBE-MCSDKSTM32 Nucleo-64
development board
with STM32G431RB
MCU, supports
Arduino and ST
morpho connectivity

NUCLEOG431RB

The implemented algorithm exploits a low CPU workload demodulation using ADC
triggered conversions.

1200 W motor control
power board based on
STEVAL-IPM10B
STGIB10CH60TS-L
SLLIMM™ 2nd series
IPM

The trigger point can be fully adjustable with a configurable delay respecting theexcitation signal to compensate the delays introduced by the electronic circuit and by
the sensor.
The excitation frequency can be fully programmable in the firmware covering a wide
range from 2kHz up to 10kHz.
Angular speed and position of the rotor flux allows an accurate and efficient control ofthe motor starting from the stand still up to the maximum speed, with the mostadvanced field oriented control (FOC) algorithms implemented in the X-CUBEMCSDK firmware library.
Both single-turn and multiturn resolvers are supported properly configuring thefirmware.

Motor control
connector expansion
board for STM32
NucleoX-NUCLEOIHM09M2

The provided set of source codes and project files, represent a snapshot of the XCUBE-MCSDK project generated by the ST motor control workbench v.5.4.8,
according to the following hardware system: NUCLEO-G431RB, STEVAL-IPM10B,
X-NUCLEO-IHM09M2, STEVAL-TTM005A.

STM32Cube
initialization codegenerator

STM32CubeMX

The STSW-TTM005 contains specific modifications, respect to the project generated
by the ST motor control workbench to add the support to generate the excitation
signal and to decode the sin and cos signals coming from the encoder.

IntegratedDevelopment
Environment forSTM32

STM32CubeIDE

Applications

Automotive
Motor Control

The estimation of the rotor flux angle and speed, and fed this information to the FOC
algorithm implemented by the X-CUBE-MCSDK project.
The STSW-TTM005 is compatible with X-CUBE-MCSDK and STM32CubeMX
architecture and it is fully configurable via the official STM32 PC tools.
Together with the source code, in the STSW-TTM005 pack, is provided also theworkspace and project files for IAR Embedded Workbench® (v9.32.2), that can beused to compile and fine-tune the firmware.

DB5254 - Rev 1 - April 2024
For further information contact your local STMicroelectronics sales office.

www.st.com

STSW-TTM005

The project for the other compatible compilers and IDEs, like the STM32CubeIDE, can be obtained using theSTM32CubeMX (v6.5.0) for the project generation using the provided.ioc file.

DB5254 - Rev 1

page 2/4

STSW-TTM005

Revision history
Table 1. Document revision history

DB5254 - Rev 1

Date

Revision

24-Apr-2024

1

Changes
Initial release.

page 3/4

STSW-TTM005

IMPORTANT NOTICE – READ CAREFULLYSTMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST
products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST
products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design ofpurchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names
are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2024 STMicroelectronics – All rights reserved

DB5254 - Rev 1

page 4/4