
4.2.3 Overcurrent and stall detection thresholds
The overcurrent protection and the stall detection are implemented measuring the current flowing into each
integrated MOSFET.
The overcurrent protection threshold should be set just above the current rating of the motor:
IOCDth > Imax, r.m.s. ×√2(1)
For example: if the maximum phase current of the motor is 2 Ar.m.s., the overcurrent protection should be set to
about 3 A.
Attention: It is strongly discouraged to disable the overcurrent shutdown. It may result in critical failures.
The stall detection threshold should be just above the operating peak current of the application. During the
preliminary stages of evaluation, it can be set to the maximum value.
4.2.4 Speed profile
The max. speed parameter is the maximum speed the motor will run. By default, it is about 1000 step/s. That
means, if you send a command to run at 2000 step/s, the motor speed is limited at 1000 step/s.
This is an important safety feature in the final application, but not necessarily useful to evaluate the device
performances. Setting the parameter to high values (e.g. 6000 step/s) allows evaluating the maximum speed
which can be achieved by the application under test through the speed tracking command (Run), but it probably
limits the possibility to use positioning commands (Move, GoTo, etc.).
The Full-step speed parameter indicates the speed at which the system switches from microstepping to full step
operation.
In voltage mode driving devices it is always recommended to operate in microstepping and not to switch to full
step. Hence, this parameter should be greater than the maximum speed.
4.3 STM32F105RB microcontroller
The STM32F105xx incorporates the high-performance ARM® Cortex™-M3 32-bit RISC core operating at a 72
MHz frequency, high-speed embedded memories (a Flash memory up to 256 Kbytes and an SRAM 64 Kbytes),
and an extensive range of enhanced I/O and peripherals connected to two APB buses. All devices offer two 12-bit
ADCs, four general purpose 16-bit timers plus a PWM timer, as well as standard and advanced communication
interfaces: up to two I2Cs, three SPIs, two I2Ss, five USARTs, a USB OTG FS and two CANs.
The STM32F105xx device operates in the -40 to +105 °C temperature range, from a 2.0 to 3.6 V power supply. A
comprehensive set of power saving mode allows the design of lowpower applications.
The STM32F105xx offers devices in three different package types: from 64 pins to 100 pins.
Depending on the device chosen, different sets of peripherals are included.
These features make the STM32F105xx and STM32F107xx connectivity line microcontroller family suitable for
a wide range of applications such as motor drives and application control, medical and handheld equipment,
industrial applications, PLCs, inverters, printers and scanners, alarm systems, video intercom, and HVAC and
home audio equipment.
Please refer to the STM32F105xx datasheet for an overview of the complete range of peripherals proposed in this
family.
Please refer to the STM32F105xx reference manual to get more information on the microcontroller operation.
The STM32F105RBT6 has a 64-pin LQFP package with a 128-KByte Flash memory and operates in the -40 to +
85°C temperature range.
Figure 9 shows the general block diagram of the STM32F105xx and STM32F107xx family.
UM1691
STM32F105RB microcontroller
UM1691 - Rev 3 page 11/33