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.

CCS/DRV8301-HC-C2-KIT: problems seeing source code in debug perspective

Part Number: DRV8301-HC-C2-KIT
Other Parts Discussed in Thread: CONTROLSUITE, DRV8301

Tool/software: Code Composer Studio

Hi I am trying to work though a controlSuite project using a dev kit but running in to an issue that I hope someone might be able to shed some light on.


I have a DRV8301-HC-EVM Rev D with a DRV8301 control card

I am using CCS7 (7.2.0.00013)

I am following the instructions from Control Suite in:
        DRV8301-HC-C2-KIT_HWGuide.pdf
and
        DRV8301-HC-C2-KIT_HowToRunGuide.pdf

I have defined a target configuration as instructed

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configurations XML_version="1.2" id="configurations_0">
<configuration XML_version="1.2" id="Texas Instruments XDS100v1 USB Debug Probe_0">
<instance XML_version="1.2" desc="Texas Instruments XDS100v1 USB Debug Probe_0" href="connections/TIXDS100usb_Connection.xml" id="Texas Instruments XDS100v1 USB Debug Probe_0" xml="TIXDS100usb_Connection.xml" xmlpath="connections"/>
<connection XML_version="1.2" id="Texas Instruments XDS100v1 USB Debug Probe_0">
<instance XML_version="1.2" href="drivers/tixds100c28x.xml" id="drivers" xml="tixds100c28x.xml" xmlpath="drivers"/>
<instance XML_version="1.2" href="drivers/tixds100cla.xml" id="drivers" xml="tixds100cla.xml" xmlpath="drivers"/>
<platform XML_version="1.2" id="platform_0">
<instance XML_version="1.2" desc="TMS320F28035_0" href="devices/f28035.xml" id="TMS320F28035_0" xml="f28035.xml" xmlpath="devices"/>
</platform>
</connection>
</configuration>
</configurations>

- testing this with the "TestConnection" button proves successful when I have provided 24V to the EVM board

Scan tests: 6, skipped: 0, failed: 0
All of the values were scanned correctly.
The JTAG DR Integrity scan-test has succeeded.


Thus I believe I have the hardware correctly configured (e.g SW3 is ON )

I am trying the PM Sensorless project and I have set the Active Build Configuration to DRV8301_F2803x_RAM.

The compilation succeeds at BUILD_LEVEL 1 with only two warnings.

"build attribute vendor section TI missing in"
"This project was created using a version of compiler that is not currently installed - 5.2.10 [C2000]. Another version of the compiler will be used during build - 16.9.3.LTS."

- i suspect these might be due to the age of the reference code

When I hit debug:

  • the persepctive changes
  • The code appears to load (from the updating windows shown)
  • However I am not persented with any code to step through:

PM_Sensorless [Code Composer Studio - Device Debugging]
Texas Instruments XDS100v1 USB Debug Probe_0/C28xx (Suspended - SW Breakpoint)
0x3FF599 (no symbols are defined)
Texas Instruments XDS100v1 USB Debug Probe_0/CLA_0 (Disconnected : Unknown)

watching the disassembler it is simply alternating between two lines:

3ff599: 7625 ESTOP0
3ff59a: 6FFF SB -1, UNC

I would be grateful for any suggestions as to anything I might have missed? or for recommendations as to how to debug this and proceed?

Kind regards,

- Richard

  • I notice that I CAN load, see source and execute the InstaSpin GUI project.

    The only difference I can ascertain is that this project requires the DSP flash

    I have tried manually erasing the flash to see if that encouraged that PM Sensorless project to work - but to no avail

    Thanks for any advice.

    Best regards,

    - Richard 

  • Hi Richard,

    If you go to Run->Load->Load Program and load the PM_Sensorless application that way, does it go to main()? If you hit the Reset and Restart buttons does it go to main()?

    Those lines where you're stuck are in the boot ROM. You can step through the boot ROM by going to Run->Load->Add Symbols... and specifying the file below.

    controlSUITE\libs\utilities\boot_rom\2803x\2803x_boot_rom_v1\Release\TMS320x2803x_boot_rom_Gold_V1.out

    If CCS complains about not being able to find the source, you can point it to the 2803x_boot_rom_v1\source directory. Being able to see the boot code may help you debug why it's getting stuck there. From the addresses you mention, I can tell you're specifically stuck in WaitBoot.

    Whitney

  • Thanks Whitney

    resetting does not take me to main, nor does restarting

    if I try run->load->PM_sensorless 

    the control buttons indicate that the code is running but if I suspend the code pointer is up in the boot rom area

    in the console it shows: C28xx: AutoRun: Target not run as the symbol "main" is not defined  

    from loading the boot rom source I can see that I ultimately end up in 

     _ITRAPIsr   
    ;-----------------------------------------------
    ;-----------------------------------------------
    ; This is the ITRAP interrupt service routine for
    ; thet boot ROM CPU vector table.  This routine
    ; would be called should an ITRAP be encoutered 
    ; before the PIE module was initalized and enabled. 
    ; 
    ; This module performs the following actions:
    ; 
    ;     1) enables the watchdog
    ;     2) loops forever
    ;-----------------------------------------------
    
    _ITRAPIsr:
        SETC OBJMODE        ;Set OBJMODE for 28x object code
        EALLOW              ;Enable EALLOW protected register access
        MOVZ DP, #7029h>>6  ;Set data page for WDCR register
        MOV @7029h, #0028h  ;Clear WDDIS bit in WDCR to enable Watchdog
        EDIS                ;Disable EALLOW protected register access                             
        SB 0,UNC            ;Loop forever   

    where it loops for ever

    I've not changed anything in the linker script or map so I am confused as to why this is not working

    In trying to load the different programs and symbols I appear to have encoutered an error 

    C28xx: Error connecting to the target: (Error -1133 @ 0x0) Device blocked debug access because it is currently executing non-debuggable code. You may retry after the device has had time to enter debuggable code, or you may cancel, disable realtime mode, and then attempt to connect. (Emulation package 6.0.628.3) 

    the confusing thing about this one is that once I cancel I can see no way to disable realtimemode?

    Any suggestions would be great!

    Thanks

    - Richard

  • If you pull up main() in the Disassembly window, do you see valid code loaded there? Will it let you right click and select move to line? If the code isn't loading properly and it's jumping to an invalid instruction that could explain the ITRAP.

    I tried loading this example myself and didn't have any issues.

    Whitney

  • Hi Whitney

    I managed to get it workign via deleting the .launch file in the .launches folder.

    Unfortunately I did not keep a copy of what was in there when it was not working

    - I was trying to align the files with those I could see from a bare checkout of controlSUITE and there was very little I could see changed

    I am guessing that something between the emulation package and the hardware had managed to get confused.

    Thanks for the help; sorry I cannot be more specific with how this was resolved

    Kind regards,

    - Richard