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

📄 f2812communication.c

📁 TMSC320F2812串口SCI通信,SCIA,SCIB,波特率设置
💻 C
字号:
/*****************************************************************************/
/*                         IO communication program                          */ 
/*****************************************************************************/
                                                             
#include "DSP281x_Device.h"
#include "DSP281x_Examples.h"
 
#pragma DATA_SECTION(Kdata, "KDRAMdata"); 
unsigned int Kdata[128];

#pragma DATA_SECTION(Fdata, "FPGAdata");
unsigned int Fdata[6]; 



//struct ECAN_REGS ECanaShadow ;
void main(void)
{   
    
    InitSysCtrl();      //Initialize System Control registers, PLL, WatchDog, Clocks to default state:
                        //This function is found in the DSP281x_SysCtrl.c file.
    
	InitGpio();         //Select GPIO for the device or for the specific application:
                        //This function is found in the DSP281x_Gpio.c file.
	DINT;               //Disable and clear all CPU interrupts:
	
	InitPieCtrl();      //Initialize Pie Control Registers To Default State:
                        //This function is found in the DSP281x_PieCtrl.c file.        
    IER = 0x0000;
	IFR = 0x0000;
    InitPieVectTable(); //Initialize the PIE Vector Table To a Known State:
                        //This function is found in DSP281x_PieVect.c.
                        //This function populates the PIE vector table with pointers
                        //to the shell ISR functions found in DSP281x_DefaultIsr.c.	 
    InitXIntrupt();     //This function initializes external interrupts to a known state.
                        //which will be found in DSP281x_XInterrupt.c
    
    /*** Initialize the FLASH ***/
	//InitFlash();		// Initialize the FLASH (FILE: SysCtrl.c)

    InitPeripherals();  //Initialize all the Device Peripherals to a known state:
                        //This function is found in DSP281x_InitPeripherals.c
    
    EnableInterrupts(); //This function enables the PIE module and CPU interrupt 
    
    eCAN_TX();
    
    eCAN_RX();
    
    for(;;);
    
}   

⌨️ 快捷键说明

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