UM1771 STMICROELECTRONICS | Alldatasheet

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 38

Technical content

Datasheet sections

  • 1 Main features
  • 2 Board specifications
  • 3 General description
  • 3.1 Power supply
  • 3.2 L6474 stepper motor controller
  • 3.3 Charge pump
  • 4 Device configuration
  • 4.1 Advanced current control
  • 4.2 Overcurrent protection
  • 4.3 Speed profile
  • 5 Programming section
  • 5.1 STM32F105RB microcontroller
  • 5.2 Firmware loading
  • 5.2.1 DfuSe installation
  • 5.2.2 Generate a DFU file from an HEX file
  • 5.2.3 Board settings
  • 5.2.4 DFU loading
  • 5.3 Using the EVAL6474H-DISC with the firmware for the GUI (FWGUI)
  • 5.3.1 Sanity check of the board with the fi rmware for the GUI (FWGUI)
  • 5.3.2 Parameters exportation from the GUI to the FW library
  • 5.4 Using the EVAL6474H-DISC with the firmware library
  • 5.4.1 FW library package contents
  • 5.4.2 FW L6474 library description
  • 5.4.3 Create a project using the FW library package
  • 6 References
  • 7 Revision history

The EVAL6474H-DISC is a low cost development tool based on the L6474 and STM32™. embedded microcontroller with the 128 kB Flash memory and 64 kB RAM. operating voltage range from 8 V to 45 V and the current capability up to 3 Ar.m.s. Figure 1. EVAL6474H-DISC board photo

1 Main features

The characteristics of the EVAL6474H-DISC are the following:  DC voltage range from 8 V to 45 V  Maximum load phase current at 3 Ar.m.s.  Footprint for external resonator or crystal  Control interface through trimmer - user keys and switch motor input  Control through LED indicators  Interface control by USB and debug outputs  Compatible with SPINFamily evaluation tool  Autonomous board due to an embedded firmware  Up to 1/16 microstepping  Optimized layout on 2 layers board - low cost and high thermal performance The possibility with these boards is double:  Adapt the settings with your specific setup (motor - voltage) by using the dedicated PC application. – The user is able to save inside the board the specific parameters depending on user setup  Using the board (with user parameters) directly on site - without a connected PC.

2 Board specifications

Figure 2. Schematic (power supply part) Table 1. Electrical specifications

Figure 3. Schematic (microcontroller control part)

Figure 4. Schematic (motion control part)

Figure 5. Layout top layer and bottom layer Table 2. Bill of material

Table 2. Bill of material (continued)

3 General description

3.1 Power supply

The USB cable supplies the digital part through a dedicated LDO (U1) providing 3.3 V. The motor power must be set according the voltage required by the user motor. Figure 6. Power supply section

General description UM1771

3.2 L6474 stepper motor controller

Features

 Operating voltage: 8 - 45 V  Low RDS(on) power MOSFETs  Programmable power MOS slew-rate  Up to 1/16 microstepping  Current control with adaptive decay  Non-dissipative current sensing  Integrated voltage regulators  SPI interface  Low quiescent standby currents  Programmable non-dissipative overcurrent  Overtemperature protection Figure 7. L6474 block diagram

3.3 Charge pump

through an oscillator and few external components. Figure 8. Charge pump circuitry Table 3. Recommended operating conditions

4 Device configuration

the demonstration board operative. default configuration is not operative. device is in high impedance status (power stage is disabled).

4.1 Advanced current control

4.2 Overcurrent protection

protection should be set to about 3 A. overcurrent shutdown. It may result in critical failures. Table 4. Phase current control

Figure 9. Overcurrent protection

4.3 Speed profile

positioning commands (“Move”, “GoTo”, etc.). microstepping to full step operation.

Programming section UM1771

5 Programming section

5.1 STM32F105RB microcontroller

