亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fbtc55.c

?? 5509A燒寫flash的bootloader啟動(dòng)程序
?? C
字號(hào):
 /*********************************************************************
 *          (C) COPYRIGHT TEXAS INSTRUMENTS, INC. 2000, 2001
 * FBTC55.c -- Main Loop and global utility funcs for
 *             55x FlashBurn FBTC
 ********************************************************************/

/* Change Log:
 */
/*
 * $Log: FBTC55.c,v $
 * Revision 1.5  2001/06/27 17:55:14  heeschen
 * v00.32 Beta Prep
 * Capturing all files to prepare for Beta Release
 *
 * Revision 1.4  2001/04/19 18:56:50  heeschen
 * v00.30 Alpha - Updated comments
 *
 *
 */

#include <stdio.h>
#include "fbtc55.h"
#include "fbcmd.h"
#include "flash.h"


// add by mark
#include <csl.h>
#include <csl_pll.h>
#include <csl_emif.h>
#include <csl_chip.h>


/* Local Prototypes
 */


/* -------------
 * Globals
 * -------------
 */
/* The message must be global; Host will use
 * its address for sending and receiving
 * messages.
 * This program reads what's in the message block
 * and processes it. When done processing,
 * this program will store any response data back
 * into the same block.
 */
u16 theMessage[1+ARGSIZEWORDS+MAXDATAWORDS] = {0}; // the latest message from Host

/* This function must be global; Host will
 * set a breakpoint on it.
 * When this program hits the breakpoint,
 * host will detect the halt and process
 * any response info that may be in the message
 * block. When Host wants to send a message
 * to this FBTC, it will store
 * the message into the global message block
 * and start this FBTC running.
 */
void doMessageProc();  // Message Exchange routine

/* -------------
 * Local Variables & funcs
 * -------------
 */

/* This is the Status Word described
 * in the Comm. Protocol Spec.
 */	
static u16 m_ProtocolStatusWord = 0;



// add by mark
PLL_Config  myConfig      = {
  0,    //IAI: the PLL locks using the same process that was underway 
                //before the idle mode was entered
  1,    //IOB: If the PLL indicates a break in the phase lock, 
                //it switches to its bypass mode and restarts the PLL phase-locking 
                //sequence
  24,    //PLL multiply value; multiply 24 times
  1             //Divide by 2 PLL divide value; it can be either PLL divide value 
                //(when PLL is enabled), or Bypass-mode divide value
                //(PLL in bypass mode, if PLL multiply value is set to 1)
};

// add by mark
EMIF_Config emiffig = {
  0x231, 	//EGCR  : the MEMFREQ = 00,the clock for the memory is equal to cpu frequence
  			//		  the WPE = 0 ,forbiden the writing posting when we debug the EMIF
  			//        the MEMCEN = 1,the memory clock is reflected on the CLKMEM pin
  			//        the NOHOLD = 1,HOLD requests are not recognized by the EMIF 
  			
  			//錯(cuò)了吧 MEMFREQ = 001 , 是二分頻
  			//錯(cuò)了吧,EGCR里沒(méi)有HOLD信號(hào)
  			//bit-4:為1代表不采樣ardy off
  			
  0xFFFF,	//EMI_RST: any write to this register resets the EMIF state machine
  0x1FFF,	//CE0_1:  CE0 space control register 1
  			////        MTYPE = 001,16-bit data bus width async memory, FIFO
  0xFFFF,   //CE0_2:  CE0 space control register 2
  0x00FF,   //CE0_3:  CE0 space control register 3
  			//        TIMEOUT = 0xFF;  
  
  0x1FFF,	//CE1_1:  CE1 space control register 1
            ////        MTYPE = 001,16-bit data bus width async memory, flash
  0xFFFF,	//CE1_2:  CE1 space control register 2
  0x00FF,	//CE1_3:  CE1 space control register 3
  			
  			//為何CE1中不設(shè)置SDRAM???
  
  0x3FFF,	//CE2_1:  CE2 space control register 1
            //        MTYPE = 011,Synchronous DRAM(SDRAM),16-bit data bus width
  0xFFFF,	//CE2_2:  CE2 space control register 2
  0x00FF,	//CE2_3:  CE2 space control register 3
  
  0x3FFF,	//CE3_1:  CE3 space control register 1
  0xFFFF,	//CE3_2:  CE3 space control register 2
  0x00FF,	//CE3_3:  CE3 space control register 3
  
  0x2911,   //SDC1:   SDRAM control register 1
  			//		  TRC = 8 
  			//        SDSIZE = 0;SDWID = 0
  			//        RFEN = 1
  			//        TRCD = 2
  			//        TRP  = 2
  			
  			//這三個(gè)時(shí)間應(yīng)該算一下
  			//tRC = 66ns, tRCD = 20ns, tRP = 20ns.(都是最小值)
  			//CLKMEM = 1000/72=13.?ns,  但這里好像是算成CLKMEM = 1000/144= 6.94ns
  			//TRC = 66 / 6.94 - 1 = 8.5
  			//這樣比用72Mhz算,更保險(xiǎn)
  			
  0x0410,	//SDPER : SDRAM period register
  			//		  7ns *4096
  			
  			//?  可410h = 1040呀
  			
  0x07FF,    //SDINIT: SDRAM initialization register
  			//        any write to this register to init the all CE spaces,
  			//        do it after hardware reset or power up the C55x device
  0x0131	//SDC2:	  SDRAM control register 2
  			//        SDACC = 0;
  			//        TMRD = 01;
  			//        TRAS = 0101;
  			//        TACTV2ACTV = 0001;
  			//需要計(jì)算一下
  			//tMRD = 15/20ns, tRAS = 44~120000ns,tRRD = 15ns.
  			//例如 TMRD = 44 / 6.94 - 1 = 5.3
  																			
  };
  
  
  
