ARM ARM1176JZF-S Technical Reference Manual page 560

Table of Contents

Advertisement

14.8.6
Reading a current mode ARM register in the range R0-R14
14.8.7
Writing a current mode ARM register in the range R0-R14
ARM DDI 0301H
ID012310
Use the following sequence to read a current mode ARM register in the range R0-R14:
SCAN_N
5
ITRSEL
INST
MCR p14,0,Rd,c0,c5,0
RTI
INTEST
LOOP
DATA 0x00000000 Ready readData
UNTIL
Ready==1
Save value in readData
Note
Register R15 cannot be read in this way because the effect of the required MCR is to take an
Undefined exception.
Use the following sequence to write a current mode ARM register in the range R0-R14:
SCAN_N 5
ITRSEL
INST
MRC p14,0,Rd,c0,c5,0
EXTEST
DATA
Data2Write
RTI
LOOP
DATA 0x00000000 Ready
UNTIL
Ready==1
Note
Register R15 cannot be written in this way because the MRC instruction used updates the CPSR
flags rather than the PC.
Copyright © 2004-2009 ARM Limited. All rights reserved.
Non-Confidential, Unrestricted Access
; select DTR
; select the ITR and EXTEST
; instruction to copy Rd into CP14 debug
; register c5
; select the DTR and INTEST
; wait until the instruction ends
; select DTR
; select the ITR and EXTEST
; instruction to copy CP14 debug
; register c5 into Rd
; select the DTR and EXTEST
; wait until the instruction ends
Debug Test Access Port
14-34

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents