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.

EK-TM4C123GXL: Driving a stepper with a Tiva Launchpad and DRV8833 using tiduah5 bulletin.

Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: DRV8833, , DRV8833EVM

 Could one of you kind souls please help me. I'm not completely new to uCs but am stumped on returning after a long hiatus. I'm using the Tiva LaunchPad and working through the project TIDUAH5. chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/www.ti.com/.../tiduah5.pdf... . I'm stumped at Page 8, Figure 6. I also have considerable more files than the illustration, after extracting. None seem to be associated with software either. I'm used to loading a project file and having the software fall into place. Here's my screen grab from Explorer. I don't know what Figure 6 is from ? Perhaps Resource Explorer ? I don't know how to get this software loaded and running so I can build and flash it. I'm using Code Composer per bulleting but am used to using Keil.

  • Hi Charles,

      The software collateral for this TI design can be downloaded from https://www.ti.com/tool/download/TIDCB51. See below screenshot. Inside the zip file you will find an installer and follow instructions to install the software. 

    The default install location will be C:\ti\steppermotor-1.0. See below. 

    In CCS, Go to File->Import. See below. Note you must do import, not just a File Explorer directory copy. 

    You will select CCS Projects . See below

    Next provide the path to where the CCS project you want to import from. See below. CCS will automatically discover the project. 

    Once the project is imported, it will appear on your Project Explorer pane. See below. 

  • I'm not sure we are on the same page, sorry. I also don't know what 'software collateral' means. I already have my design and software per my opening remarks. My problem is specific to TIDUA5.pdf. as shown, my files are already installed. I did not download your link or extract it as I did not see any mention of the DRV8833. The TIDUA5 project is the right fit for me.

  • Hi Charles, 

    I already have my design and software per my opening remarks. My problem is specific to TIDUA5.pdf. as shown, my files are already installed.

    I suppose you installed the TivaWare_C_Series-2.1.1.71 version based on TIDUAH5 user's guide. Is that correct?

    First of all, TivaWare_C_Series-2.1.1.71 is a very old version. But that is not the problem we are trying to resolve it here. Once we resolve your current problem, I strongly suggest you migrate to the latest TivaWare SDK which is v2.2.0.195. 

    When you said your files are already installed, what is actually installed? I believe you installed only the TivaWare_C_Series-2.1.1.71 SDK, but not the stepper motor demo example. If you go to C:\ti\TivaWare_C_Series-2.1.1.71\examples\boards\ek-tm4c123gxl, there is no stepper motor demo. Please see below. 

    Regardless which TivaWare version (2.1.1.71 or 2.2.0.295) is installed, the stepper motor demo is not part of the TivaWare SDK.  

    Let's first go through the TIDUAH5.pdf, the user's guide for the demo. As you can see, the stepper motor demo is provided as a separate zip file that you would need to install separately. 

     

    Now, let's go to the https://www.ti.com/tool/TIDM-TM4C123STEPPERMOTOR page for the stepper motor demo. 

    If you go further down the page, you will see the software for the stepper motor demo which is the TIDCB51. This was the software collateral I was referring to in my last reply. If you had not downloaded the stepper motor demo software, then you cannot build the project. 

     

    As for Figure 6, this demo was created a long time ago back in 2015. You will need to adjust many of the link paths. For example, you will need to change to the current CCS version. The latest CCS version is v12 if you are using this version or whatever CCS version you are currently using. v6 is just too old to use. I do not recommend v6 at all. As mentioned earlier, I suggest you download the latest TivaWare SDK version. You will also need to update the link path to the 2.2.0.295 for TivaWare SDK. 

  • Here's my directory with that project in it. As I said, few of the files it seems are associated with anything.

  • Everything is there in my OP. If you look closely, you can see I have V295 of Tivaware installed and all other associated files. Perhaps you scrolled past the OP ??

  • How do I get Figure 6 up ?? And how do I edit those paths.... My CCS is empty right now... 

  • Here's my directory with that project in it. As I said, few of the files it seems are associated with anything.

    I must admit, I missed out the files you mentioned in the directory. Thanks for the clarification.

    How do I get Figure 6 up ??

    Before getting to Figure 6, let me answer your next question about empty CCS. It looks like you may have either created a new workspace called workspace_v12 or you minimized some of the panes. Is that correct? You can restore the panes. See below. Click on those icons on your screen to restore the corresponding panes. 

    if you had created a new workspace, you will not have some of the panes to begin with. You can go to View-> Project Explorer to open a Project Explorer pane. Likewise, you can add other panes. 

    Let's go back to your original post. I think the problem was that some of the  build variables are out of date. The Figure 6 was showing the Linked Resources. To get to Linked Resources, you first right-click on the project, you will see the below menu. Click the Properties at the very bottom. 

    Once you click the Properties, you will see the next screen like below. You will then go under Resources->Linked Resources to see all the Path Variables that are currently defined. Below is my path variables. 

    I'm attaching the stepper motor project that has the build variables fixed up. You can import it to a temporary workspace. I first fixed up some of the system variables under CCS Build->Variables like below. 

    I also updated the Include Options for the search paths to the header files. The demo project hardcoded to CCS6 and an old TivaWare SDK. 

    Here is the project with the variables fixed. I was able to compile it. 

    stepper_motor.zip

     

  • I'm afraid I have 5 errors that prevented me from building this. Unfortunately, I lack the skill to troubleshoot it also. The first errors is suggesting a tivaware file isn't found. I upgraded that to V295 a few days back. Is it being called but you did not change it to 295 ? Any hints on the other errors ? Thanks.

  • Here what the resource links are set to ... 

  • Hi,

      I think the problem is that the demo was trying to link with an old TivaWare driverlib.lib since the demo was created way before 2.2.0.295 was released. This is the reason that it did not find the driverlib.lib at C:\ti\TivaWare_C_Series-2.1.0.12573. Since I have quite a few versions of TivaWare installed on my PC, it was able to find it without errors. Please see below to fix it by using the SW_ROOT variable which is pointing to C:\ti\TivaWare_C_Series-2.2.0.295. You can click on the small icon with 3 dots in it and it will show the full path to the driverlib.lib. 

    Just one general suggestion. I normally recommend customers to first build a simple TivaWare example such as blinky or hello from the latest TivaWare version.  These examples will compile and run out of the box as they have all the correct build variables. Once you get these examples working, you can simply add new files to the project. Let's say you start with a blinky example. You first build it and run it. Make sure you see the LED blinking on the board. Next, you will simply remove the blinky.c file and add all the source files that are for the stepper motor (e.g. stepper_motor.c and etc). Rebuild the project and it should normally compile fine. 

  • I did install Blinky, but I would not think moving the Stepper project ,C files into Blinky would go smoothly.

    I'm not following you on this business of SW_ROOT and the rest. Please keep in mind that you are talking to a Newbie whose only experience was working in Keil before. Once again, here is a screenshot of what I am seeing. I don't see anything to do with SW_ROOT . I also don't understand that popup frame with the hello/ccs portion in the line. Thank you for your patient help but I remain lost .

    ere. 

  • OK ... I just removed this line from the Properties Search Paths  >>>    C:\ti\TivaWare_C_Series-2.1.0.12573\driverlib\ccs\Debug\driverlib.lib

    and added >>>>   C:\ti\TivaWare_C_Series-2.2.0.295\driverlib\ccs\Debug\driverlib.lib

    It compiled fine but I haven't tested it yet. Getting late here. I should be able to clear this tomorrow.

  • Hi Charles,

    OK ... I just removed this line from the Properties Search Paths  >>>    C:\ti\TivaWare_C_Series-2.1.0.12573\driverlib\ccs\Debug\driverlib.lib

    and added >>>>   C:\ti\TivaWare_C_Series-2.2.0.295\driverlib\ccs\Debug\driverlib.lib

      Glad you solve the problem. This is the problem that I was referring to in my last reply. You enter a full path to the driverlib but I was using a variable with SW_ROOT = C:\ti\TivaWare_C_Series-2.2.0.295\ as in ${SW_ROOT}\driverlib\ccs\Debug\driverlib.lib which accomplishes the same thing. If you were to start with any one of the TivaWare examples, all the build variables and system variables would have been setup for you. It will be easier for a user to start with an example and then add additional application specific files. It will make the compile smoothly. 

  • OK... I do have Blinky installed in case I have to resort to it.

    In the meantime, I'm finding that Bulletin TIDUAH5 missing info on both pages 4 and 5. It shows a pictorial of the assembled circuit with colored wires running from the driver to motor on page 5. On Page 4, there is a schematic. Since they want $50 for that Driver board and I am a pauper, I am using just the DRV8833 chip on a breakout at about $2 a pop instead. See photo below.

    My motor has 5 leads and according to the schematic for it, the red is a center tap on both coils, so I intend to leave it out. What I cannot now figure out is the driver output to motor connections because they are not indicated in that document, that I can see and the colors don't match. I'll drop some photos and the motor schematic here. I also have a stepper that looks identical to that shown in the Bulletin illustration, 4 wires, but none of the colors match the bulletin. Odd that Ti would miss putting labels on for these connections and rely on colors only. Would you happen to know what i should do here ? i certainly can ID the separate coils with a ohm test but not the polarities. Thanks again.

    PS : the thing that through me off on the Path Errors was that I did not see the Tivaware being called and didn't anticipate a linker library reference as to be a show stopper if that library isn't called in the code. This would not compile with both paths listed, the old and new versions. I had to remove the old version path to shake off the error.

  • My motor has 5 leads and according to the schematic for it, the red is a center tap on both coils, so I intend to leave it out. What I cannot now figure out is the driver output to motor connections because they are not indicated in that document, that I can see and the colors don't match. I'll drop some photos and the motor schematic here.

    Hi Charles,

      I'm not an expert in DRV8833 as I only support the MCU side. You can find DRV8833 datasheet for details about the connections to the motor. For hardware questions related to DRV8833 connecting to the motor, please open a new thread with the part number DRV8833 so the experts support the product can better assist you. 

  • I think section 3 and 4.1 will also clarify the connection in the EVM user's guide. https://www.ti.com/tool/DRV8833EVM

  • I just bought a NEMA 17 despite having a house full of steppers. Only the Nema 17 has the same colors of wires. I'd still like to know about the missing labels on the output of the DRV8833. I'll try the new motor in a couple hours.

  • The labelling on that drawing does not match the pinouts on my breakout board. See photo above. My motor is apparently rated for 2.72 volts but I am unclear how I'm supposed to get that from a 3.3 and 5 volts power supply. The DRV8833 won't turn on unless it sees 5 volts. My motor vibrates badly now and turns randomly in random directions. I have opened a companion ticket for the DRV8833.

  • Hi

      I will forward your question to the experts supporting DRV8833EVM. 

  • I already opened a ticket for that. I did not have a jumper closed on that tiny board for the enable of the chip, nor did I have any connection or code to pull it high into the enable state. It needs a solder jumper to keep it enabled. Unfortunately my motor now just turns about 90 degrees and stops, so I have to figure that out now. I'm not certain what this motor is supposed to do but assumed constant rotation. I was hoping it would just keep running until i turned it off. I'll have to start going through the code to try and understand why it is stopping after 90 degrees, among other issues. Ideally I would love an opportunity to chat with the Engineer who wrote this up to clear a few things up..

    I have written this off as solved now and I thank you very much for having helped me through to this stage and gotten the initial problems fixed.

  • I'd actually like to talk to whomever wrote this code. It starts in stepper_motor.c with 19 header files. Good grief. Does it have to be this complicated ? It will take me months to figure out this code.

  • Hi Charles,

    I found your other post https://e2e.ti.com/support/motor-drivers-group/motor-drivers/f/motor-drivers-forum/1283425/drv8833-clarification-pin-outs-for-drv8833/4868489?tisearch=e2e-sitesearch&keymatch=DRV8833EVM#4868489. One of my colleagues have responded to you already. I will also follow up with you in the same thread.

    If you have all your MCU related questions sorted out please close this post. Thank you.

    Regards, Murugavel