Скачиваний:
38
Добавлен:
27.04.2015
Размер:
3.97 Mб
Скачать

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Freescale Semiconductor, Inc.

OnCE™ Module

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

used for profiling code. The EM[1:0] bits add some powerful debug techniques to the OnCE module. Users can profile code more easily with the 01 encoding or perform special tasks when events occur with the 10 encoding.

The most attractive feature of the 10 encoding is the ability to patch the ROM. If a section of code in ROM is incorrect, the user can set a breakpoint at the starting address of the bad code and vector off to a program RAM location where the patch resides. There are also BK encodings that can be used for this purpose.

The 11 encoding is useful for toggling the DE pin output. The user can count events on the DE output and determine how much time is being spent in a certain subroutine or other useful things. DE is held low for two instruction cycles to avoid transmission line problems at the board level at high internal clock speeds. This restricts event recognition to no more than one event every three instruction cycles, limiting its usefulness during tracing.

12.4.4.7 Power Down Mode (PWD)—Bit 4

The power down mode (PWD) bit is a power-saving option that reduces running current for applications that do not use the OnCE module. The user can set or reset the PWD bit by writing to the OCR. On hardware reset (deassertion of the RESET signal), this bit is set (low power mode) if the JTAG TAP controller is not decoding an ENABLE_ONCE command. If the ENABLE_ONCE command is being decoded, the bit can be set or cleared only through a OnCE module write command to the OCR. To ensure proper operation, breakpoints should be completely disabled before setting PWD.

When the OnCE module is powered down (PWD = 1), much of the OnCE module is shut down, although the following two things can still occur:

A JTAG DEBUG_REQUEST instruction still halts the core.

The OnCE module state machine is still accessible so that the user can write to the OCR.

NOTE:

DEBUG instructions executed by the core are ignored if PWD is set, and no event occurs.

12.4.4.8 Breakpoint Selection (BS[1:0])—Bits 3–2

The breakpoint selection (BS[1:0]) control bits select whether the breakpoints are recognized on program memory fetch, program memory access, or first X memory access. These bits are cleared on hardware reset, as described inTable 12-10. These bits are used only in determining triggering conditions for breakpoint 1, not for additional future breakpoint comparators.

The BS and BE bits apply only to the breakpoint 1 mechanism. Breakpoint 2 and future breakpoint mechanisms are unaffected by BS or BE bit encodings, except for the fact that all breakpoint mechanisms are disabled when BE[1:0] = 00.

12-18 DSP56824 User’s Manual

For More Information On This Product,

Go to: www.freescale.com

Freescale Semiconductor, Inc.

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Freescale Semiconductor, Inc.

Command, Status, and Control Registers

ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005

Table 12-10. BS[1:0] Bit Definition

BS[1:0]

Action on Occurrence of an Event

00Breakpoint on program memory fetch (fetch of the first word of instructions that are actually executed, not of those that are killed, not of those that are the second word of two-word instructions, and not of jumps that are not taken)

01Breakpoint on any program memory access (any MOVEM instructions, fetches of instructions that are executed and of instructions that are killed, fetches of second word of two-word instructions, and fetches of jumps that are not taken)

10Breakpoint on the first X memory access— XAB1/CGDB access

11(Reserved)

NOTE:

It is not possible to set a breakpoint on the XAB2 bus when it is used in the second access of a dual read instruction.

The BS[1:0] bits work in conjunction with the BE[1:0] bits to determine how the address breakpoint hardware is set up. The decoding scheme for BS[1:0] and BE[1:0] is shown in Table 12-11.

Table 12-11. Breakpoint Programming with the BS[1:0] and BE[1:0] Bits

Function

BS[1:0]

BE[1:0]

 

 

 

 

 

 

Disable all breakpoints1

All combinations

00

 

 

 

(Reserved)

00

01

 

 

 

Program instruction fetch

00

10

 

 

 

(Reserved)

00

11

 

 

 

Any program write or fetch

01

01

 

 

 

Any program read or fetch

01

10

 

 

 

Any program access or fetch

01

11

 

 

 

XAB1 write

10

01

 

 

 

XAB1 read

10

10

 

 

 

XAB1 access

10

11

 

 

 

(Reserved)

11

01

 

 

 

(Reserved)

11

10

 

 

 

(Reserved)

11

11

 

 

 

1. When all breakpoints are disabled with the BE[1:0] bits set to 00, the full-speed instruction tracing capability is not affected. See Section 12.9.2, “Entering Debug Mode.”

OnCE™ Module 12-19

For More Information On This Product,

Go to: www.freescale.com

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