unsigned long i = 0 ;                     // add by mark
//unsigned long nFileLength = 1222 ;           // add by mark
unsigned long nFileLength =  707-2;//24257-2;//21981-2;           // add by mark
unsigned short nDataWrite [2] = {0,0} ;    // add by mark

void dataIo()
{
    nDataWrite[1] = nDataWrite[0] ;

}

void main()    // add by mark
{
    /*初始化CSL庫(kù)*/	
    CSL_init();
    
    /*EMIF為全EMIF接口*/
    CHIP_RSET(XBSR,0x0a01);
    
    /*設(shè)置系統(tǒng)的運(yùn)行速度為144MHz*/
    PLL_config(&myConfig);
    
    /*初始化DSP的外部空間*/
    // EMIF準(zhǔn)備
    // CE1--運(yùn)氣不錯(cuò),與FlashBurn默認(rèn)的相同 
    EMIF_config(&emiffig);    
       
    printf("Target FBTC Running\n");
    // FLASH soft reset
    printf("flash_reset()\n");
    flash_reset();
    
    // Flash Erase
    printf("EraseFlash()\n");
    EraseFlash() ; 
    printf("end EraseFlash() len = %d\n",nFileLength); 
    
    //21981-2  
    
    // Flash Program, nFileLength for 實(shí)際文件長(zhǎng)度
    for ( i=0; i< nFileLength; i ++ )
    {
        // 文件探針
        dataIo() ;
        
        // 寫入一個(gè)word   
        BurnFlash( i * 2 , nDataWrite , 2 ) ;     
        
        // 每寫入1000個(gè)word,打印輸出一個(gè)字符
        if ( i % 1000 == 0 )
        {
            puts("thousand");
            if ( i % 10000 == 0 )
                puts("ten thousand");
        }
    }    
}

/*
void main()
{

	flash_reset();
	
    // User comfort message. Runs much
    // faster and leaner if no printf is
    // used anywhere.
     
//	printf("Target FBTC Running\n");

	InitFlash();
		
	// Runs forever: I expect Host component
	// to halt me by closing CCS.
	 
	for(;;)
	{
		doMessageProc();   // when this returns, I have a message.
		
    	doCommand(theMessage); // Process the new message
	}

}
*/

/* Global Utility Functions
 */


/* This do-nothing function is here to
 * define a global symbol. The Host app.
 * will set a breakpoint at this loc.
 * When this program steps off the
 * breakpoint (returns from this func),
 * that means that the Host has filled
 * the global message block (at theMessage)
 * with a command and data to process.
 * This prog. will process the message,
 * write any response data back into
 * the message block, and then come back
 * here and hit the breakpoint.
 */
