mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-17 23:48:13 +08:00
67 lines
3.4 KiB
INI
67 lines
3.4 KiB
INI
/*---------------------------------------------------------------------------*
|
|
* SW Flash/SDRAM Download Configuration Script *
|
|
* *
|
|
* Work Mode : Support different work mode,but OTP+ROM mode work *
|
|
* on FPGA platform only,Flash only mode must select *
|
|
* the VECTRESET reset *
|
|
* *
|
|
* Hardware Platform: Support FPGA test platform or ASIC chip platform *
|
|
* *
|
|
* Oscillator Select: Select external oscillator,it can speed up the *
|
|
* download,if you cannot be sure,select 'None' *
|
|
* *
|
|
* Fast Erase : Merge the multi-sectors erase into block erase,if *
|
|
* signal of board not good,select 'Normal' *
|
|
* *
|
|
* Lock Range : Prevent data damage from write protection *
|
|
* *
|
|
* Debug Port : Downloader debug interface *
|
|
* *
|
|
* Download Offset : Download the code to flash from the offset address, *
|
|
* the set value must be 4KB aligned!!£¡ *
|
|
* *
|
|
* CRC Option : Downloader CRC options settings *
|
|
* *
|
|
* Protect Address : Flash protection start address, downloader will not *
|
|
* erase the protected flash area. This value must be *
|
|
* 4KB aligned!!£¡ *
|
|
* *
|
|
* Protect Size : Flash protection size, downloader will not erase the *
|
|
* protected flash area. This value must be multiple of *
|
|
* 4KB!!£¡ *
|
|
*---------------------------------------------------------------------------*/
|
|
|
|
FUNC void Setup (void) {
|
|
//Work Mode[0:OTP only,1:OTP+FLASH,2:OTP+SDRAM,3:OTP+ROM,4:FLASH only,5:SDRAM Test]
|
|
_WDWORD(0x20007C00,1);
|
|
|
|
//Hardware Platform[0:ASIC platform,1:FPGA platform]
|
|
_WDWORD(0x20007C04,0);
|
|
|
|
//Oscillator Select[-1:None,0:32K,1:1M,2:2M,...,31:31M]
|
|
_WDWORD(0x20007C08,0);
|
|
|
|
//Fast Erase[0:Nomal,1:Fast]
|
|
_WDWORD(0x20007C0C,0);
|
|
|
|
//Lock Range[0:None,1:50%,2:75%,3:87.5%,4:100%]
|
|
_WDWORD(0x20007C10,0);
|
|
|
|
//Debug Port[0:none, 1:port 1, 2:port 2, 3:port 0, -1:none]
|
|
_WDWORD(0x20007C14,-1);
|
|
|
|
//Download Offset[0:0x00000000,where:0xWHERE, must be 4KB align!!!]
|
|
_WDWORD(0x20007C18,0);
|
|
|
|
//CRC Option[0x0000: Normal CRC, 0x43524346: Fast CRC 0x4352434E: No CRC]
|
|
_WDWORD(0x20007C1C,0x4352434E);
|
|
|
|
//Flash Protect Start Address[0:0x00000000,where:0xWHERE, must be 4KB align!!!]
|
|
_WDWORD(0x20007C20,0);
|
|
|
|
//Flash Protect Size[0:0x00000000,size:0xSIZE, must be multiple of 4KB!!!]
|
|
_WDWORD(0x20007C24,0xA000);
|
|
}
|
|
|
|
Setup();
|