Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CS 220 / ARM / ARM7TDMI_TechnicalReferenceManual.pdf
Скачиваний:
110
Добавлен:
16.04.2015
Размер:
1.63 Mб
Скачать

Debug in Depth

B.7 The ARM7TDMI core clocks

The ARM7TDMI core has two clocks:

the memory clock, MCLK

an internally TCK generated clock, DCLK.

During normal operation, the core is clocked by MCLK and internal logic holds DCLK LOW. When the ARM7TDMI core is in the debug state, the core is clocked by DCLK under control of the TAP state machine and MCLK can free-run. The selected clock is output on the signal ECLK for use by the external system.

Note

When the CPU core is being debugged and is running from DCLK, nWAIT has no effect.

B.7.1 Clock switch during debug

When the ARM7TDMI core enters debug state, it must switch from MCLK to DCLK. This is handled automatically by logic in the ARM7TDMI core. On entry to debug state, the core asserts DBGACK in the HIGH phase of MCLK. The switch between the two clocks occurs on the next falling edge of MCLK. This is shown in Figure B-5.

MCLK

DBGACK

DCLK

ECLK

Multiplexer switching point

Figure B-5 Clock switching on entry to debug state

The ARM7TDMI core is forced to use DCLK as the primary clock until debugging is complete. On exit from debug, the core must be enabled to synchronize back to MCLK. This must be done in the following sequence:

1.The final instruction of the debug sequence must be shifted into the data bus scan chain and clocked in by asserting DCLK.

2.At this point, RESTART must be clocked into the TAP instruction register.

B-22

Copyright © 1994-2001. All rights reserved.

ARM DDI 0029G

Debug in Depth

3.The ARM7TDMI core now automatically resynchronizes back to MCLK and starts fetching instructions from memory at MCLK speed.

Refer to Exit from debug state on page B-26.

B.7.2 Clock switch during test

When under serial test conditions, that is when test patterns are being applied to the ARM7TM core through the JTAG interface, the ARM7TDMI core must be clocked using DCLK. Entry into test is less automatic than debug and some care must be taken. On the way into test, MCLK must be held LOW. The TAP controller can now be used to serially test the ARM7TDMI core. If scan chain 0 and INTEST are selected, DCLK is generated while the state machine is in the RUN-TEST-IDLE state. During EXTEST, DCLK is not generated.

On exit from test, RESTART must be selected as the TAP controller instruction. When this is done, MCLK can be enabled to resume.

Note

After INTEST testing, care must be taken to ensure that the core is in a sensible state before switching back. The safest way to do this is to either select RESTART and then cause a system reset, or to insert MOV PC, #0 into the instruction pipeline before switching back.

ARM DDI 0029G

Copyright © 1994-2001. All rights reserved.

B-23

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