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.

DRV8316REVM: Trouble getting universal motor control lab project running

Part Number: DRV8316REVM
Other Parts Discussed in Thread: MCF8316A, , LAUNCHXL-F280049C, DRV8316, TMS320F280025C, TMS320F280049C, LAUNCHXL-F280025C

After abandoning the MCF8316A due to continued frustrating issues I've decided to try the DRV8316R with InstaSPIN sensorless FOC code running on a C2000. I'm interested in trying both FAST and eSMO position estimation schemes.

I bought a DRV8316REVM and a LAUNCHXL-F280049C which I believe to be compatible with each other and with the Motor Control SDK based on reading the Motor Control SDK Universal Project and Lab document (SPRUJ26). I have followed the instructions there as best I could and am running into trouble getting the level 1 incremental build going. I have successfully imported the project into CCS, set the target configuration to LaunchPad, and the build configuration to Flash_lib_DRV8316RT. The only change I made to any of the files is setting DMC_BUILDLEVEL to DMC_LEVEL_1 in sys_settings.h. I am then able to build the project and it completes successfully with no errors.

I plug in the USB cable, supply 16V to the DRV8316 board, and hit debug in CCS. It proceeds through several steps then gets stuck on a loading bar labeled "GEL Expression: OnTargetConnect()". On the LaunchPad board LED3 comes on blue when I give it power, then LED2 comes on blue after I start the debug right before the GEL Expression bar pops up. I can't find any helpful resources on how to get past this.

It's probably relevant that the first time I tried to debug I got a message that the XDS110 needed a firmware update. I clicked update but it failed somehow and spit out a message about using the xdsdfu utility to flash the firmware. I went to C:\ti\ccs1200\ccs\ccs_base\common\uscif\xds110 and followed the instructions in the PDF, running the commands:

xdsdfu -m

xdsdfu -f firmware_3.0.0.20.bin -r

It appeared to work. Going back into CCS and trying to debug gives me the GEL Expression lockup I described above. If I hit cancel on that loading bar I get the following in the CCS console:

C28xx_CPU1: GEL: Error while executing OnTargetConnect(): Evaluation canceled
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ...
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: GEL Output: ... DCSM Initialization Start ...
C28xx_CPU1: GEL Output: ... DCSM Initialization Done ...
C28xx_CPU1: Warning: Failed unlocking device (zone 1) after reset.
C28xx_CPU1: Warning: Failed unlocking device (zone 2) after reset.
C28xx_CPU1: Error occurred during flash operation: Unable to get file info from algorithm
C28xx_CPU1: Error occurred during flash operation: No algorithm has been loaded in which to look up "_exit"
C28xx_CPU1: Error writing the init algorithm. Flash algorithm returned error code. Operation cancelled.
C28xx_CPU1: File Loader: Memory write failed: Unknown error
C28xx_CPU1: GEL: File: C:\Users\mtuell\workspace_v12\universal_motorcontrol_lab_f28002x\Flash_lib_DRV8316RT\universal_motorcontrol_lab_f28002x.out: Load failed.
C28xx_CPU1: Error occurred during flash operation: Unable to get file info from algorithm
C28xx_CPU1: Error occurred during flash operation: No algorithm has been loaded in which to look up "_exit"

It continues to have this behavior until I hard reset the LaunchPad board which puts it back to the GEL Expression lockup.

Am I doing something wrong? Did I mess up the firmware update and brick the LaunchPad? Is there an easier way to get this dev kit running? Maybe a GUI of some kind.

Thanks,

Mitcham

  • Hi Mitcham,

    Thanks for posting your question to e2e motor drivers forum

    our team will review your question and aim to provide a response next week 

    Best Regards, 
    Andrew 

  • Hi Mitcham,

    I am forwarding this to the C2000 team for support with the Universal Motor Control lab. 

    Thanks,
    Aaron

  • You may take a look at the application note as below, and follow the steps to check and connect the JTAG debugger.

    C2000 MCU JTAG Connectivity Debug (Rev. Ahttps://www.ti.com/lit/pdf/spracf0

  • Okay, I got past this problem. Turns out I had to open TMS320F280025C_LaunchPad.ccxml and check the box for TMS320F280049C since that is what my LaunchPad board is. The default was TMS320F280025C as the name suggests. In fact, the whole project is named f28002x - does that mean it won't work for the -49 version?

    After changing that checkbox I was able to debug and get the code loaded onto the dev board. It stops at the top of main() as expected, then I hit resume and it appears to be running. I imported the full list of Expressions as covered in the guide section 2.5.1.2 point #2. They all show up in the Expressions window and they all read a default value when I run the code. However, none of them update at all while the code is running. They just stay at zero. I tried changing systemVars.flagEnableSystem and motorVars_M1.flagEnableRunAndIdentify to 1 instead of 0 but it has no effect.

    The motor outputs are not showing PWMs.

    Any ideas? Is the project compatible with F280049C parts?

  • In fact, the whole project is named f28002x - does that mean it won't work for the -49 version?

    Correct. You need to follow the lab guide to change and replace some files related to the device for F28004x.

    Any ideas? Is the project compatible with F280049C parts?

    You may take a look at the schematic of the LAUNCHXL-F280049C, and change the GPIO, ADC, PWM and CMPSS configuration codes in the hal.c and hal.h.

    Recommend that you may use the LAUNCHXL-F280025C directly if you just want to evaluate this lab for motor control.