提交 85d57f4b 编写于 作者: wuyangyong's avatar wuyangyong

update stm32f10x project

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1734 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 9358c96e
...@@ -105,6 +105,10 @@ static void LCD_FSMCConfig(void) ...@@ -105,6 +105,10 @@ static void LCD_FSMCConfig(void)
/* FSMC GPIO configure */ /* FSMC GPIO configure */
/*-- FSMC Configuration -------------------------------------------------*/ /*-- FSMC Configuration -------------------------------------------------*/
FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &Timing_read;
FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &Timing_write;
FSMC_NORSRAMStructInit(&FSMC_NORSRAMInitStructure);
Timing_read.FSMC_AddressSetupTime = 3; /* 地址建立时间 */ Timing_read.FSMC_AddressSetupTime = 3; /* 地址建立时间 */
Timing_read.FSMC_DataSetupTime = 4; /* 数据建立时间 */ Timing_read.FSMC_DataSetupTime = 4; /* 数据建立时间 */
Timing_read.FSMC_AccessMode = FSMC_AccessMode_A; /* FSMC 访问模式 */ Timing_read.FSMC_AccessMode = FSMC_AccessMode_A; /* FSMC 访问模式 */
...@@ -134,8 +138,6 @@ static void LCD_FSMCConfig(void) ...@@ -134,8 +138,6 @@ static void LCD_FSMCConfig(void)
FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Enable; FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Enable;
FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &Timing_read;
FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &Timing_write;
FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);
FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM2, ENABLE); FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM2, ENABLE);
......
...@@ -138,6 +138,11 @@ ...@@ -138,6 +138,11 @@
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 10 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 10
#define RT_LWIP_ETHTHREAD_STACKSIZE 512 #define RT_LWIP_ETHTHREAD_STACKSIZE 512
/* TCP sender buffer space */
#define RT_LWIP_TCP_SND_BUF 8192
/* TCP receive window. */
#define RT_LWIP_TCP_WND 8192
/* SECTION: RT-Thread/GUI */ /* SECTION: RT-Thread/GUI */
/* #define RT_USING_RTGUI */ /* #define RT_USING_RTGUI */
......
...@@ -104,12 +104,18 @@ static void LCD_FSMCConfig(void) ...@@ -104,12 +104,18 @@ static void LCD_FSMCConfig(void)
/* FSMC GPIO configure */ /* FSMC GPIO configure */
/*-- FSMC Configuration -------------------------------------------------*/ /*-- FSMC Configuration -------------------------------------------------*/
Timing_read.FSMC_AddressSetupTime = 30; /* 地址建立时间 */ FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &Timing_read;
Timing_read.FSMC_DataSetupTime = 30; /* 数据建立时间 */ FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &Timing_write;
FSMC_NORSRAMStructInit(&FSMC_NORSRAMInitStructure);
Timing_read.FSMC_AddressSetupTime = 8; /* 地址建立时间 */
Timing_read.FSMC_AddressHoldTime = 8; /* 地址保持时间 */
Timing_read.FSMC_DataSetupTime = 8; /* 数据建立时间 */
Timing_read.FSMC_AccessMode = FSMC_AccessMode_A; /* FSMC 访问模式 */ Timing_read.FSMC_AccessMode = FSMC_AccessMode_A; /* FSMC 访问模式 */
Timing_write.FSMC_AddressSetupTime = 3; /* 地址建立时间 */ Timing_write.FSMC_AddressSetupTime = 8; /* 地址建立时间 */
Timing_write.FSMC_DataSetupTime = 3; /* 数据建立时间 */ Timing_write.FSMC_AddressHoldTime = 8; /* 地址保持时间 */
Timing_write.FSMC_DataSetupTime = 8; /* 数据建立时间 */
Timing_write.FSMC_AccessMode = FSMC_AccessMode_A; /* FSMC 访问模式 */ Timing_write.FSMC_AccessMode = FSMC_AccessMode_A; /* FSMC 访问模式 */
/* Color LCD configuration ------------------------------------ /* Color LCD configuration ------------------------------------
...@@ -133,8 +139,6 @@ static void LCD_FSMCConfig(void) ...@@ -133,8 +139,6 @@ static void LCD_FSMCConfig(void)
FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable; FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Enable; FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Enable;
FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable; FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &Timing_read;
FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &Timing_write;
FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure);
FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM2, ENABLE); FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM2, ENABLE);
......
...@@ -39,7 +39,6 @@ extern int Image$$RW_IRAM1$$ZI$$Limit; ...@@ -39,7 +39,6 @@ extern int Image$$RW_IRAM1$$ZI$$Limit;
extern int __bss_end; extern int __bss_end;
#endif #endif
#ifdef DEBUG
/******************************************************************************* /*******************************************************************************
* Function Name : assert_failed * Function Name : assert_failed
* Description : Reports the name of the source file and the source line number * Description : Reports the name of the source file and the source line number
...@@ -57,7 +56,6 @@ void assert_failed(u8* file, u32 line) ...@@ -57,7 +56,6 @@ void assert_failed(u8* file, u32 line)
while (1) ; while (1) ;
} }
#endif
/** /**
* This function will startup RT-Thread RTOS. * This function will startup RT-Thread RTOS.
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
/* Exported constants --------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/
/* Uncomment the line below to expanse the "assert_param" macro in the /* Uncomment the line below to expanse the "assert_param" macro in the
Standard Peripheral Library drivers code */ Standard Peripheral Library drivers code */
/* #define USE_FULL_ASSERT 1 */ #define USE_FULL_ASSERT 1
/* Exported macro ------------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/
#ifdef USE_FULL_ASSERT #ifdef USE_FULL_ASSERT
......
...@@ -189,7 +189,8 @@ static void NVIC_Configuration(void) ...@@ -189,7 +189,8 @@ static void NVIC_Configuration(void)
#ifdef RT_USING_UART1 #ifdef RT_USING_UART1
/* Enable the USART1 Interrupt */ /* Enable the USART1 Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn; NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure); NVIC_Init(&NVIC_InitStructure);
#endif #endif
...@@ -197,6 +198,7 @@ static void NVIC_Configuration(void) ...@@ -197,6 +198,7 @@ static void NVIC_Configuration(void)
#ifdef RT_USING_UART2 #ifdef RT_USING_UART2
/* Enable the USART2 Interrupt */ /* Enable the USART2 Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQn; NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure); NVIC_Init(&NVIC_InitStructure);
...@@ -205,12 +207,14 @@ static void NVIC_Configuration(void) ...@@ -205,12 +207,14 @@ static void NVIC_Configuration(void)
#ifdef RT_USING_UART3 #ifdef RT_USING_UART3
/* Enable the USART3 Interrupt */ /* Enable the USART3 Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn; NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure); NVIC_Init(&NVIC_InitStructure);
/* Enable the DMA1 Channel2 Interrupt */ /* Enable the DMA1 Channel2 Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel2_IRQn; NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel2_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure); NVIC_Init(&NVIC_InitStructure);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册