The STM32F105xx device incorporates the high-performance ARM®Cortex™-M3 32-bit RISC core operating at a 72 MHz frequency, high-speed embedded memories (Flash memory up to 256 Kbytes and 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 I 2Cs, three SPIs, two I2Ss, five USARTs, a USB OTG FS and two CANs. The STM32F105xx 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 low-power 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, 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 RM0008 to get more information on the microcontroller operation. The STM32F105RBT6 has a 64-pin LQFP package with 128 KBytes Flash memory and operates in the -40 to +85 °C temperature range.

5.2 Firmware loading

5.2.1 DfuSe installation

You need first to download the DfuSe demonstration software from www.st.com. The DfuSe tool is referenced under the development suite STSW-STM32080. Once downloaded, run the setup.exe file. device firmware upgrade STMicroelectronics extension” user manual.

5.2.2 Generate a DFU fi le from an HEX file

will need first to convert it.  Start the DFU file manager (V3.0.3 or greater) which has been installed with the DfuSe.  Choose “I want to GENERATE a DFU file from S19, HEX or BIN files”. Figure 11. DFU file Manager (action)

 Give a name to the *.DFU file and click on the “Save” button. Figure 12. DFU File Manager (generation)

5.2.3 Board settings

To be able to download firmware, the discovery board should be started in the “DFU” mode.

  1. Remove the jumper from the BOOT pins.
  2. Plug a USB cable between the discovery board and the PC.

It does not matter if the discovery board is plugged or not to a 5 - 45 V DC supply. Figure 13. Board settings

5.2.4 DFU loading

At this step, you are now ready to perform the firmware upgrade.

  1. Start the “DfuSeDemo.exe”.
  2. You must have an “STM Device in DF U Mode” in the list of the “Available DFU

Figure 14. DFU loading

  1. In the “Upgrade or Verify Action” group, click the “Choose…” button.
  1. Select the *.dfu file of your choice in the “Open” dialog box and click on the “Open”

Figure 15. DFU file (open)

  1. Once the download is performed, you should have:

Figure 18. DFU file ( download OK)

  1. Do no forget to put the jumper back on the BOOT pins in order to restart the discovery

5.3 Using the EVAL6474H-DISC wi th the firmware for the GUI

access to all L6474 registers and allows sending application commands. The FWGUI can be downloaded to the discovery board as detailed in Section 5.2.

5.3.1 Sanity check of the board with the firmware for the GUI (FWGUI)

working correctly. The status is returned via the board LEDs.

  1. Place a jumper on the BOOT pins (bottom left corner of the board):

Figure 19. Starting board (BOOT mode)

  • Either the board Id is not recognized by the FW (bad FW versions used).
  • Or there is no 5 V - 45 V DC power supply.

Figure 22. Starting board (error case)

  1. Press the RESET button and check that the LEDs restart there two-step loop after the

Figure 27. Starting board (action RESET key) have a valid status from the LEDs.

5.3.2 Parameters exportation from the GUI to the FW library

a header file in order to use it with the FW demonstration library.

  1. Press the “header file” button on the main window of the GUI.

Figure 28. Parameters exportation

  1. Replace the existing “eas yspin_target_config.h” of your current demonstration FW

Figure 29. Parameters exportation (save file)

  1. Then you only need to recompile your project “demo FW library” as usual to use the

UM1771 Programming section

5.4 Using the EVAL6474H-DISC with the firmware library

(FW L6474) The L6474 firmware library is supplied as an IAR workspace with a source, including project files. If you are using the IAR design environment, you just need to load the “easyspin.eww” file and use the “fwlibrairies_easyspin_discoverykit” project which is already active. If you are using a different design environment, you will find instructions in this user manual to build a new project on your preferred IDE. The L6474 firmware library is also supplied as an executable in the HEX and in DFU format. It can be loaded into the EVAL6474H-DISC board as explained in Section 5.2.

5.4.1 FW library package contents

 FW L6474 library – Described in Section 5.4.2.  CMSIS library – /stm32f10x/CMSIS Library used by the L6474 FW library  STM32F10x Standard Peripherals Library Drivers – /stm32f10x/STM32F10x_StdPeriph_Driver Library used by the L6474 FW library  IAR workspace files – /user_motion/project/ewarm6/f wlibraries/easyspin/easyspin.eww - workspace file – /user_motion/project/ew arm6/fwlibraries/easyspin/settings/easyspin.wsdt - workspace settings file – /user_motion/project/ewarm6/f wlibraries/easyspin/discoverykit - directory containing easySPIN discovery board project files and subdirectories – /user_motion/project/ew arm6/fwlibraries/easyspin/discoverykit/Debug/Exe/ - directory containing the *.HEX and *.DFU executable files – /user_motion/project/ewarm6 /fwlibraries/easyspin/pcc009v2 - directory containing PCC009V2 board project files and subdirectories

5.4.2 FW L6474 library description

The FW L6474 library has the following features:  Register read, write and check  Register values conversion  Device configuration  Motion commands  FLAG interrupts management  Button interrupts management  “Daisy Chain” mode The FW L6474 library has been tested on the L6474H Discovery board. The main program contains a commented demonstration sequence which uses most of the FW L6474 library supported features.

Programming section UM1771 At the end of the demonstration sequence, the GPIO connected to LEFT and RIGHT buttons are configured to trigger interrupts on the microcontroller:  On a LEFT button press, the microcontroller starts the motor which will accelerate up to max. speed.  On a RIGHT button press, the microcontroller performs a soft stop of the motor. Even if the “Daisy Chain” mode is supported in the L6474 FW library, the L6474 Discovery board HW does not allow it. Please contact ST support if you want more information on the “Daisy Chain” mode testing or implementation. The FW L6474 library consists of the following files:  user_motion/easyspin/inc/stm32f10x_conf.h Library configuration file  user_motion/ easyspin /src/stm32f10x_it.c Interrupt handlers  user_motion/easyspin/inc/stm32f10x_it.h Header for stm32f10x_it.c  user_motion/easyspin/inc/clock.h System clock setup related header  user_motion/ easyspin/src/clock.c System clock source file  user_motion/easyspin/inc/easyspin.h L6474 definitions header  user_motion/easyspin/inc/eMotionControl.h L6474 definitions header (for motion control routines)  user_motion/easyspin/src/easyspin.c L6474 routines source file  user_motion/easyspin/src/ eMotionControl.c L6474 routines source file (related to motion control)  user_motion/easyspin/inc/easyspin _target_config.h L6474 configuration parameters (this file can be generated by the GUI)  user_motion/easyspin/inc/main.h Main header file  user_motion/easyspin/src/main.c Main program  user_motion/easyspin/inc/pre_include.h First header file included by the preprocessor  user_motion/easyspin/readme.txt Information on the files

5.4.3 Create a project usi ng the FW library package

Using your preferred IDE, create a new project. In project options, properties or settings:  Select for the device, the ST STM32F105xB.  Use the CMSIS library. Edit the preprocessor defined symbols and add:  STM32F10X_CL  USE_STDPERIPH_DRIVER  ST_EASYSPIN_6474H_DISC Edit the preprocessor include directories and add:  $PROJ_DIR$\\… \\… \\…\\…\\…\\…\\stm32f10x\\CMSIS\\CM3 \\DeviceSupport\\ST\\STM32F10x  $PROJ_DIR$\\…\\…\\…\\…\\…\\…\\stm32f10x \\STM32F10x_StdPeriph_Driver\\inc

UM1771 Programming section Edit the “Linker” configuration file:  $PROJ_DIR$\\config\\stm32f10x_flash.icf Where $PROJ_DIR$ is a variable containing the path to the project directory. Add the required library source files:  startup_stm32f10x_cl.s  system_stm32f10x.c  misc.c  stm32f10x_exti.c  stm32f10x_flash.c  stm32f10x_gpio.c  stm32f10x_rcc.c  stm32f10x_spi.c  stm32f10x_tim.c For the debugger, for example, select the ST-LINK and configure it to run to main, to verify download, to use Flash loader and to override the “default *.board” file with the “FlashSTM32F105xB.board”.

6 References

This user manual provides information on the hardware features and use of the EVAL6474H-DISC board along with the demonstration firmware and software. For additional information, refer to the following: 1. STM32F105xx/STM32F107xx datasheet (CD00220364). 2. STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and STM32F107xx advanced ARM ®-based 32-bit MCUs reference manual (RM0008). 3. L647x, L648x and powerSTEP01 family communication protocol (AN4290). 4. Getting started with DfuSe USB device firmware upgrade STMicroelectronics extension (UM0412).

7 Revision history

Table 5. Document revision history 02-Jul-2014 1 Initial release. Updated Figure 4 on page 8 (removed web link). Removed Figure 5. Layout (silk screen) from page 9. Updated Table 3 on page 13 (minor modifications). by “FWGUI”, removed web link). Updated from 1. to 3. in Section 6 on page 36. Minor modifications throughout document.