Professional Documents
Culture Documents
DMSA
SUBBANK
ADDRESS
REGISTER
Example Program 1: Write code to show how the DMA channel 2 source address
register can be initialized with the value 1111h.
Following program is simulated in CCS:
; Program name ex9p6.s
.def _c_int00
dmsa .set 55h ; address of subbank address register
dmsdn .set 57h ; address of subbank access register
dmsrc2 .set 0ah ; subaddress
.text
_c_int00:
stm dmsrc2, dmsa ; DMSA= address of DMSRC2= 0Ah
stm #1111h, dmsdn ; write 1111h to DMSRC2
.end
After execution:
Peripheral register DMSA=000A
DMPREC =0000h
Example Program 2: Write TMS320C54xx code to show how the DMA channel 5
context registers can be initialized. Choose arbitrary values to be written to the
registers.
Solution: Since a set of registers are to be configured DMSDI is used.
DMSA .set 55h ; address of subank address register
DMSDI .set 56h ; address of subbank access register
DMSRC5 .set 19h ; subaddress of DMSRC5
DMDST5 .set 1Ah
DMCTR5 .set 1Bh
DMSFC5 .set 1Ch
DMMCR5 .set 1Dh
STM DMSRC5, DMSA ; DMSA= first sub address
STM #2000h, DMSDI ; write 2000h to DMSRC5
STM #3000h, DMSDI ; write 3000h to DMDST5
STM #0010h, DMSDI ; write 0010h to DMCTR5
STM #0002h, DMSDI ; write 2h to DMSFC5
STM #0000h, DMSDI ; write 0h to DMMCR5