Analog Devices ADSP-2106x SHARC User Manual page 339

Table of Contents

Advertisement

/*_______________________________________________________________
ADSP-2106x DMA-Driven LINK Loopback Example
This example shows an internally looped-back link port transfer.
Two DMA channels are used. Link buffer 3 (LBUF3) and corresponding
DMA channel 5 is used for transmit. Link buffer 2 (LBUF2) and
corresponding DMA channel 5 is used for receive. The LBUF2 interrupt
will occur when the DMA transfer is complete. Loopback is achieved
by assigning the transmit and receive link buffers to the
same port (Port 0).
_______________________________________________________________*/
#define N 8
#include "def21060.h"
.segment/dm dm32_b1;
.var source[N] = 0x11111111, 0x22222222, 0x33333333, 0x44444444,
0x55555555, 0x66666666, 0x77777777, 0x88888888;
.var destination[N];
.endseg;
.segment/pm rst_svc;
nop;
jump start;
.endseg;
.segment/pm lp2_svc;
jump lp2rx;
.endseg;
/*____________________main routine____________________*/
.segment/pm pm48_1b0;
start:
r0=source;
dm(II5)=r0;
r0=destination;
dm(II4)=r0;
r0=1;
dm(IM5)=r0;
dm(IM4)=r0;
r0=@source;
dm(C5)=r0;
dm(C4)=r0;
r0=0x0000c000;
dm(LCOM)=r0;
www.BDTIC.com/ADI
Link Ports
/* Data segment name described in arch. file.*/
/* Reset vector from arch. file.
/* First location is used for booting.*/
/* Link buffer 2 interrupt vector.*/
/* Main code segment from arch. file.*/
/* Set DMA tx index to start of source buffer.*/
/* Set DMA rx index to start of destination buffer.*/
/* Set DMA modify (stride) to 1.*/
/* Set DMA count to length of data buffer.*/
/* LCOM Register: 2x rate */
/* note: use r0=0x00010000 on rev. 0.X silicon */
(listing continues on next page)
9
*/
9 – 29

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADSP-2106x SHARC and is the answer not in the manual?

Questions and answers

Table of Contents