Microsemi UG0648 Motor Control Libero Project User Guide

June 9, 2024
Microsemi

Microsemi-LOGO

Microsemi UG0648 Motor Control Libero Project

Microsemi-UG0648-Motor-Control-Libero-Project-PRODUCT

Revision History

Revision 3.0

  • There were no changes to the technical content in revision 3.0 of this document.

Revision 2.0

  • The following is a summary of the changes in revision 2.0 of this document.
  • Updated the Opening the Libero Project, page 3 section for the updated screen shots (SAR 80524).
  • Added the Downloading Cores from Libero, page 4 section (SAR 80524).
  • Updated the Importing Cores, page 4 section for download feature (SAR 80524).
  • Added BLDC Sensorless and Stepper Motor Project, page 12, BLDC Encoder Project, page 13, and BLDC with Hall Project, page 14 (SAR 80524).

Revision 1.0

  • Revision 1.0 was the first publication of this document.

About this Guide

Purpose

  • This document familiarizes users with the motor control design in the Libero® System-on-Chip software user guide. It describes the steps for importing cores, running the design, editing I/O constraints, editing timing, and describes the motor control project.

Intended Audience

  • This document is not a complete Libero software user guide. It is intended for users who are unfamiliar with the Libero SoC tool to get started with motor control design.

Reference

Download the Motor Control project.

Running the Libero Project

  • This section describes how to run the motor control project in Libero.

Opening the Libero Project

  • The following steps describe the procedure for opening the libero project:
  1. Launch the installed Libero software.
  2. To open the downloaded project, click Project -> Open Project; browse to the location and select the project file as shown in the following figure and click Open.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-1
    • A pop-up appears, as shown in the following figure.
  3. Click Dismiss, and the Libero window is ready for use.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-2
  • The Log window displays error messages of missing cores as shown in the following figure. These cores can be directly downloaded from Libero or can be imported from the downloaded contents.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-3

Downloading Cores from Libero

  • The following steps describe how to download IP cores from Libero SoC:
  1. Click the Catalog tab, as shown in the following figure. If the IP cores are not already available in the Libero SoC vault, they are displayed in grey.
  2. Select all the Motor Control IP cores by clicking on each of them holding the Ctrl key. Right-click the selected IP cores and click Download to download the cores.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-4

Importing Cores

  • The motor control IP cores can also be imported from the downloaded folder.
  • Note: It is recommended to download the IP cores directly from Libero SoC as it has the latest version of cores.
  1. Click the Catalog tab as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-5
  2. On the top right corner of the screen, click Settings. In the drop-down list, click Add core to the vault.
  3. In the following screen, browse to the cores folder (unzipped from the downloaded file). Select all the *.cpz files, and then click Open. After importing the files successfully, a message appears as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-6
  4. After the cores are imported, the Catalog tab must resemble the following figure. Expand the Solutions-MotorControl tab to view the cores.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-7
Running the Motor Control Design

The following steps describe how to verify the source directory for the eNVM content (.hex file).

  1. In the Design Flow tab, double-click Update eNVM Memory Content as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-8
    • This opens the eNVM Update Tool pop-up window as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-9
  2. In the eNVM Update Tool window, select the User Client (MSS_data) by clicking on it. Then click Edit.
    • This opens the “Modify Data Storage Client” pop-up window as shown in the following figure.
  3. In the “Modify Data Storage Client” window. Click Browse, select .hex file from: project folder -> SoftConsole -> Motor_Control_5_1_0 -> Motor_Control_sb_MSS_CM3_app -> Release (Motor_Control_sb_MSS_CM3_app.hex). Click Ok to close the “Modify Data Storage Client”, and click Ok again to close the eNVM Update Tool window.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-10
  4. Connect FlashPro4 to the board and switch ON the switch SW2.
  5. In the Design Hierarchy tab, double-click Run PROGRAM Action to program the device as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-11
  6. If the programming is successful, it is indicated by a green mark as shown in the following figure. The motors can be run using the GUI as described in the DG0598: SmartFusion2 Dual-Axis Motor Control Starter Kit Demo Guide.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-12

Project Description

Select the Design Hierarchy tab as shown in the following figure. This window shows various modules in the design. The module in bold is the root as shown in the following figure. Generally, the root module and other modules listed under root module are synthesized.Microsemi-UG0648-Motor-Control-Libero-
Project-FIG-13

BLDC Sensorless and Stepper Motor Project

