Input Data Port Programming Example - Analog Devices SHARC ADSP-21368 Hardware Reference Manual

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

Advertisement

Input Data Port Programming Example

Listing 7-1
shows a data transfer using an interrupt service routine (ISR).
The transfer takes place through the digital applications interface (DAI).
This code implements the algorithm outlined in
Transfer" on page
Listing 7-1. Interrupt-Driven Data Transfer
/* Using Interrupt-Driven Transfers from the IDP FIFO */
#define IDP_ENABLE
#define IDP_CTL0
#define IDP_FIFO_GTN_INT (8)
#define IDP_FIFO
#define DAI_IRPTL_FE (0x2480)
#define DAI_IRPTL_RE (0x2481)
#define DAI_IRPTL_PRI (0x2484) /* Interrupt priority */
.section/dm seg_dmda;
.var OutBuffer[6];
.section/pm seg_pmco;
initIDP:
r0 = dm(IDP_CTL0);
r0 = BSET r0 BY IDP_ENABLE;
dm(IDP_CTL0) = r0;
r0 = BCLR r0 BY IDP_ENABLE;
r0 = BCLR r0 BY 10;
r0 = BCLR r0 BY 9;
r0 = BCLR r0 BY 8;
ADSP-21368 SHARC Processor Hardware Reference
7-16.
(8)
/* IDP_ENABLE = IDP_CTL0[7] */
(0x24B0)
/* Memory-mapped register */
/* Bit 8 in interrupt regs */
(0x24D0)
/* IDP FIFO packing mode */
/* Falling edge int latch */
/* Rising edge int latch */
/* Reset the IDP */
/* Set IDP serial input channel 0 */
/* to receive in I2S format */
Input Data Port
"FIFO to Memory Data
7-31

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?

Table of Contents