This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8412 C2 KIT - Running the stepper motor in standalone mode

Other Parts Discussed in Thread: CONTROLSUITE

Hi All,

I've had no problem to run the GUI however when I try to run the standalone version of the example code provided the motor wouldn't turn.

I've set the EnableFlag to true and I can hear the motor noise but nothing else happens.

I've tried build level 2 and 3 but makes no difference.

There must be something else needs to be set which I'm not aware of.

Regards

Tibor 

Stepper.c
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* ==============================================================================
System Name: Stepper
File Name: Steper.C
Description: Primary system file for the Real Implementation of Stepper
Motor
Originator: Digital control systems Group - Texas Instruments
Note: In this software, the default inverter is supposed to be DRV8412 kit.
=====================================================================================
History: 07-28-2010 Version 1.0: Initial Release
================================================================================= */
// Include header files used in the main function
#include "PeripheralHeaderIncludes.h"
#include "IQmathLib.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Tibor,

    Unfortunately, I am not familiar with this code and documentation.
    Can you point me to the documentation that describes running the standalone version of the example code?

    Thanks.
  • Hi Rick,

    All the information I have comes from the ControlSuite module in CCS.

    There is no specific "how to" for the Micro Stepping project. There is a document however for the GUI version.

    Kind Regards

    Tibor

  • Hi Tibor,

    Thanks for the info. Did you set the SpeedRef(Q24) value? This is listed on page 12 of the Microstepping document ("Level 1 Incremental Build").

    When you say run standalone, do you mean without CCS also? At best, the code appears to require CCS.
  • Hi Rick,

    I did change the SpeedRef (default is 0.0) and the motor started spinning.

    I've also managed to get stepper.c run standalone with no XDS100v1 interaction.
    Modifications were:
    Stepper-Settings.h
    - Change BUILD LEVEL to LEVEL3 or LEVEL2
    - Change MICROSTEP_64 or MICROSTEP_128 (motor provided in the kit runs better)

    Stepper.c
    - Change SpeedRef (eg. 127.0 from 0.0 )
    - Change EnableFlag to TRUE

    Link in DSP2803x_CodeStartBranch.asm (Located in the GUI_project folder)

    After downloading the code remove power and set SW3 to OFF position (switch goes up, releasing TRSTn)
    Powering up the the mainboard should result the card boot from FLASH and execute the code and the motor start spinning.

    However I still don't quiet understand how the asm code make its way trough the linker and gets compiled in. It's probably basic knowledge in the toolchain workflow and belongs to the CCS thread.

    Thanks for helping me out Rick,

    Tibor
  • Hi Tibor,

    You are welcome. Glad to hear you have it running.

    As you mentioned, the Code Composer Studio forum is the best place to discuss the operation of CCS.
  • Hi Tibor,

    How do you adjust speed of motor run ?
    I've applied same as you above. But the motor runs same low speed though I change SpeedRef.
    What did you to change to vary the speed of motor in the Stepper project source file ?

    Thanks,