ADSP-BF53x/BF56x Blackfin Processor Programming Reference
21-5
Debug
Code patching allows software to replace sections of existing code with
new code. The watchpoint registers are used to trigger an exception at the
start addresses of the earlier code. The exception routine then vectors to
the location in memory that contains the new code.
On the processor, code patching can be achieved by writing the start
address of the earlier code to one of the
WPIAn
registers and setting the cor-
responding
EMUSWx
bit to trigger an exception. In the exception service
routine, the
WPSTAT
register is read to determine which watchpoint trig-
gered the exception. Next, the code writes the start address of the new
code in the
RETX
register, and then returns from the exception to the new
code. Because the exception mechanism is used for code patching, event
service routines of the same or higher priority (exception, NMI, and reset
routines) cannot be patched.
A write to the
WPSTAT
MMR clears all the sticky status bits. The data value
written is ignored.
WPIAn Registers
When the Watchpoint Unit is enabled, the values in the Instruction
Watchpoint Address registers (
WPIAn
) are compared to the address on the
instruction bus. Corresponding count values in the Instruction Watch-
point Address Count registers (
WPIACNTn
) are decremented on each match.
Figure 21-1
shows the Instruction Watchpoint Address registers,
WPIA[5:0]
.
Содержание ADSP-BF53x Blackfin
Страница 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 780: ...Product Identification Register 21 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 994: ...Instructions Listed By Operation Code C 194 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...