| |||
| Home > Debug Test Access Port > Debug sequences > Reading a current mode ARM register in the range r0-r14 | |||
Use the following sequence to read a current mode ARM register in the range r0-r14:
SCAN_N 5 ; select DTR
ITRSEL ; select the ITR and EXTEST
INST MCR p14,0,Rd,c0,c5,0 ; instruction to copy Rd into CP14 debug
; register c5
RTI
INTEST ; select the DTR and INTEST
LOOP
DATA 0x00000000 Ready readData
UNTIL Ready==1 ; wait until the instruction ends
Save value in readData
Register r15 cannot be read in this way because the effect of the required MCR is to take an Undefined exception.