EasyManuals Logo

Texas Instruments TMS320C28x User Manual

Texas Instruments TMS320C28x
695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #456 background imageLoading...
Page #456 background image
PWRITE *XAR7,loc16
6-299
PWRITE *XAR7,loc16 Write to Program Memory
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
PWRITE *XAR7, loc16 0010 0110 LLLL LLLL X Y N+5
Operands *XAR7 Indirect programmemory addressing using auxiliary register XAR7,
can access full 4Mx16 program space range (0x000000 to 0x3FFFFF)
loc16 Addressing mode (see Chapter 5)
Description Load the programmemory location pointed to by the ”*XAR7” with the
content of the location pointed to by the “loc16” addressing mode:
Prog[*XAR7] = [loc16];
On the C28x devices, memory blocks are mapped to both program and data
space (unified memory), hence the ”*XAR7” addressing mode can be used
to access data space variables that fall within the program space address
range.
With some addressing mode combinations, you can get conflicting
references. In such cases, the C28x will give the “loc16/loc32” field priority
on changes to XAR7. For example:
PWRITE *XAR7,*−−XAR7 ; *−−XAR7 given priority
PWRITE *XAR7,*XAR7++ ; *XAR7++ given priority
Flags and
Modes
None
Repeat This instruction is repeatable. If the operation follows a RPT instruction, then
it will be executed N+1 times. When repeated, the ”*XAR7”
programmemory address is copied to an internal shadow register and the
address is postincremented by 1 during each repetition.
Example
;
Copy the contents of Array1 to Array2:
; int16 Array1[N]; // Located in data space
; int16 Array2[N]; // Located in program space
; for(i=0; i < N; i++)
; Array2[i] = Array1[i];
MOVL XAR2,#Array1 ; XAR2 = pointer to Array1
MOVL XAR7,#Array2 ; XAR7 = pointer to Array2
RPT #(N−1) ; Repeat next instruction N times
||PWRITE *XAR7,*XAR2++ ; Array2[i] = Array1[i],
; i++

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320C28x and is the answer not in the manual?

Texas Instruments TMS320C28x Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320C28x
CategoryProcessor
LanguageEnglish

Related product manuals