void doMessageProc()
{
	/* Optimizer will want to delete
	 * this function, since it doesn't
	 * appear to do anything useful.
	 * Assigning a value to a volatile
	 * forces optimizer to keep this code. 
	 */ 
	volatile int FoolTheOptimizer = 0;
}


u16 GetProtocolVersionID(void)
{
	return (u16)COMMPROTOCOLVERSION;
}

u16 GetProtocolStatusWord(void)
{
	return m_ProtocolStatusWord;
}


void SendI4ToHost(u16 cmd, long val)
{
	StoreCmd(cmd);
	StoreArg(0, (u16)(val >> 16));
	StoreArg(1, (u16)(val & 0x0000ffff));

}


void SendI2ToHost(u16 cmd, u16 val)
{
	StoreCmd(cmd);
	StoreArg(0, val);
}


/* Utility Status Word funcs
 */

	/* Set the 4 status bits
	 */
void SetErrorBits(u16 x)
{
    m_ProtocolStatusWord &= ~(0x000f);
    m_ProtocolStatusWord |= ((x) & 0x000f);
}



/* Stores val into the message command bytes
 */
void StoreCmd(u16 val)
{
	theMessage[CMDINDEX] = val;
}

u16 GetCmd(void)
{
	return theMessage[CMDINDEX];
}

/* Stores val into the message argument bytes
 * at argindex.
 * Argindex is 0-15.
 */
void StoreArg(int argindex, u16 val)
{
	int myindex = ARGINDEX + argindex;
	theMessage[myindex] = val;
}

/* Returns an arg value from arg index 0-15
 */
u16  GetArgVal(int index)
{
	return theMessage[ARGINDEX + index];
}

u16 *GetMessage(void)
{
	return &theMessage[0];
}

