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 #412 background imageLoading...
Page #412 background image
Programming Examples
6-40 ADSP-21368 SHARC Processor Hardware Reference
/* Main code section */
.global _main;
.SECTION/PM seg_pmco;
_main:
/* Init SPI MASTER TX */
r0=0;
dm(SPICTL) = r0;
dm(SPIFLG) = r0;
/* Set up DAG registers */
i4 = tx_buf;
m4 = 1;
ustat3 = DMISO| /* Disable MISO on transfers */
WL32| /* 32-bit words */
SPIMS| /* Master mode (internal SPICLK) */
SPIEN| /* Enable SPI port */
TIMOD1; /* Initialize SPI port to begin
transmitting when DMA is enabled */
dm(SPICTL) = ustat3;
/* set the SPI baud rate to CCLK/8*64 (650.39KHz @ 333MHz)*/
ustat3 = 0x80;
dm(SPIBAUD) = ustat3;
/* Set up loop to transmit data */
lcntr = LENGTH(tx_buf), do txloop until lce;
/* Retrieve data using DAG1 and send TX through SPI */
r0 = dm(i4,m4);
dm(TXSPI) = r0;
ustat3=dm(SPISTAT);
bit tst ustat3 SPITXS;
if tf jump (pc,-2);
txloop: nop;
_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