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 #414 background imageLoading...
Page #414 background image
Programming Examples
6-42 ADSP-21368 SHARC Processor Hardware Reference
/* Application code */
.global _main;
.segment/pm seg_pmco;
_main:
/* Init SPI MASTER TX DMA */
r0 = 0;
dm(SPICTL) = r0;
dm(SPIFLG) = r0;
dm(SPIDMAC) = r0;
r0 = DS0EN;
dm(SPIFLG) = r0; /*use flag0 as spi device select */
ustat3 = src_buf; dm(IISPI) = ustat3; /* point to 'src_buf'*/
ustat3 = LENGTH(src_buf); dm(CSPI) = ustat3; /* count = 256 */
ustat3 = 1; dm(IMSPI) = ustat3; /* step size = 1 */
/* set the SPI baud rate to CCLK/8*64 (650.39KHz @ 333MHz)*/
ustat3 = 0x80;
dm(SPIBAUD) = ustat3;
ustat3 = DMISO| /* Disable MISO on transfers */
WL32| /* 32-bit words */
SPIMS| /* Master mode (internal SPICLK) */
SPIEN| /* Enable SPI port */
TIMOD2; /* Initialize SPI port to begin
transmitting when DMA is enabled */
dm(SPICTL) = ustat3;
ustat3 = SPIDEN; dm(SPIDMAC) = ustat3; /* begin DMA */
/*========================================================*/
_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