Analog.com Analog Dialogue Wiki 简体中文
EngineerZone
EngineerZone
  • Log In
  • Site
  • Search
  • User
  • Support

    Popular Forums

    • RF and Microwave
    • Power Management
    • Video
    • FPGA Reference Designs
    • Precision ADCs
    • Linux Software Drivers
    • SigmaDSP Processors & SigmaStudio Dev. Tool

    Product Forums

    • A2B
    • Amplifiers
    • Analog Microcontrollers
    • Clock and Timing
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy Monitoring and Metering
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Processors and DSP
    • Switches/Multiplexers
    • Temperature Sensors
    • Voltage References
    View All

    Application Forums

    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing Library
    • Motor Control Hardware Platforms
    • Optical Sensing
    • Precision Technology Signal Chains Library
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools and Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Reference Designs
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Highlighted Webinar

    Multidimensional Simulations of Beamformers and other RF Integrated Circuits in Keysight SystemVue

    Recent Discussions

    • Issue running built programs on Pluto
    • Activity: Simple Op Amps, For ADALM1000 Fig. 1.3 Buffering example
    • ADALM-PLUTO [NETWORK] vs [USB_ETHERNET]
    • Using buffer size different from 2**n
    • ADALM1000 Pixelpulse feature Source Voltage / Measure Current explanation

    Places

    • ADI Education Home
    • ADI Education China
    • ADI Education India
    • ADI Education Philippines
    • StudentZone (Analog Dialogue)
    • Virtual Classroom

    Latest Webinars

    • Multidimensional Simulations of Beamformers and other RF Integrated Circuits in Keysight SystemVue
    • Improve Smart Building Energy Efficiency with Industrial Ethernet Controlled Air Conditioning (HVAC) Systems
    • Sustainable Motion Control Solutions for High Performance Servo Drives
    • Audio Design Solutions for Augmented and Virtual Reality (AR/VR) Glasses
    • Robust Industrial Motor Encoder Signal Chain Solutions
    View All Webinars
  • Community Hub

    Challenge Yourself!

      KCC's quizzes AQQ235 about a bipolar common emitter amplifier - a kind proposal from our colleague Martin Walker
    View All

    Places

    • Community Help
    • Logic Lounge

    Resources

    • EZ Code of Conduct
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • Blogs

    Highlighted Blogs

    Hardware Holds The Key To Making Industrial Systems IEC 62443 Compliant

     

    Behind the Scenes of DIYRadio Blogs: An Introduction

    Latest Blogs

    • Empowering Surveillance Cameras To Capture A Scene Without Being Heard
    • Mastering The Metrics Makes Specifying Encoders Simpler
    • Understanding Secret Key Cryptography Without Formulas
    • 3 Reasons Why IO-Link is Changing Smart Factory Decision Making
    • EMC Mitigation: The Finer Points of Ferrite Beads
    Read All Blogs

    ADI Blogs

    • EZ Spotlight
    • The Engineering Mind
  • Partners

    Electronic Design Services - PartnerZone

    • Boston Engineering
    • Calian, Advanced Technologies
    • Colorado Engineering Inc. (DBA CAES AT&E)
    • Clockworks Signal Processing
    • Epiq Solutions
    • Fidus
    • PalmSens
    • Richardson RFPD
    • Tri-Star Design, Inc.
    • VadaTech
    • Vanteon
    • X-Microwave
    View All
Motor Control Hardware Platforms
Motor Control Hardware Platforms
Documents Sample C Code for EV-MCS-LVDRV-Z (FlexMC LV) platform
  • Blogs
  • Forums
  • FAQs/ Docs
  • Members
  • Tags
  • More
  • Cancel
  • Documents
  • +ADIMonitor: FAQ
  • +CM40x: FAQ
  • -Code Examples: FAQ
    • ADSP-CM40x Encoder example
    • ADSP-CM40x PWM example
    • ADSP-CM40x Software Enablement Package v2.0.0
    • ADSP-CM40x SW Enablement Package ver. 1.2.0
    • Getting Started with the EV-MCS-ISOINVEP-Z Platform
    • Sample C Code for EV-MCS-LVDRV-Z (FlexMC LV) platform
    • Sample C code for Isolated Inverter Platform (EV-MCS-ISOINV-Z)
  • +HPPWM: FAQ
  • +Motor Control: FAQ
  • +Platform Schematics: FAQ

