IDMA Channels
MOTOROLA
MC68360 USER’S MANUAL
7-55
7.6.5 IDMA Examples
The following paragraphs provide IDMA examples.
7.6.5.1 SINGLE BUFFER EXAMPLES.
To see three examples of single buffer operation,
see the 7.6.4.6.1 Dual Address Mode.
7.6.5.2 BUFFER CHAINING EXAMPLE.
The following example shows the setup required
to initialize IDMA channel 1 to perform three buffer transfers using the buffer chaining
mode. This example will move 16 bytes from address 0 to address $1000, then 16 bytes
from address $100 to $1100, and then 16 bytes from address 200 to $1200.
1. Initialize basic IDMA channel 1 registers:
2. ICCR = $0720. Recommended normal configuration.
3. FCR1 = $89. Source function code is 1000; destination function code is 1001.
4. SAPR1 not initialized. Will be initialized later by RISC controller.
5. DAPR1 not initialized. Will be initialized later by RISC controller.
6. BCR1 not initialized. Will be initialized later by RISC controller.
7. CSR1 = $FF. Clear any CSR bits that are currently set.
8. CMAR1 = $00. Disable interrupts for this example.
9. CMR1 = $530C. The RISC controls the IDMA activity (RCI bit is set). The IDMA
channel uses 12.5% of the bus bandwidth. The source and destination size are
long word. Do not set the STR bit yet.
10.Issue the INIT_IDMA command to the RISC controller. This command is not required
unless the IDMA was reset with the CMR RST bit while in the buffer chaining or auto
buffer modes.
11.CR = $0591. Issue INIT_IDMA command to IDMA channel 1.
12.Initialize the IDMA channel 1 parameter RAM:
13.IBASE = $0000. This points the beginning of the IDMA BDs. The value of $0000
means that the first IDMA BD is located at the beginning of the internal dual-port
RAM.
14.Initialize the first IDMA BD:
15.BD1_STATUS = $0000. This is offset 0 from the BD. Set up all bits except the
V-bit.
16.BD1_Data_Length = $00000010. Transfer 16 bytes.
17.BD1_Source_Pointer = $00000000. Source address.
18.BD1_Destination_Pointer = $00001000. Destination address.
19.BD1_STATUS = $8000. Set the V-bit. It is good practice to set the V-bit last;
however, in this example the IDMA channel is not yet enabled, so it could have
been set earlier.
20.Initialize the second IDMA BD:
21.BD2_STATUS = $0000. This is offset 0 from the BD. Set up all bits except the