Debug Test Access Port
ARM DDI 0301H
Copyright © 2004-2009 ARM Limited. All rights reserved.
14-37
ID012310
Non-Confidential, Unrestricted Access
3.
This loop keeps on reading words, but it stops before the latest read. It is skipped if there
is only one word to read:
FOR(i=1; i <= (Words2Read-1); i++) DO
LOOP
DATA 0x00000000 Ready readData
; gets the result of
; the previous read
RTI
; issues the next read
UNTIL Ready==1
; wait until the instruction ends
Save value in readData
ENDFOR
4.
Wait for the last read to finish:
LOOP
DATA 0x00000000 Ready readData
UNTIL Ready==1
; wait until instruction ends
Save value in readData
5.
Now check whether an abort occurred:
SCAN_N
1
; select DSCR
INTEST
DATAOUT DSCR
; this action clears the DSCR[6] flag
6.
Scan out the contents of the DSCR. This clears the sticky precise Data Abort and sticky
imprecise Data Abort flags. If the sticky precise Data Abort is set, this means that during
the sequence one of the instructions caused a precise Data Abort. All the instructions that
follow are not executed. Register R0 points to the next word to be written, and after the
cause for the abort has been fixed the sequences resumes at step 1.
Note
If the sticky imprecise Data Aborts flag is set, an imprecise Data Abort has occurred and
the sequence restarts at step 1 after the cause of the abort is fixed and R0 is reloaded.
14.8.14 Writing memory as words
This sequence is optimized for a long sequential write. This sequence assumes that R0 has been
set to the address to store data to prior to running this sequence. Register R0 is post-incremented
so that it can be used by successive writes to memory:
1.
The instruction is loaded:
SCAN_N
5
; select DTR
ITRSEL
; select the ITR and EXTEST
INST
STC p14,c5,[R0],#4
; store the contents of rDTR into the
; position of memory pointed by R0 and
; increment it by 4
EXTEST
; select the DTR and EXTEST
2.
This loop writes all the words:
FOR (i=1; i <= Words2Write; i++) DO
LOOP
DATA Data2Write Ready
RTI
UNTIL Ready==1
; wait until instruction ends
ENDFOR
INTEST
; deselect the DTR
3.
Wait for the last write to finish:
LOOP
DATA 0x00000000 Ready