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.

CCSv6.1.3, xds100v2: Not able to debug target with realtime mode selected.

Guru 20045 points
Other Parts Discussed in Thread: TMS320F28335

Hello,

I am not able to download and debug a TMS320F28335 target with xds100v2 Realtime Options "Enable realtime mode and Enable polite mode checked.

After selecting debug I get the following errors shown below.

What's causing this issue?

Stephen

I initially get the following error:

Trouble Writing Register XAR0:

(Error -1142 @ 0x7)
Device blocked debug access because it is currently executing non-debuggable code. Choose 'Rude Retry' to disable polite mode and force the operation.
(Emulation package 6.0.228.0)

After clicking cancel (several times):

Trouble Reading Register PC:
(Error -1142 @ 0x0)
Device blocked debug access because it is currently executing non-debuggable code. Choose 'Rude Retry' to disable polite mode and force the operation.
(Emulation package 6.0.228.0)

Trouble Reading Register PC:
(Error -1142 @ 0x0)
Device blocked debug access because it is currently executing non-debuggable code. Choose 'Rude Retry' to disable polite mode and force the operation.
(Emulation package 6.0.228.0)

Trouble Reading Register PC:
(Error -1142 @ 0x0)
Device blocked debug access because it is currently executing non-debuggable code. Choose 'Rude Retry' to disable polite mode and force the operation.
(Emulation package 6.0.228.0)

After clicking rude entry:

Trouble Reading Register PC:
(Error -1156 @ 0x0)
Device may be operating in low-power mode. Do you want to bring it out of this mode? Choose 'Yes' to force the device to wake up and retry the operation. Choose 'No' to retry the operation without waking the device.
(Emulation package 6.0.228.0)

After clicking 'Yes' to force the device to wake up

Trouble Reading Register PC:
(Error -1156 @ 0x0)
Device may be operating in low-power mode. Do you want to bring it out of this mode? Choose 'Yes' to force the device to wake up and retry the operation. Choose 'No' to retry the operation without waking the device.
(Emulation package 6.0.228.0)

  • Stephen,

    Please take look at this related thread, it explains the reason for the error.

    There are also some additional references (training module and quicktip video) on using real-time mode here that should be helpful:
    http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS#C2000

  • Ok, I turned on real time mode after I downloaded the program.

    My uC has to reset a hardware watchdog every 20ms. An LED on the PCB turns on if the hardware watchdog isn't updated.

    While the program was running, I noticed that the LED blinked at a rate of once every 1 second, which is the rate GUI polls the target.

    Is there something I am missing?

    Thanks,
    Stephen
  • Should the GUI be interrupting my program when real time debug is enabled?
  • I still haven't solved the problem with the GUI interrupting my code when real time mode is enabled.
    Stephen
  • Stephen,

    Do you mean that the processor is being temporarily halted while memory accesses are being made to refresh the GUI? That should not be happening as the C2000 devices support real-time memory access while the processor is running and should be able to update the GUI without halting the processor. 

    Is it only when GUI Composer is started up that you see this behavior? What happens if you simply add the variables (that are being updated in your GUI app) to the Expressions view and set it to continuous refresh? In terms of memory accesses, updating variables in the Expressions view should be similar to updating GUI Composer widgets.

  • "Do you mean that the processor is being temporarily halted while memory accesses are being made to refresh the GUI?"
    Yes.

    "Is it only when GUI Composer is started up that you see this behavior?"
    No, it's happening every 1 seconds while the GUI and program are running.

    "What happens if you simply add the variables (that are being updated in your GUI app) to the Expressions view and set it to continuous refresh? "
    I'll try that when I get time. However, I have never seen this issue when I view many variables in the expression window without real time debug turned on.

    Stephen
  • I performed the test with all the GUI variables in the expression window with the update rate set to 1000ms and continuous refresh enabled. I also enabled real time mode before I ran the program.

    The hardware watchdog LED did come on, but not as often and it didn't stay on as long as it did for the GUI.

    My GUI has 29 16-bit variables and two 16-bit arrays (sizes = 4, 2 and 5).

    Stephen
  • Hello AartiG,

    Were you able to perform a Real Time Target debug test with the same number and size of variables?

    Stephen
  • Stephen,

    I discussed this internally with a couple of engineers and what you are observing as a result of simply enabling real-time mode is not what we would expect.

    We have internal users that have used real-time mode with applications that have several variables and nested interrupts (but not the watchdog specifically), and they have not observed unexpected behavior. Refreshing many variables in the Expressions view may be a bit slow but should not affect the operation of the program itself.

    In real-time mode, the device should not be halted, but memory accesses could be stalling. Some details on polite real-time mode: normally while the debug hardware is running the bus transaction the core cannot access memory. So there are flags such as DBGM that tell the debug hardware when it’s OK to access memory without interfering with the program. So the debugger will wait for the processor to get into a non-critical section of code before making the memory access.

    I'm still not sure what is causing your watchdog to trip, but perhaps your application is very timing sensitive that any sort of delay is triggering an issue?

    Also just wanted to mention that real-time access to memory as used by GUI Composer and Expressions view in CCS do not require you to enable real-time mode at all. You would only need to enable real-time mode if you need to debug and service time-critical interrupts while the processor is halted. Some details on real-time interrupts are covered in this training: http://processors.wiki.ti.com/index.php/CCS_Modules_Library#Real-time_Debug