u16 *GetData(void)
{
	return &theMessage[DATAINDEX];
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
制服丝袜中文字幕亚洲| 亚洲综合图片区| 成人免费视频一区| 最新欧美精品一区二区三区| 欧美亚洲高清一区二区三区不卡| 香蕉久久夜色精品国产使用方法 | 国产精品综合二区| 国产精品女同一区二区三区| 色综合天天天天做夜夜夜夜做| 亚洲一区二区三区四区不卡| 日韩午夜激情视频| 国产成人免费视频一区| 亚洲美女在线国产| 制服丝袜激情欧洲亚洲| 国产精品一二三| 一区二区三区国产豹纹内裤在线| 欧美精品免费视频| 国产麻豆精品在线| 亚洲欧美国产毛片在线| 777久久久精品| 国产精品69毛片高清亚洲| 亚洲免费观看视频| 欧美大片顶级少妇| www.欧美亚洲| 香蕉加勒比综合久久| 2017欧美狠狠色| 在线视频综合导航| 极品尤物av久久免费看| 亚洲欧美日韩综合aⅴ视频| 4hu四虎永久在线影院成人| 国产精品一线二线三线| 亚洲精品免费视频| 欧美mv日韩mv国产网站| 色综合天天综合在线视频| 免费三级欧美电影| 国产精品黄色在线观看| 欧美一区二区女人| 97精品久久久午夜一区二区三区 | 日韩国产精品久久久久久亚洲| 久久人人97超碰com| 日本二三区不卡| 国产美女精品在线| 亚洲一区二区三区三| 久久久噜噜噜久久中文字幕色伊伊 | 91麻豆swag| 国内不卡的二区三区中文字幕 | 欧美精品一区二区在线播放| 93久久精品日日躁夜夜躁欧美| 日本不卡在线视频| 日韩一区中文字幕| 久久老女人爱爱| 欧美日韩国产首页| 粉嫩久久99精品久久久久久夜| 日韩成人精品在线| 综合网在线视频| 久久综合久久久久88| 欧美另类变人与禽xxxxx| 播五月开心婷婷综合| 美女爽到高潮91| 亚洲精品欧美专区| 中文字幕不卡的av| www久久精品| 欧美剧情片在线观看| 91蝌蚪porny| 国产精品自拍av| 乱一区二区av| 亚洲国产成人av| 亚洲视频图片小说| 久久久噜噜噜久久人人看 | av不卡免费在线观看| 免费在线观看不卡| 亚洲成人动漫精品| 亚洲精品国产一区二区精华液 | 色88888久久久久久影院野外| 国产精品456露脸| 久久精品国产99久久6| 午夜电影一区二区三区| 亚洲免费观看在线视频| 国产精品成人一区二区艾草| 国产欧美中文在线| 精品成人私密视频| 日韩一级高清毛片| 欧美男人的天堂一二区| 在线视频你懂得一区| av亚洲精华国产精华精| 国产精品99久久久久久宅男| 久久99国产精品久久99| 热久久国产精品| 午夜精品久久久久久久久| 亚洲综合成人在线| 亚洲精品视频观看| 亚洲色欲色欲www| 亚洲三级在线看| 国产精品视频一区二区三区不卡| 亚洲精品一区二区三区蜜桃下载| 日韩欧美的一区二区| 欧美一卡2卡三卡4卡5免费| 91精品久久久久久久91蜜桃| 欧美日韩成人一区| 9191成人精品久久| 91精品国产综合久久久蜜臀图片| 6080午夜不卡| 在线电影国产精品| 制服丝袜日韩国产| 日韩午夜av一区| 日韩免费高清av| 精品欧美一区二区三区精品久久 | 久久久久亚洲蜜桃| 久久久久久久久久久久久女国产乱 | 91精品久久久久久久99蜜桃| 欧美一区二区在线视频| 日韩欧美激情一区| 久久这里都是精品| 国产亚洲婷婷免费| 日本一区二区三区国色天香| 国产精品不卡在线观看| 亚洲欧美日韩国产一区二区三区| 亚洲免费观看高清完整| 一区二区欧美国产| 亚洲成人精品一区二区| 日韩av电影免费观看高清完整版在线观看| 日韩精品视频网站| 另类的小说在线视频另类成人小视频在线 | 99国产精品国产精品久久| 91日韩一区二区三区| 欧美羞羞免费网站| 欧美一区二区三区啪啪| 精品国产电影一区二区| 国产午夜精品福利| 中文字幕亚洲区| 亚洲18色成人| 久久99国产精品久久99果冻传媒| 国产福利视频一区二区三区| eeuss鲁片一区二区三区 | 精品国产成人在线影院| 久久久国际精品| 亚洲桃色在线一区| 天天综合日日夜夜精品| 精品一区二区久久| a在线欧美一区| 欧美日韩一区二区三区在线看| 日韩一级黄色大片| 国产欧美日产一区| 一区二区三区四区蜜桃| 日本欧美韩国一区三区| 国产精品一区一区三区| 91社区在线播放| 3d成人动漫网站| 欧美激情一区不卡| 亚洲成人三级小说| 久久99精品国产麻豆不卡| 成人h动漫精品一区二| 欧美年轻男男videosbes| 久久免费午夜影院| 日韩久久一区二区| 欧美96一区二区免费视频| 国产成人免费视频网站| 在线免费一区三区| 亚洲精品一区二区三区香蕉| 亚洲免费观看高清在线观看| 捆绑调教美女网站视频一区| 成人av手机在线观看| 欧美一区日本一区韩国一区| 国产精品久久久久影视| 日本不卡一区二区三区| 成人精品一区二区三区中文字幕| 欧美吻胸吃奶大尺度电影| 久久男人中文字幕资源站| 亚洲免费在线观看| 国产综合久久久久久久久久久久| 色综合久久久网| 日韩精品中文字幕在线不卡尤物 | 精品国产91亚洲一区二区三区婷婷| 国产精品久久久久9999吃药| 欧美96一区二区免费视频| 99久久久免费精品国产一区二区| 欧美大胆一级视频| 亚洲免费在线观看| 国产成人亚洲精品青草天美| 欧美日韩三级一区| 中文字幕第一区| 美女在线视频一区| 在线观看日韩毛片| 欧美激情一区不卡| 久久精品国产网站| 欧美丝袜第三区| 国产精品久久久久aaaa樱花| 久久精品国产亚洲高清剧情介绍 | 国产精品白丝av| 制服丝袜日韩国产| 一区二区三区91| 成人h动漫精品一区二区| 精品国产乱码久久久久久图片| 亚洲mv在线观看| 一本久道中文字幕精品亚洲嫩| 国产欧美一区二区精品久导航| 蜜臀va亚洲va欧美va天堂| 欧美在线播放高清精品| 日韩美女久久久| 国产大片一区二区|