The following steps describe how to create a BLDC sensorless and stepper motor project:

  1. Double-click the MC_System_top. The SmartDesign tab opens with MC_System_top, which instantiates the BLDC Axis, Stepper Axis and MC_System block as shown in the following figure. The MC_System block contains the microcontroller subsystem (MSS).Microsemi-UG0648-Motor-Control-Libero-Project-FIG-14
  2. In the Design Hierarchy tab, expand the MC_System_top to show the modules instantiated under the module and double-click Bldc_Axis to open the Bldc_Axis module, as shown in the following figure. Alternatively, double-click Bldc axis in the SmartDesign window to open the Bldc_Axis module. The Bldc_Axis tab is displayed with the visual connections of the blocks instantiated within the Bldc_Axis.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-15
  3. Refer to AC445: Motor Control Design using SmartFusion2/IGLOO2 Devices Application Note for more information on BLDC Sensorless and Stepper Motor Project.
BLDC Encoder Project

The following steps explain how to create a BLDC encoder project:

  1. Double-click MC_System_top on the left. The MC_System_top tab is displayed on the right with the design, which instantiates the BLDC Encoder Axis and MC_System blocks, as shown in the following figure. The MC_System block contains the microcontroller subsystem (MSS).Microsemi-UG0648-Motor-Control-Libero-Project-FIG-16
  2. In the Design Hierarchy tab, expand the MC_System_top to show the modules instantiated under the module and double-click BLDC_Encoder_Axis, as shown in Figure 18. Alternatively, DoubleClick
    • BLDC_Encoder_Axis in the SmartDesign window to open the BLDC_Encoder_Axis module.
    • The BLDC_Encoder_Axis is displayed with the visual connections of the blocks instantiated within Bldc_Encoder_Axis.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-17
BLDC with Hall Project

The following steps enable to create of a BLDC with a hall project:

  1. Double-click MC_System_top on the left. The SmartDesign tab opens with MC_System_top on the right, which instantiates the BLDC_HALL_Axis and MC_System blocks, as shown in the following figure. The MC_System block contains the microcontroller subsystem (MSS).Microsemi-UG0648-Motor-Control-Libero-Project-FIG-18
  2. In the Design Hierarchy tab, expand the MC_System_top to show the modules instantiated under the module and double-click BLDC_HALL_Axis to open, as shown in the following figure. Alternatively, double-click BLDC_HALL_Axis in the SmartDesign window to open the BLDC_HALL_Axis module. The BLDC_HALLAxis tab is displayed with connections of the blocks instantiated within BLDC HALL_Axis.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-19
Description of Interfacing IPs
  • The APB3_IF block acts as a bridge between the MSS and the FPGA fabric blocks. Several parameters are computed in the MSS based on GUI inputs and passed to the fabric. This feature allows the designer to modify parameters without rerunning the FPGA flow. The fabric sends internal variables to the MSS for visualizing them in a GUI and debugging the design. The APB3 interface block is shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-20
  • The ADC interface block provides multi-bit data from an ADC device SPI port. It acts as an SPI master, while the ADC device works as a slave, providing motor current information to other blocks in the control algorithm. It also allows the designer to select the number of channels and the clock divider to provide the SPI clock (SCK). The ADC measurement block is shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-22
  • The three-phase Pulse width modulation (PWM) generation block generates three independent channels of complementary PWM, with features like configurable PWM period, dead time, and delay time.
  • These parameters are configured from the MSS through the APB3 interface. Depending on the driver device, complementary PWMs can be used. The three-phase PWM block is shown in the following figure.
  1. In the Design Hierarchy window, double-click the Stepper Axis tab to open the Stepper Motor SmartDesign tab. It shows the interconnection between the blocks used in the stepper design. The Stepper design uses the ADC interface and uses two phases of the three phase PWM block.
  2. To configure an IP block, double-click IP Block. A configuration window appears, which allows the designer to modify port widths and other constants. For example, if the FOC_Transforms block is to be configured, double click the foc_transforms_0 block. A configurator window opens, as shown in the following figure. For further information, refer individual IP user guides at http://www.microsemi.com/applications/motor-control#resources.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-23
  3. IP blocks are available as modules in the Project Catalogue for use in SmartDesigns. Select an IP in the catalog and drag it into a SmartDesign to instantiate the IP.
  4. Drag SmartDesign blocks into other SmartDesign modules to re-instantiate them.
  5. To re-use other modules (from other HDL files), identify the module in the Design Hierarchy tab and drag it into the required SmartDesign tab. In case the module must be re-used with different configuration settings in each instantiation, the module needs to be converted to SmartHDL. To convert a module into SmartHDL, right-click the module in the Design Hierarchy tab and click Create Core from HDL as shown in the following figure, and then drag the block into the desired places.

