Analog Devices SHARC ADSP-21368 Hardware Reference Manual page 413

Hide thumbs Also See for SHARC ADSP-21368:
Table of Contents

Advertisement

Listing 6-2. SPI Master Mode DMA-Driven Transmit
/* SPI Control registers
#define SPICTL
#define SPIFLG
#define SPIBAUD (0x1005)
/* SPI DMA registers
#define IISPI
#define IMSPI
#define CSPI
#define CPSPI
#define SPIDMAC (0x1084)
/*SPICTL bits
#define TIMOD2
#define DMISO
#define WL32
#define SPIMS
#define SPIEN
/*SPIFLG bits
#define DS0EN
/*SPIDMAC bits
#define SPIDEN
/* Default buffer size */
#define BUFSIZE 0x100
/*========================================================*/
/* Source data to be transmitted through SPI DMA
.section/dm seg_dmda;
.var src_buf[BUFSIZE] = "source.dat";
ADSP-21368 SHARC Processor Hardware Reference
Serial Peripheral Interface Ports
(0x1000)
/* SPI Control register
(0x1001)
/* SPI Flag register
/* SPI baud setup register
(0x1080)
/* Internal DMA address
(0x1081)
/* Internal DMA access modifier */
(0x1082)
/* Number of words to transfers */
(0x1083)
/* Points to next DMA parameters*/
/* SPI DMA control register
(0x0002)
/* Use DMA for transfers
(0x0020)
/* Disable MISO pin
(0x0100)
/* SPI Word Length = 32
(0x1000)
/* SPI Master if 1, Slave if 0
(0x4000)
/* SPI port Enable
(0x0001)
/* use FLG0 as SPI device-select*/
(0x0001)
/* enable DMA on the SPI port
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
6-41

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents