EasyManuals Logo

Analog Devices SHARC ADSP-21368 User Manual

Analog Devices SHARC ADSP-21368
894 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #417 background imageLoading...
Page #417 background image
ADSP-21368 SHARC Processor Hardware Reference 6-45
Serial Peripheral Interface Ports
/* setup first DMA in chain */
ustat3 = 8; dm(CSPI) = ustat3; /* count = 8 words */
ustat3 = 1; dm(IMSPI) = ustat3; /* step size = 1 */
ustat3 = dest_bufA; dm(IISPI) = ustat3; /* point to dest_bufA */
/* set the SPI baud rate to CCLK/8*64 (650.39KHz @ 333MHz)*/
ustat3 = 0x80;
dm(SPIBAUD) = ustat3;
/* configure processor’s SPI slave-select signals */
ustat3 = DS0EN| /*enable SPI slave device select zero */
SPIFLG3|SPIFLG2|SPIFLG1; /* Set SPIFLG0 low to */
dm(SPIFLG) = ustat3; /*select SPI slave on FLAG0 pin */
/* configure SPI port to power-on settings */
ustat3 = CPHASE| /* sample MISO on second edge of SPICLK */
CLKPL| /* sampling edge of SPICLK is rising */
WL32| /* 32-bit words */
SPIMS| /* Master mode (internal SPICLK) */
SPIEN| /* Enable SPI port */
SENDZ| /* when TXSPI empty, MOSI sends zeros */
TIMOD2; /* Start SPICLK when DMA is enabled */
dm(SPICTL) = ustat3;
/*configure SPI for chained receive DMA operation */
ustat3 = SPIRCV| /* DMA direction = receive */
SPICHEN| /* enable DMA chaining */
SPIDEN; /* enabling DMA initiates the transfer */
dm(SPIDMAC) = ustat3;
/* 1st DMA starts when a valid address is written to CPSPI */
ustat3 = (0x7FFFF&(first_tcb+3));
dm(CPSPI) = ustat3; /* point to tcb_A */
_main.end: jump(pc,0);

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Analog Devices SHARC ADSP-21368 and is the answer not in the manual?

Analog Devices SHARC ADSP-21368 Specifications

General IconGeneral
BrandAnalog Devices
ModelSHARC ADSP-21368
CategoryComputer Hardware
LanguageEnglish

Related product manuals