Toshiba H1 Series Data Book page 101

32bit micro controller tlcs-900/h1 series
Table of Contents

Advertisement

3.6.4 Setting Example
This section explains how to set the DMAC using an example.
(1) Transferring music data from internal RAM to I2S by DMA transfer
The 32 Kbytes of data stored in the internal RAM at addresses 2000H to 9FFFH shall be
transferred to FIFO-RAM via I2S. Each time an INTI2S request is asserted, 64 bytes (4
bytes x 16 times) shall be transferred to FIFO-RAM using DMAC channel 0. Since INTI2S
is an FIFO empty interrupt, the first data must be set in advance. Therefore, only the first
64 bytes shall be transferred by DMA soft start. After 32 Kbytes have been transferred, the
INTDMA0 interrupt routine shall be activated to prepare for the next processing.
(a) Main routine
No
1
ldl
2
ldl
3
ldw
4
ldw
5
ldb
6
set
7
ld
8
nop
9
ld
10
ld
11
ldw
12
ldw
13
ei
(b) INTDMA0 interrupt routine
No
1
res
2
:
3
:
4
:
5
:
6
7
8
9
10
11
reti
Instruction
(hdmas0),2000H
; Source address = 2000H
(hdmad0),i2sbuf
; Destination address = i2sbuf
(hdmaca0),16
; Counter A = 16
(hdmacb0),512
; Counter B = 512 (32768/64)
(hdmam0),0AH
; Transfer mode = source INC, 4 bytes
0,(hdmae)
; Enable DMA channel 0.
(dmar),01H
; Transfer the first 64 bytes by DMA soft start.
;
(dma0v),i2s_vector
; INTI2S = DMA0
(intedma01),xxH
; INTDMA level = x
(i2sctl0),xxxxH
; Set operation mode for I2S.
(i2sctl1),xxxxH
; Start I2S transmission.
xx
; Enable CPU interrupts.
Instruction
0,(hdmae)
; Disable DMA channel 0.
;
92CZ26A-98
TMP92CZ26A
Comments
Comments

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tlcs-900Tmp92cz26axbg

Table of Contents