hpw421初始版本
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
|
||||
FUNC void Initialization(void)
|
||||
{
|
||||
SP = _RDWORD(0x10000000);
|
||||
PC = _RDWORD(0x10000004);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
LOAD %L INCREMENTAL
|
||||
Initialization();
|
||||
@@ -0,0 +1,84 @@
|
||||
|
||||
|
||||
|
||||
FUNC void InitGpio(void)
|
||||
{
|
||||
// Config IOMUX
|
||||
/*
|
||||
gpio_mux_ctl_u(33,1);//d2
|
||||
gpio_mux_ctl_u(34,1);//d3
|
||||
gpio_mux_ctl_u(35,2);//clk
|
||||
gpio_mux_ctl_u(36,2);//cs
|
||||
gpio_mux_ctl_u(37,2);//d0 rx
|
||||
gpio_mux_ctl_u(38,2);//d1 tx
|
||||
*/
|
||||
_WDWORD(0x4000019c, 0x00002A94);
|
||||
}
|
||||
FUNC void InitFlash(void)
|
||||
{
|
||||
|
||||
}
|
||||
FUNC void InitXIP(void)
|
||||
{
|
||||
|
||||
_WDWORD(0x40000104,0x040000);//reset ssi0
|
||||
_WDWORD(0x40000104,0x040004);//reset ssi0
|
||||
_WDWORD(0x40000050,0x110000);//close spi0 mclk
|
||||
_WDWORD(0x40000070,0x1000000);//close spi0 pclk
|
||||
|
||||
|
||||
//config fmc
|
||||
_WDWORD(0x40000270, 0x0503);
|
||||
_Sleep_(1);// delay about 400us
|
||||
_WDWORD(0x40000270, 0x3503);
|
||||
//config cache
|
||||
_Sleep_(1);// delay about 400us
|
||||
_WDWORD(0x52000000, 0x0);
|
||||
_Sleep_(1);// delay about 400us
|
||||
_WDWORD(0x52000000, 0x21);
|
||||
_Sleep_(1);// delay about 400us
|
||||
_Sleep_(1);// delay about 400us
|
||||
_Sleep_(1);// delay about 400us
|
||||
_Sleep_(1);// delay about 400us
|
||||
|
||||
|
||||
//config xip spi
|
||||
_WDWORD(0x51000008, 0); //disable spi
|
||||
|
||||
_WDWORD(0x5100002c,0); //close IE
|
||||
_WDWORD(0x51000000,0x1F); //32bit SPI data
|
||||
_WDWORD(0x51000010,0x01); //enable select slave -- SE
|
||||
_WDWORD(0x51000018,0x0); //TXFTL be set 0
|
||||
_WDWORD(0x5100001c,0x0); //RXFTL be set 0
|
||||
|
||||
_WDWORD(0x5100010c, 0x01);//enable select slave
|
||||
_WDWORD(0x51000114, 0xFF);//XIP time out
|
||||
|
||||
_WDWORD(0x51000014, 0x2);//div 2
|
||||
|
||||
//quad
|
||||
_WDWORD(0x51000108, (2)|(6<<4)|(2<<9)|(1<<22)|(1<<29)|(1<<23)|(0<<24)|(8<<13));
|
||||
_WDWORD(0x51000100, 0x6b);//quad read cmd
|
||||
_WDWORD(0x51000104, 0x6b);//quad read cmd
|
||||
|
||||
|
||||
// //dual
|
||||
// _WDWORD(0x51000108, (1)|(6<<4)|(2<<9)|(1<<22)|(1<<29)|(1<<23)|(0)|(8<<13));
|
||||
// _WDWORD(0x51000100, 0x3b);//dual read cmd
|
||||
// _WDWORD(0x51000104, 0x3b);//dual read cmd
|
||||
|
||||
|
||||
_WDWORD(0x51000008, 1); //enable spi
|
||||
}
|
||||
|
||||
FUNC void Initialization(void)
|
||||
{
|
||||
InitGpio();
|
||||
InitFlash();
|
||||
InitXIP();
|
||||
SP = _RDWORD(0x11001000);
|
||||
PC = _RDWORD(0x11001004);
|
||||
_WDWORD(0x4000013C, 0x11001001);
|
||||
}
|
||||
LOAD %L INCREMENTAL
|
||||
Initialization();
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
LOAD 0x10000000
|
||||
{
|
||||
EXE 0x10000000
|
||||
{
|
||||
startup_xinc.o (RESET, +FIRST)
|
||||
* (+RO)
|
||||
|
||||
}
|
||||
|
||||
RW +0000
|
||||
{
|
||||
* (+RW,+ZI)
|
||||
}
|
||||
|
||||
ScatterAssert(ImageLength(RW) < 1024 * 28)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
LOAD 0x11001000
|
||||
{
|
||||
EXE 0x11001000
|
||||
{
|
||||
startup_xinc.o (RESET, +FIRST)
|
||||
* (+RO)
|
||||
|
||||
}
|
||||
|
||||
RW 0x10002000
|
||||
{
|
||||
* (+RW,+ZI)
|
||||
*(ram_code)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user