⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initsru.asm

📁 ADI 公司的DSP ADSP21369 EZ-KIT LITE开发板的全部源代码
💻 ASM
字号:
/***************************************************************************************************
**
**  File: initSRU.asm
**  Date: 7/29/05
**  Use:  ADSP-21369 EZkit. The program initializes and sets the SRU & DAI/DPI pins
**
*****************************************************************************************************/

#include <def21369.h>

// The following definition allows the SRU macro to check for errors. Once the routings have
// been verified, this definition can be removed to save some program memory space.
// The preprocessor will issue a warning stating this when using the SRU macro without this
// definition
#define SRUDEBUG  // Check SRU Routings for errors.
#include <SRU.h>
.section/pm     seg_pmco;
.global _initSRU;

_initSRU:

    r0 = 0x000FFFFF;                    // Disable the pull-up resistors on all 20 pins
    dm(DAI_PIN_PULLUP) = r0;

//------------------------------------------------------------------------
//  Connect the SPDIF Receiver
    SRU(DAI_PB18_O, DIR_I);

//------------------------------------------------------------------------
//  Connect the SPDIF Receiver outputs.

    SRU(DIR_DAT_O, SPORT0_DA_I);
    SRU(DIR_FS_O, SPORT0_FS_I);
    SRU(DIR_CLK_O, SPORT0_CLK_I);

//------------------------------------------------------------------------
//  Connect the SPDIF Transmitter Inputs

    SRU(SPORT3_DA_O, DIT_DAT_I);
    SRU(DIR_FS_O, DIT_FS_I);
    SRU(DIR_CLK_O, DIT_CLK_I);
    SRU(DIR_CLK_O, SPORT3_CLK_I);
    SRU(DIR_TDMCLK_O, DIT_HFCLK_I);
    SRU(DIR_FS_O, SPORT3_FS_I );

//------------------------------------------------------------------------
//  Connect the SPDIF Transmitter Output.
    SRU(DIT_O, DAI_PB01_I);

//------------------------------------------------------------------------
//  Tie the pin buffer inputs LOW for DAI pin 18.  Even though
//    these pins are inputs to the SHARC, tying unused pin buffer inputs
//    LOW is "good coding style" to eliminate the possibility of
//    termination artifacts internal to the IC.  Note that signal
//    integrity is degraded only with a few specific SRU combinations.
//    In practice, this occurs VERY rarely, and these connections are
//    typically unnecessary.

    SRU(LOW, DAI_PB18_I);

//------------------------------------------------------------------------
//  Tie the pin buffer enable inputs LOW for DAI pin 18 so
//    that they are always input pins.

    SRU(LOW, PBEN18_I);

//-----------------------------------------------------------------------------

//------------------------------------------------------------------------
//  Tie the pin buffer enable inputs HIGH to make DAI pin 1 an output.
    SRU(HIGH,PBEN01_I);

_initSRU.end:    rts;

/*********************************************** EOF ****************************************/





⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -