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

📄 dsp28_xintf.c

📁 2812开发板DAC转换程序,用于电流电压的模数转换
💻 C
字号:


#include "DSP28_Device.h"

//---------------------------------------------------------------------------
// InitXINTF: 
//---------------------------------------------------------------------------
// This function initializes the External Interface to a known state.
//
void InitXintf(void)
{

	#if  F2812
    // Example of chaning the timing of XINTF Zones.  
    // Note acutal values should be based on the hardware 
    // attached to the zone - timings presented here are 
    // for example purposes.
     
    // All Zones:
    // Timing for all zones based on XTIMCLK = SYSCLKOUT 
    XintfRegs.XINTCNF2.bit.XTIMCLK = 0x0000;
    
    // Zone 0:
    // Change write access lead active trail timing
	// When using ready, ACTIVE must be 1 or greater
	// Lead must always be 1 or greater
	// Use timings based on SYSCLKOUT = XTIMCLK
	XintfRegs.XTIMING1.bit.XWRTRAIL = 1;
	XintfRegs.XTIMING1.bit.XWRACTIVE = 7;
	XintfRegs.XTIMING1.bit.XWRLEAD = 1;
	// Do not double lead/active/trail for Zone 0
	XintfRegs.XTIMING1.bit.X2TIMING = 0;
	
	// Zone 2
	// Ignore XREADY for Zone 2 accesses
	// Change read access lead/active/trail timing
//	XintfRegs.XTIMING2.bit.USEREADY = 0;
//	XintfRegs.XTIMING2.bit.XRDLEAD = 3;
//	XintfRegs.XTIMING2.bit.XWRACTIVE = 7;
//	XintfRegs.XTIMING2.bit.XRDTRAIL = 3;
	// Double lead/active/trial timing for Zone 2
//	XintfRegs.XTIMING2.bit.X2TIMING = 0;

    // Zone 2 is slow, so add additional BCYC cycles when ever switching
    // from Zone 2 to another Zone.  This will help avoid
    // bus contention.
    XintfRegs.XBANK.bit.BANK = 2;
    XintfRegs.XBANK.bit.BCYC = 3; 
	
	#endif
}	
	
//===========================================================================
// No more.
//===========================================================================

⌨️ 快捷键说明

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