Note : SmartHDL files are represented with a symbol.

Modifying the Design

This section describes editing I/Os to run the design on a different board, editing timing constraints, and viewing reports generated by Libero SoC.

Editing I/O Configuration

The following steps describe the process of editing I/O configuration:

  1. Click the Design Flow tab.
  2. Use one of the following methods to edit I/O constraints:
  • Edit the I/O constraints .pdc file to edit the pin map, by clicking the constraint file, as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-25
  • Double-click I/O Constraints under Edit Constraints, as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-26
  • The I/O Editor window is displayed, as shown in the following figure. You can assign or re-assign device pins and modify the drive strength in a GUI window. After changing the configuration, click Commit and Check, as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-27
Editing Timing Constraints

The following steps describe how to edit timing constraints:

  1. Use one of the following methods to edit I/O constraints:
  • Edit the Timing constraints file (.sdc) shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-28
  • Double-click Timing Constraints as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-29
  • This opens a GUI (SmartTime) to edit timing Constraints as shown in the following figure.
Generating and Viewing Reports
  1. In the Menu bar, click Design -> Reports as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-30
  2. This opens the Reports tab, which contains all the reports generated while running the design, as shown in the following figure.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-31
  3. The resource utilization can be viewed in the compiled report. It helps analyze and decide:
  • Whether or not the design fits the device.
  • If any additional logic can be added to the existing design.
  • Whether or not the design can fit into a smaller device.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-32
  1. The timing report (resulting from Verify Timing) shows the minimum and maximum delay analysis. This delay analysis helps determine if the design will work without errors for the given clock constraint.Microsemi-UG0648-Motor-Control-Libero-Project-FIG-34
  • Microsemi makes no warranty, representation, or guarantee regarding the information contained herein or the suitability of its products and services for any particular purpose, nor does Microsemi assume any liability whatsoever arising out of the application or use of any product or circuit. The products sold hereunder and any other products sold by Microsemi have been subject to limited testing and should not be used in conjunction with mission-critical equipment or applications. Any performance specifications are believed to be reliable but are not verified, and Buyer must conduct and complete all performance and other testing of the products, alone and together with, or installed in, any end-products. Buyer shall not rely on any data and performance specifications or parameters provided by Microsemi. It is the Buyer’s responsibility to independently determine suitability of any products and to test and verify the same.
  • The information provided by Microsemi hereunder is provided “as is, where is” and with all faults, and the entire risk associated with such information is entirely with the Buyer. Microsemi does not grant, explicitly or implicitly, to any party any patent rights, licenses, or any other IP rights, whether with regard to such information itself or anything described by such information. Information provided in this document is proprietary to Microsemi, and Microsemi reserves the right to make any changes to the information in this document or to any products and services at any time without notice.

About Microsemi

  • Microsemi Corporation (Nasdaq: MSCC) offers a comprehensive portfolio of semiconductor and system solutions for aerospace & defense, communications, data center and industrial markets. Products include high-performance and radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs and ASICs; power management products; timing and synchronization devices and precise time solutions, setting the world’s standard for time; voice processing devices; RF solutions; discrete components; enterprise storage and communication solutions, security technologies and scalable anti-tamper products; Ethernet solutions; Power-over-Ethernet ICs and midspans; as well as custom design capabilities and services.
  • Microsemi is headquartered in Aliso Viejo, California, and has approximately 4,800 employees globally. Learn more at www.microsemi.com.
  • Microsemi Corporate Headquarters One Enterprise, Aliso Viejo,
  • CA 92656 USA
  • Within the USA: +1800-713-4113 Outside the USA: +1 949-380-6100 Fax: +1 949-215-4996
  • Email:[email protected]
  • www.microsemi.com
  • © 2016 Microsemi Corporation. All rights reserved. Microsemi and the Microsemi logo are trademarks of Microsemi Corporation. All other trademarks and service marks are the property of their respective owners.

Documents / Resources

| Microsemi UG0648 Motor Control Libero Project [pdf] User Guide
UG0648 Motor Control Libero Project, UG0648, Motor Control Libero Project, Control Libero Project, Libero Project
---|---

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Microsemi User Manuals

Related Manuals