Sample C Code for EV-MCS-LVDRV-Z (FlexMC LV) platform

The attached zip file contains an IAR Embedded Workbench project with sample C code that can be loaded on to an ADSP-CM408 EZkit for development of a motor control application. The sample code contains an open loop Volts/Hertz algorithm that can be run in conjunction with the EV-MCS-LVDRV-Z motor control platform. The Windows Graphical User Interface (and associated user guide) found here can be used to get a motor up and running with the boards. The ADI Software Enablement (SWE) Package, to which the user guide refers, must also be downloaded and installed.


The following should be noted:

LED1 on EZkit flashing regularly - motor control algorithm is running

LED2 on EZkit is ON - PWM trip has occurred due to overcurrent. Press 'Stop' on the GUI to send a Stop Motor command. This should reset the error, and the LED should turn off.

The following Project Options also need to be set in IAR Embedded Workbench:

General Options->Target->Device=AnalogDevices ADSP-CM40z-384_2048 (will only be visible after the ADI SWE has been installed). On same tab an FPU must be selected

General Options->Library Configuration- Select Use CMSIS and DSP Library

C/C++ Compiler->Preprocessor->Additional include directories

C:\Analog Devices\ADSP-CM40x\CM403F_CM408F_EZ-KIT\inc

C:\Analog Devices\ADSP-CM40x\CM403F_CM408F_EZ-KIT\inc\sys

C:\Analog Devices\ADSP-CM40x\CM403F_CM408F_EZ-KIT\src

$PROJ_DIR$\..\MotorControl\

$PROJ_DIR$\..\System\

$PROJ_DIR$\..\Measure\

$PROJ_DIR$\..\ADIMonitorLibrary\inc\

On the same tab: Defined symbols

ARM_MATH_CM4

Linker->Library->Additional libraries

C:\Analog Devices\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\debug\libdrv40z.a

C:\Analog Devices\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\debug\libosal40z_noos.a

C:\Analog Devices\ADSP-CM40x\CM403F_CM408F_EZ-KIT\lib\iar\debug\libssl40z.a

$PROJ_DIR$\..\ADIMonitorLibrary\lib\ADI_Monitor_Library.a

Linker->List- Select Generate linker map file

Options->Debugger->Download- Select Use flash loader

Options->Debugger->J-Link/J-Trace->Setup -Select Connect during reset

Options->Debugger->J-Link/J-Trace->Connection - Select SWD

Attachments:
7485.OpenLoopSampleCode.zip
  • motor drive
  • Code Examples
  • adsp-cm40xx
  • motor_control
  • motor control
  • Share
  • History
  • More
  • Cancel
Related
Recommended
Social
Quick Links
  • About ADI
  • ADI Signals+
  • Analog Dialogue
  • Careers
  • Contact us
  • Investor Relations
  • News Room
  • Quality & Reliability
  • Sales & Distribution
  • Incubators
Languages
  • English
  • 简体中文
  • 日本語
Newsletter

Interested in the latest news and articles about ADI products, design tools, training and events? Subscribe today!

Sign Up
Analog Logo
©1995 - 2023 Analog Devices, Inc. All Rights Reserved
沪ICP备09046653号-1
  • Sitemap
  • Legal
  • Privacy & Security
  • Privacy Settings
EngineerZone Uses cookies to ensure you get the best experience in our community. For more information on cookies, please read our Privacy & Security Statement.