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

📄 init.gel

📁 DSP中用MCBSP模拟I2C接口的程序.其中DSP的型号是C5416
💻 GEL
字号:
/* set PMST to: MP =  OVLY = 1; DROM off, CLKOUT on */
#define PMST            0x1d    
#define PMST_VAL        0x00e0  
/*#define PMST_VAL        0xffe0 */

/* set wait-state control reg for: 2 w/s or more on i/o; one for ext memory */
#define SWWSR           0x28
/*#define SWWSR_VAL       0x0209  */
#define SWWSR_VAL       0x2492 


/* set external-banks switch control for: no bank switching; BH set */
#define BSCR            0x29
#define BSCR_VAL        0x02

/* The Startup() function is executed when the GEL file is loaded.
 * If you wish to have the system initialized for the C5400 automatically
 * remove the comments from around the init() function call.
 *
 * If you remove the comments from around the reset() function call,
 * the board will be reset each time you load the debugger.
 */

StartUp()
{
	 init(); 
	/* reset(); */
}

menuitem "C5400";

hotmenu reset()
{
        GEL_Reset();
        init();
        GEL_MapOn();
        GEL_MapReset();
        GEL_XMDef(0,0x1e,1,0x8000,0x7f);
        GEL_XMOn();
       
        GEL_MapAdd(0,1,0x8000,1,1);
        GEL_MapAdd(0,0,0x20000,1,1); 
        /*
        GEL_MapAdd(0,0,0xffff,1,1);
        GEL_MapAdd(0,1,0xffff,1,1);  */
        GEL_MapAdd(0,2,0xffff,1,1);
                
        
        
}

hotmenu init()
{
        *(int *)PMST = PMST_VAL;
        *(int *)SWWSR = SWWSR_VAL;
        *(int *)BSCR = BSCR_VAL;
        GEL_MemoryFill(0x4,2,1,0xff03);
}

⌨️ 快捷键说明

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