13.07.2015 Views

Intel 80312 I/O Companion Chip - ECEE

Intel 80312 I/O Companion Chip - ECEE

Intel 80312 I/O Companion Chip - ECEE

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Intel</strong> ® <strong>80312</strong> I/O <strong>Companion</strong> <strong>Chip</strong>DMA Controller Unit9.10 DMA Channel Programming ExamplesThe software for the DMA channels falls into the following categories:• Channel initialization• Start DMA transfer• Suspend channelExamples for each of the software is shown in the following sections as pseudo code flow.9.10.1 Software DMA Controller InitializationThe DMA Controller is designed to have independent control of the interrupts, enables, andcontrol. The initialization consists of virtually no overhead as shown in Figure 9-10.Figure 9-10.Software Example for Channel InitializationCCR0 = 0x0000 0000 ; Disable channelCall setup_channel9.10.2 Software Start DMA TransferThe DMA channel control register provides independent control per channel based on each timethe DMA channel is configured. This provides the greatest flexibility to the applicationsprogrammer. The example shown in Figure 9-11 describes the pseudo code for starting a DMAtransfer on channel 0.Figure 9-11.Software Example for DMA Transfer; Set up descriptor in local memory at address dd.nad = 0; No chainingd.pad = 0x0000F000 ; Source address of 0000F000Hd.puad = 0; DAC is not usedd.lad = 0xB0000000 ; Destination address B0000000Hd.bc = 64 ; byte count of 64d.dc = 0x00000016 ; PCI Memory Read command, DAC disabled,; Interrupt processor after transfer; Check for inactive channel & no interrupts pendingif (CSR0 != 0) exit; If channel is not ready, exit; Start transferNDAR0 = &d; Set up descriptor addressCCR0 = 0x00000001 ; Set Channel Enable bit to start9-20 Developer’s Manual

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!