Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
34
Добавлен:
27.04.2015
Размер:
1.98 Mб
Скачать

OnCE™ Module

12.9.2 Entering Debug Mode

There are seven ways to enter debug mode:

JTAG DEBUG_REQUEST during hardware reset

JTAG DEBUG_REQUEST during Stop or Wait

JTAG DEBUG_REQUEST during wait states

Software breakpoint (DEBUG) during normal activity with PWD = 0 and EM = 00

Trigger events (breakpoint and trace modes) when EM = 00

DSP instruction executed from debug mode with EX = 0

External DE request pin assertion

NOTE:

The DE pin, when asserted, causes the DSP to finish the current instruction being executed, save the instruction pipeline information, enter debug mode, and wait for commands to be entered from the JTAG/OnCE serial input line. A request from the DE pin is treated the same way as a JTAG DEBUG_REQUEST.

The status bits provide information about the chip status when the debug mode cannot be entered in response to an external request to enter it. Table 12-14 shows the status of the chip as a function of the two status bits OS[1:0].

 

Table 12-14. Function of OS[1:0]

 

 

OS[1:0]

Status

 

 

 

 

00

Normal mode

 

 

01

Stop or wait mode

 

 

10

DSP busy state (external accesses with wait state)

 

 

11

Debug mode

 

 

12.9.2.1 JTAG DEBUG_REQUEST and the Debug Event Pin

The core reacts in the same way to a debug request by a JTAG DEBUG_REQUEST or the assertion of the debug event (DE) pin. To send a JTAG DEBUG_REQUEST, the 0111 opcode must be shifted into the JTAG IR, and then Update-IR must be passed through. This instructs the core to halt and enter debug mode. Asserting the debug event (DE) pin produces the same effect. When the DSP enters debug mode in response to these requests, the DE pin is asserted (pulled low) if it is enabled.

The JTAG/OnCE interface is accessible when RESET is asserted, provided that TRST is not asserted (that is, the JTAG port is not being reset). The user can load DEBUG_REQUEST into the JTAG IR while RESET is held low. If RESET is then deasserted, the chip exits hardware reset directly into debug mode. After sending the DEBUG_REQUEST instruction, the user should poll the JTAG IR to see whether the chip has entered debug mode.

12-38

DSP56824 User’s Manual

 

The Debug Processing State

If the chip is in either wait or stop mode, either type of debug request, much like an external interrupt, brings the chip out of these modes. Upon leaving wait or stop mode, the chip enters debug mode. As always, the user should poll JTAG IR for status after sending the debug request. It is important to remember that the OSR cannot be polled during stop mode, since no OnCE module access is allowed. However, JTAG access is allowed.

If the chip is in wait states (because of a non-zero value in BCR or transfer acknowledge deassertion on chips having this function), the debug request is latched and the core halts upon execution of the instruction in wait states. The period of time between the debug request and the OS bits being set to 11 (debug mode) is typically much shorter than the time it takes to poll status in JTAG IR, meaning that

OS = 11 on the first poll. The only time this is not the case is when a transfer acknowledge is generating a large or infinite number of wait states. For this reason, polling for OS = 11 is always recommended.

Sending a debug request when the chip is in normal mode results in the chip entering debug mode as soon as the instruction currently executing finishes. Again, the JTAG IR should be polled for status. See Section 13.2, “JTAG Port Architecture,” on page 13-2 for information about using the JTAG TAP controller and its instructions.

12.9.2.2 Software Request During Normal Activity

Upon executing the DEBUG instruction, the chip enters the debug processing state provided that PWD = 0 and EM = 00.

12.9.2.3 Trigger Events (Breakpoints and Trace Modes)

The DSP56824 allows the user to configure specific trigger events. These events can include breakpoints, trace modes, or combinations of breakpoints and trace mode operations. The following conditions must occur to halt the core due to breakpoint or trace:

EM = 00.

If OCNTR = 0, breakpoints are enabled (BE is not 00) and the next valid address compare causes the core to halt, provided it is not the initial enabling breakpoint in a sequential breakpoint.

If OCNTR = 0, trace mode is selected (one of the BK encodings with BK4 = 1) and the next instruction executed causes the core to halt.

12.9.2.4 Reentering Debug Mode with EX = 0

If a DSP instruction is executed from debug mode with EX = 0, debug mode is automatically reentered after the instruction finishes executing. When the instruction is being executed, the core is not in debug mode, and the OS[1:0] bits reflect this state. This change in status is typically not observable, because the core leaves and reenters debug mode in a very short time. Still, polling for status in JTAG IR is recommended to guarantee that the chip is in debug mode.

 

OnCE™ Module

12-39

Соседние файлы в папке DSP568xx