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.

Problem connecting XDS100V2 to Piccolo TMS320F28027 (TMDSCNCD28027F)

Other Parts Discussed in Thread: MOTORWARE, UNIFLASH, CCSTUDIO, TMS320F28027, DRV8312, TMDSCNCD28027F

Hi,

I wish to evaluate InstaSPIN with Piccolo MCU, I was given the following setup:
Windows 7 Pro x64, CCS 5.4.0, XDS100v2Piccolo 28027 controlCARD, DRV8312EVM RevD driver board.

I am having problem launching debug session using MotorWare example projects.

I imported the projects under C:\ti\MotorWare\MotorWare_1_01_00_09\sw\solutions\instaspin_foc\boards\drv8312kit_revD\f28x\f2802xF\projects\ccs5 and tried to launch debug session but got the follow error message (with verbose output enabled under Debug configurations>Target>F28027 Flash Settings).

C28xx: Writing Flash @ Address 0x003F16BF of Length 0x00000035
C28xx: Erasing Flash Sector A
C28xx: Finish Writing Flash @ Address 0x003F16BF of Length 0x00000035
C28xx: Writing Flash @ Address 0x003F0000 of Length 0x000016BF
C28xx: Erasing Flash Sector A
C28xx: Flash Programmer: Error encountered when writing to flash memory
C28xx: Error Writing Flash @ Address 0x003F0000 of Length 0x000016BF
C28xx: GEL: File: C:\ti\MotorWare\MotorWare_1_01_00_09\sw\solutions\instaspin_foc\boards\drv8312kit_revD\f28x\f2802xF\projects\ccs5\proj_lab01\Debug\proj_lab01.out: Load failed.

Launching debugging session with "Load symbol only" option (in Debug configurations>Program) selected is having no problem.

Using UniFlash to Erase the flash sectors returned the following error:

[16:47:18] ERROR >> C28xx: Flash Programmer: Error erasing flash memory. Flash operation timed out waiting for the algorithm to complete. Operation cancelled.

[16:47:19] Flash operation Erase failed on core Texas Instruments XDS100v2 USB Emulator/C28xx .

The DIP switches on the controlCARD is currently set to below (as in the hardware guide):
SW2: DOWN-UP
SW3: UP-DOWN
SW4: DOWN-UP
BOOT: UP-UP

Is there anything wrong with my setup? Both the controlCARD and XDS100v2 are newly bought.

Thank & regards,.

chancsy

  • Soon,

    "Launching debugging session with "Load symbol only" option (in Debug configurations>Program) selected is having no problem."

    The program runs correctly when you load the symbols and run it from CCStudio? This implies that there is a valid MotorWare built project in flash.

    Are you trying to run the projects with JTAG connected or in standalone from flash mode?

    I haven't had any issue using the exact same set-up: CCS with USB-XDS100v2-JTAG-DRV8312-F28027F controlCARD with same switch settings.

    Can you try downloading the new version _10 and seeing if the new default configurations help?

  • Hi Chris,

    I failed to mention that I was using CCS 5.5 at first, but upon building I received 'user.h' not found error, which I rectified by adding an include path pointing to 'user.h' directory. In the first few tries I was able to launch the debugging successfully for 2/3 times (load programs and symbols), stepped few steps but not able to step over the DRV_INIT(), it went to "no disassembly found" state. I could not recall the message now since I am no able to launch any debugging session.

    Later I changed back to CCS 5.4, and the project can be built without any warning/error. I only managed to get the debug session launched for a single time, but with the same outcome (not manage to get pass DRV_INIT()). Now, it fails upon flash erase step.

    It is good to know that I am using the correct projects & settings for my set-up. BTW, I am feeding +15V to the driver board, +5V and +3.3V are measured JP2 & JP3 on the DRV8312-EVM.

    I chose to load symbol only just to verify debugger-CPU connection. I am trying to run the projects with JTAG connected. I have yet to test with the new version, will post my findings later.

    Thank & regards,

    chancsy

  • Soon,

    You shouldn't have to point to the user.h  

    I'm thinking that something isn't getting built properly into your build.

    1. Did you install MotorWare into the default directory? 

    2. Did you copy the projects into your workspace?  Don't do this. We recommend working directly out of the installation directory C:\ti\motorware\motorware_1_01_00_10

    I recommend starting fresh.

    Download MotorWare version 10, install into default directory.

    Open CCS and start a new workpace.

    Import the projects and DO NOT COPY into workspace.

    You should have NO trouble at this point.

  • 1. Did you install MotorWare into the default directory?
    Yes

     2. Did you copy the projects into your workspace?  Don't do this. We recommend working directly out of the installation directory C:\ti\motorware\motorware_1_01_00_10
    No

    There wasn't any warning/error, now that I changed to MotorWare _10, CCS 5.5 with compiler v6.2.3, it built fine as in CCS 5.4.

    I set up debug configurations according to this, but the same problem persists (error writing to flash memory).
    (Connection: Ti XDS100v2 USB Emulator; Device: TMS320F28027).

  • Soon,

    I just tried to duplicate your issue.

    DRV8312 Rev D
    TMDSCNCD28027F with switches in the default position (same as you)
    XDS100v2 external emulator
    MotorWare _10, proj_lab2b
    Build Configuration is Active - Flash

    using Target Config C:\ti\motorware\motorware_1_01_00_10\sw\ide\ccs\ccs5\targetConfigs\TMS320F28027_xds100v2.ccxml

    Built, connected, and loaded just fine.

    When you load the .out does it erase the flash or immediately give an error? It's possible you accidently locked the device at somepoint.


     

     

  • Hi Chris,

    I just found out my emulator is not TI's XDS100v2, but from Spectrum Digital, I believe it should work with C28xx families but the bad news is the board is defective (R15 & U8 are not in place). Due to the orientation of the setup I only got to see the bottom of the board at all time and not able to notice that earlier.

    Image of the emulator

    Thanks for all the help, will update you when I got my replacement emulator.

    Sincerely,
    Soon Yet Chan

  • Hi Chris,

    Looks like the 28027 MCU is indeed locked/damaged, I replaced the MCU and it connects & debugs now.

    And for the emulator, it's indeed XDS100v2 from Ti. I just got confused because it looks different from the picture on Ti's website. It's enumerated as TI XD100 Channel A & B in device managers.