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

📄 main_nonbios.c.bak

📁 2812 开发库
💻 BAK
字号:
/**********************************************************************
* File: main_nonBIOS.c
* Devices: TMS320F2812
* Author: .
* History:
**********************************************************************/

#include "DSP281x_Device.h"			// Peripheral address definitions




int AD_TEMP[8];		
int AD_chan_idx;		//AD通道指示

/**********************************************************************
* Function: main()
*
* Description: Main function for F281x example.
**********************************************************************/
void main(void)
{
int i,j;
unsigned int temp;
/*** CPU Initialization ***/
	InitSysCtrl();						// Initialize the CPU 
	InitXintf();						// Initialize the external memory interface 
	InitGpio();						// Initialize the shared GPIO pins 
	InitPieCtrl();				// Initialize and enable the PIE 

/*** Copy all FLASH sections that need to run from RAM ***/

// Section secureRamFuncs contains user defined code that runs from CSM secured RAM
	memcpy(	&secureRamFuncs_runstart,
			&secureRamFuncs_loadstart,
			&secureRamFuncs_loadend - &secureRamFuncs_loadstart);

/*** Initialize the FLASH ***/
	InitFlash();						// Initialize the FLASH 

/*** Peripheral Initialization ***/
	InitAdc();							// Initialize the ADC 
	InitEv();							// Initialize the Event Manager 
    	InitSci();
 
    for (i=0;i<6;i++)                   // Clear calculate buffer
    {
      for (j=0;j<132;j++) SAMPLE[i][j] = 0;
    }
    
	PieCtrlRegs.PIEIER1.bit.INTx6 = 1;	// Enable ADCINT in PIE group 1
	IER |= 0x0001;						// Enable INT1
    SetDBGIER(IER);						// Configure the DBGIER for realtime debug
	asm(" CLRC INTM, DBGM");			// Enable global interrupts and realtime debug
	
	XACinit();							//tlc2578 initialize

	DelayUs(20000);
	
	//通过给TLC2578发命令触发中断
	McbspaRegs.SPCR2.bit.FRST = 1;
	AD_chan_idx = 0;
	mcbsp_xmit(0);	
	

/*** Main Loop ***/
	while(1)							
	{			
		
		
	}             // end of while(1)

} //end of main()
/*** end of file *****************************************************/

⌨️ 快捷键说明

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