From 9358c96e562d8bb1ca909b6e158a29511563dca0 Mon Sep 17 00:00:00 2001 From: wuyangyong Date: Fri, 30 Sep 2011 04:27:02 +0000 Subject: [PATCH] update stm32f107 project git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1733 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/stm32f107/stm32_rom.icf | 2 +- bsp/stm32f107/usart.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bsp/stm32f107/stm32_rom.icf b/bsp/stm32f107/stm32_rom.icf index bf3e6860d..7b0836047 100644 --- a/bsp/stm32f107/stm32_rom.icf +++ b/bsp/stm32f107/stm32_rom.icf @@ -31,4 +31,4 @@ place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place in ROM_region { readonly }; place in RAM_region { readwrite, - block CSTACK, block HEAP }; \ No newline at end of file + block CSTACK, last block HEAP }; \ No newline at end of file diff --git a/bsp/stm32f107/usart.c b/bsp/stm32f107/usart.c index 5c7144ec8..dc6b1485c 100644 --- a/bsp/stm32f107/usart.c +++ b/bsp/stm32f107/usart.c @@ -189,7 +189,8 @@ static void NVIC_Configuration(void) #ifdef RT_USING_UART1 /* Enable the USART1 Interrupt */ 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_Init(&NVIC_InitStructure); #endif @@ -197,6 +198,7 @@ static void NVIC_Configuration(void) #ifdef RT_USING_UART2 /* Enable the USART2 Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQn; + NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); @@ -205,12 +207,14 @@ static void NVIC_Configuration(void) #ifdef RT_USING_UART3 /* Enable the USART3 Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn; + NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); /* Enable the DMA1 Channel2 Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel2_IRQn; + NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);