Download Using DMACII (Chained Transfer)

Transcript
M32C/80 Series
Using DMACII (Chained Transfer)
Typical operation of a chain transfer in cases where the INT0 interrupt is used as the cause of DMACII
(2) When first DMACII request (INT0 interrupt) occurs
0086h MOD
400h
0001h COUNT After a DMACII transfer,
the COUNT value is
2001h SADR
decremented by 1.
2800h DADR
0800h CADR0 Furthermore, if the source
0000h CADR1 of transfer and the
(1) When initialized
400h
0086h
0002h
2000h
2800h
0800h
0000h
MOD
0086h
0002h
3000h
3800h
0C00h
0000h
MOD
COUNT
SADR
DADR
CADR0
CADR1
destination of transfer are
800h
2000h
2001h
XXh
3000h
3001h
FFh
EEh
3800h
XXh
INT0 interrupt vector (28th entry
COUNT
SADR
DADR
CADR0
CADR1
At the start of a DMACII
transfer, the DMACII
11h
22h
2800h
800h
index located at the
address 0400h
determines the
operation of the transfer
performed.
0400h
2000h
2001h
11h
22h
2800h
11h
3000h
3001h
FFh
EEh
3800h
XXh
INT0 interrupt vector (28th entry
of a relocatable vector table)
0086h
0002h
3000h
3800h
0C00h
0000h
MOD
variable, the SADR and
COUNT
SADR
DADR
CADR0
CADR1
DADR values are
incremented by 1 for 8-bit
transfers or incremented by
2 for 16-bit transfers.
DMACII
transfer
0400h
of a relocatable vector table)
(4) When third DMACII request (INT0 interrupt) occurs
(3) When second DMACII request (INT0 interrupt) occurs
400h
800h
0086h
0000h
2002h
2800h
0800h
0000h
0086h
0002h
3000h
3800h
0C00h
0000h
2000h
2001h
11h
22h
2800h
MOD
COUNT
SADR
DADR
CADR0
CADR1
400h
When COUNT reached 0,
the interrupt vector value
for the cause of a DMACII
transfer is rewritten to the
0086h
0000h
2002h
2800h
0800h
0000h
MOD
0086h
0001h
3001h
3800h
0C00h
0000h
MOD
value of CADR1-CADR0.
MOD
800h
COUNT
SADR
DADR
CADR0
CADR1
DMACII
transfer
2000h
2001h
11h
22h
22h
2800h
11h
3000h
3001h
FFh
EEh
3000h
3001h
FFh
EEh
3800h
XXh
3800h
FFh
COUNT
SADR
DADR
CADR0
CADR1
COUNT
SADR
DADR
CADR0
CADR1
DMACII transfer
The DMACII index located
at the address 800h
determines the operation
INT0 interrupt vector (28th entry
of a relocatable vector table)
0800h
INT0 interrupt vector (28th
entry of a relocatable vector
0800h
of the transfer performed.
table)
The above applies to the following settings:
• SIZE bit = “1” (8 bits transfer)
• OPER bit = “0” (without calculation transfer)
• UPDS bit = “1” (transfer source direction: forward address) • BRST bit = “0” (single transfer)
• UPDD bit = “0” (transfer destination direction: fixed address) • NTE bit = “0” (interrupt no used)
Figure 1. Typical Operation of a DMACII Chained Transfer Mode
REJ05B0640-0100/Rev.1.00
May 2005
Page 2 of 11