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.

DSP/BIOS: System Tick is not incremented, if Blackhawk USB560 debugger is used with TMS320C5517 EVM

Other Parts Discussed in Thread: TMS320C5517, CCSTUDIO

Hi,


I made a very simple DSP/BIOS program with 2 tasks doing a LOG_printf and TSK_sleep(100). They just run one after the other with the same priority.

When debugging that program using the built-in eZdsp emulator of the Spectrum Digital TMS320C5517 EVM board, the tasks run as expected and in the ROV section I can see the LOG_printf outputs and the System Tick incremeting.

If I start the debug session on the same EVM board, but disconnect the USB connection to eZdsp and connect the "Blackhawk USB560 JTAG Emulator" or the "Blackhawk USB560v2 System Trace Emulator" via JTAG to the EVM board, I can single step the main() function, but the "systemTick" stays 0 and the tasks are executed only once!

Only if I re-connect the USB cable to the eZdsp emulator and re-start the debugging session, the Blackhawk emulators will work as expected.
My questions are now:

- Is the USB connection on the TMS320C5517 EVM needed as power supply?

- If so, why is only the "systemTick" affected, as I can single-step "main()"?

- Would the tasks run on my target system using the Blckhawk USB560?

I highly appreciate any hints!

Kind regards,
Klaus

  • Hi,

    some new facts: Studying the EVM schematic convinced me that there should be no relation between the USB power supplied to the EVM internal emulator and the JTAG emulation socket, as the external emulator, when plugged in, switches to external emulation via pin 8 of the JTAG header J8.

    Moreover, as our target HW is available now, I created a new project, based on the DSP/BIOS 5517 "clock example" and it shows the same problem: The task runs to the command "TSK_sleep" and then sleeps forever, as "systemTick" does not increment. The behaviour is identical on the target hardware and on the EVM (both debugged via Blackhawk USB560).

    So what prevents the the "systemTick" from running?

    Regards,

    Klaus

  • One more update:

    I have tried the Blackhawk USB560 and USB560v2 emulators on 2 different PCs with two independent installations of CCS 5.5.0.00077. The behaviour is identical as follows:

    1) At the very first start of the debug session, the program was loaded and already running (i.e. it did NOT stop at main(), as configured). Afert pressing Pause after some seconds, the ROV shows, that "systemTicks" has incremented to some thousands and the task has come back from sleep as expected.

    2) After pressing Stop and starting a second debug session by pressing "Bug", the emulator is initialized, but gives the error "Trouble writing register PC: (Error -1024 @ 0x0) JTAG operation failed ..."
    3) After pressing Stop, power cycling the EVM and the Blackhawk emulator, and starting a third debug session by pressing "Bug", the emulator is initialized and halts at the beginning of "main()" as it is configured. After pressing Play and then Pause after some seconds, the ROV shows, that "systemTicks" has NOT incremented and the task has NOT come back from sleep as expected.

    4) From that moment on, this behaviour is repeated as often as a new debug seesion is started.

    I would suggest an incompatible Blackhawk driver, but we have updated to the latest drivers using the CCS feature "Check for Updates" Here is part of the installation details:

    Code Composer Studio Version 5.5.0.00077:

    BIOS 5  5.42.1.09
    BIOS 6  6.35.4.50
    Blackhawk CCSv5.5 Emulation Update      5.5.0.344
      CCStudio p2 Tool Feature              5.4.0.201303071252
      Code Composer Studio Base Components  5.5.0.00400
      TI Emulators
        CCStudio p2 Tool Feature            5.4.0.201303071252

    Windows Driver Details:

    C:/Windows/system32/blackhawk.cpl                 Version 1.2.0.0
    C:/Windows/system32/Drivers/bh560usb.sys     Version 1.11.0.0

    Does someone have an idea, please?

    Thank you,

    Klaus

  • Hi Klaus,

    The systemTick increments are internally driven by the Timers. If the timer interrupts are not generated or serviced correctly then it is possible that systemTick does not increment. In the past, I have seen a bug in the emulation driver for one of our ARM parts that was causing the interrupts to remain disabled while the target was running (emulation SW was disabling all interrupts through the debug registers). I cannot say with surety but since you are seeing this behavior only with Blackhawk and not the onchip emulator, I am suspecting the emulation SW may have a bug that is disabling the interrupts while the target runs.

    You can try putting a breakpoint in the Hwi dispatcher (or Timer handler function) and check if the breakpoint is hit. If the breakpoint is never hit, this would verify that the interrupts are not being generated.

    I do not have access to a C55x EVM so I am unable to repro this issue. Since this looks like a emulation SW related problem, I would recommend posting on the CCS forum.

    Best,
    Ashish
  • Hi Ashish,

    thank you for your support. I suspected a Blackhawk driver problem as well, so I raised a support request at Blackhawk.

    You wrote you cannot reproduce it, because you lack the C55x EVM. If you have any hardware with a 5517 DSP, and a Blackhawk USB560 available, you should be able to run the DSP/BIOS clock example, as it does not require external peripherals.

    Can you please tell me, who is in charge of supporting the Blackhawk drivers - ist it TI or Blackhawk?

    Anyway I will try to investigate the interrupt issue a little deeper. In the target configuration file I could not find any options to set. In the DSP/BIOS example, all OS features like timer interrupts are handled automatically after the exit from "main()". Where can I find the source code for those functions (scheduler, HWI dispatcher, timer interrupt handler, etc.)?


    Thank you,

    Klaus

  • Hello Klaus,

    I have read through the post and find it hard to believe that the issue stems from the Windows USB device drivers. The drivers do not know the difference between loading a program, stepping through code or debugging a DSP/BIOS program.

    For XDS560 and XDS560v2-class emulators, TI provides the device emulation drivers (DVR files) used by Code Composer Studio and the low-level scan-controller logic programmed into the emulator (this is loaded at run time). These files are part of the TI Emulation pack within CCS.

    As you have contacted our Blackhawk product support, we will pick this up there to see if we can duplicate your scenario and narrow down the issue. We'll post a resolution here, later.

    Regards,
    Andrew
  • Hi Klaus,

    The emulation SW I am talking about is part of TI Emulation pack that is delivered by TI (not blackhawk).

    Unlike SYS/BIOS (BIOS6), DSP/BIOS (BIOS5) is not open source. I believe a license has to be purchased to get access to DSP/BIOS sources. The Hwi dispatcher function label is "HWI_F_dispatch". Please put a breakpoint on this and check if it gets hit.

    Best,

    Ashish 

  • Hello Ashish,

    you were right, the breakpoint is not being hit. When I halt the programm by clickcing "Pause", the disassembly shows it is running somwhere in FXN_f_run and IDL_f_loop, etc.

    To check if it is a problem in the workspace or .metadata folder, I opened a new empty workspace and created a new 5517 project from the TI DSP/BIOS examples:

    When debuggin it, it shows the clock task sleeps forever at the call of "TSK_sleep":

    The dispatcher breakpoint was never reached and the "systemTicks" are therefore not incremented:

    The I changed the emulator to the EVM built in eZdsp emulator, and it worked:

    The task came back from "TSK_sleep" and the value of "systemTick" increades, although the breakpoint "HWI_f_dispatch" was not executed.

    So this example can easily be reproduced, if you have CCS 5.5 installed and an EVM5517 and a Blackhawk USB560 available.
    I hope Ferrari5699 can reproduce it. He surely has a Blackhawk emulator aivailble.

    Regards,

    Klaus

  • Hello,
    just a short correction to my last post: The breakpoint at "HWI_F_dispatch" was left over from the last debug session. Therefore it was not reached. After deleting it and building a new breakpoint at that address it was reached as expected from the eZdsp emulator.
  • Hi Klaus,

    We will move this thread to the CCS forum. Since this issue seems related to the emulation SW, I think they will be able to help you better.

    Best,
    Ashish
  • Hi Ashish,
    feel free to move the thread. Would be great, if you can drop ma a new link.
    Thank you!

    Hello Robert,
    here is my current state:

    I can produce the problem in a newly created (clean) workspace using the TI DSP/BIOS "clock example".
    Strangely, when I later imported a sample showing the same problem, from my old into my new workspace, it worked well!
    All files and a detailed description is available from here:
    https://www.dropbox.com/s/h47vzik8cjqrzjq/Examples.zip?dl=0
    Blackhawk Support answered to this example:

    Klaus,
     
    Not having a C5517 EVM or C5510 DSK available, we decided to try your CCS project example using a C6146 DSK board.  We created a CCS project in the same fashion using the same BIOS clk example, but for the C6416 DSK.  We also used our classic,  USB560 emulator.
    In our testing we found everything operating as expected.  When we set a breakpoint on the LOG_printf call after the TSK_sleep, we could see the systemTick value increment.  Then, after resuming and halting, we could see the system Tick value continuing to increment. (see attached images).
    I know we did not use the same platform ( 6416 vs 5517), however...
     - from the Blackhawk emulator point of view, the same Blackhawk files would have been utilized regardless of target. 
     - the difference would have been the TI files used ( tixds560c64x_11.dvr vs. tixds560c55x.dvr ).
    With that said, I do not have any idea why you are experiencing the issue you described.  I am not sure what to or test do next.
    Any chance you have another non-C5517 TI DSK or EVM to run a similar test as we did?  I be curious if that worked properly.
     
    Andrew

    Even though I have one working example now to continue my development, I am still concerned about the instable behaviour of the development environment, which can be reproduced on two PCs here. Therefore I'd like to trace the problem to the root or at least find a stable cure.
    Kind regards,
    Klaus 
  • Klaus,

    Thank you for sending a very detailed test case. However, I cannot reproduce the behavior you are seeing on both my installs of CCS (v5.5 and v6.0.1) - I see the system ticks increasing normally as the execution progresses.  

    I am using the same board as you (EVM5517) and a BH560m Rev G. Both CCS releases have TI Emulators component version 5.1.636.0 and Blackhawk component 5.0.0.340 (for v5) and 6.0.0.344 (for v6).

    Therefore I can't precisely get data to allow the development teams to investigate the root of this issue, but I will still try to "break" my system here and see if I can get closer to this issue. I will report back any updates to this.

    If you haven't done so, I would try to follow some of the Troubleshooting tips shown at the page below, more specifically the section "Debugger"

    http://processors.wiki.ti.com/index.php/Troubleshooting_CCSv5

    Regards,

    Rafael