__interwork int __low_level_init(void)
{
/*==================================*/
/* Initialize hardware. */
/*==================================*/
/*==================================*/
/* Choose if segment initialization */
/* should be done or not. */
/* Return: 0 to omit seg_init */
/* 1 to run seg_init */
/*==================================*/
*(volatile u32 *)0x40021014 = 0x00000114; /* Enable FSMC clock */
*(volatile u32 *)0x40021018 = 0x000001E0; /* Enable GPIOD, GPIOE, GPIOF and GPIOG clocks */
/* --------------------- CFG GPIO --------------------- */
/* SRAM Data lines, NOE and NWE configuration */
/* SRAM Address lines configuration */
/* NOE and NWE configuration */
/* NE3 configuration */
/* NBL0, NBL1 configuration */
*(volatile u32 *)0x40011400 = 0x44BB44BB;
*(volatile u32 *)0x40011404 = 0xBBBBBBBB;
*(volatile u32 *)0x40011800 = 0xB44444BB;
*(volatile u32 *)0x40011804 = 0xBBBBBBBB;
*(volatile u32 *)0x40011C00 = 0x44BBBBBB;
*(volatile u32 *)0x40011C04 = 0xBBBB4444;
*(volatile u32 *)0x40012000 = 0x44BBBBBB;
*(volatile u32 *)0x40012004 = 0x44444B44;
/* --------------------- CFG FSMC --------------------- */
*(volatile u32 *)0xA0000010 = 0x00001011; /* Enable FSMC Bank1_SRAM Bank */
*(volatile u32 *)0xA0000014 = 0x00000200;
return 1;
}
在里面添加自己的一些程序,像led什么的可以运行,添加对Flash操作就不行 这是为什么??求大神求解!!! |