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 #581 background imageLoading...
Page #581 background image
Data Logging
7-28
7.8.4 Examples of Data Logging
Example 71 shows how to log 20 32-bit words, starting at address 00 0100
16
in data memory. The accesses are preemptive (they have higher priority than
the CPU) and rude (they ignore the state of the DBGM bit). In addition, data
logging can occur during time-critical interrupt service routines. The applica-
tion can determine whether the data logging operation is complete by polling
the LSB of the DMA control register (DMA_CNTRL) at 00 083E
16
. When the
operation is complete, that bit is set to 1.
Example 71. Initialization Code for Data Logging With Word Counter
; Base addresses
ADMA .set 0838h
; Offsets
DMA_ADDRL .set 0
DMA_ADDRH .set 1
DMA_CNTRL .set 6
DMA_ID .set 7
EALLOW
MOV AR4, #ADMA ; AR4 pointing to register base addr
MOV *+AR4[#DMA_CNTRL],#1 ; Attempt to claim resource
NOP
NOP
NOP
CMP *+AR4[#DMA_ID],#7001h ; Value expected in ID register
B FAIL, NEQ ; If we don’t see the correct ID, then we
; failed (the resource is already in use)
MOV *+AR4[#DMA_ADDRL],#0100h ; Set starting address of buffer,
; and then the count
MOV *+AR4[DMA_ADDRH],#((256 − 20) << 8)
MOV *+AR4[DMA_CNTRL],#3E62h
EDIS
Example 72 shows how to log from address 00 0100
16
to address 00 02FF
16
in data memory. The accesses are nonpreemptive (they have lower priority
than the CPU), and are polite (they are not performed when the DBGM bit is
0). The data logging cannot occur when a time-critical interrupt is being ser-
viced. An end address of 00 02FF
16
is used to end the transfer. The applica-
tion must not read from 00 02FF
16
during the data logging; a read from that
address stops the data logging. As in Example 71, the application can poll
the LSB of DMA_CNTRL for a 1 to determine whether the data logging opera-
tion is complete.

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