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

📄 44bmain.c

📁 arm7
💻 C
字号:
/*************************************************************************
* FILE NAME                                     VERSION                
*                                                                      
*        44bmain.c            		            1.0              
*                                                                      
* COMPONENT                                                            
*                                                                      
*        Flash Operation such as erase/program                                    
*                                                                      
* DESCRIPTION                                                          
*                                                                      
*      	  
*                                                                      
* DATA STRUCTURES                                                      
*                                                                      
*               
*                                                                      
* FUNCTIONS                                                            
*
*        
*                                                                      
* DEPENDENCIES                                                         
*        
*       
* HISTORY
*	
*		Meter Chen                2001-7
*                                                               
************************************************************************/

#include <stdlib.h>
#include <string.h>
#include <math.h>

#include "..\inc\def.h"
#include "..\inc\29lvflash.h"
#include "..\inc\option.h"
#include "..\inc\44b.h"
#include "..\inc\44blib.h"

int main(void)
{
    
    /**** SYSTEM INITIALIZE */
    
	/* disable system cache */
    rSYSCFG = 0;

    //__rt_lib_init();

    Port_Init();
    
    /**** FLASH OPERATION */
    
    /* 1 - get flash'ID, if it work well, at least our hardware is good */
    Flash_ReadID();
    
    /* 2 - erase the whole chip, also you can erase it sector by sector */
    Flash_Erase_Chip();
    
    /* 3 - write into flash from a temporary buffer */
    /* the buffer base is 0xc100000, the image length is 1000000, you can change these */
    Flash_Write(0, (char *)0xc100000, 100000);
    
    /**** PROGRAM OVER */

    while(1)
    {
    	Led_Display(0);
    	Delay(1000);
    	Led_Display(3);
    	Delay(10000);
    }
}

⌨️ 快捷键说明

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