Fixed bug 3592764.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4916 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2012-12-16 09:27:19 +00:00
parent ca21f0fa25
commit aaac1b2e53
3 changed files with 9 additions and 5 deletions

View File

@ -395,6 +395,7 @@ void uart_lld_init(void) {
#if STM32_UART_USE_USART1
uartObjectInit(&UARTD1);
UARTD1.usart = USART1;
UARTD1.dmamode = STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
UARTD1.dmarx = STM32_DMA_STREAM(STM32_UART_USART1_RX_DMA_STREAM);
UARTD1.dmatx = STM32_DMA_STREAM(STM32_UART_USART1_TX_DMA_STREAM);
#endif
@ -402,6 +403,7 @@ void uart_lld_init(void) {
#if STM32_UART_USE_USART2
uartObjectInit(&UARTD2);
UARTD2.usart = USART2;
UARTD2.dmamode = STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
UARTD2.dmarx = STM32_DMA_STREAM(STM32_UART_USART2_RX_DMA_STREAM);
UARTD2.dmatx = STM32_DMA_STREAM(STM32_UART_USART2_TX_DMA_STREAM);
#endif
@ -409,6 +411,7 @@ void uart_lld_init(void) {
#if STM32_UART_USE_USART3
uartObjectInit(&UARTD3);
UARTD3.usart = USART3;
UARTD3.dmamode = STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
UARTD3.dmarx = STM32_DMA_STREAM(STM32_UART_USART3_RX_DMA_STREAM);
UARTD3.dmatx = STM32_DMA_STREAM(STM32_UART_USART3_TX_DMA_STREAM);
#endif
@ -430,8 +433,6 @@ void uart_lld_init(void) {
*/
void uart_lld_start(UARTDriver *uartp) {
uartp->dmamode = STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
if (uartp->state == UART_STOP) {
#if STM32_UART_USE_USART1
if (&UARTD1 == uartp) {

View File

@ -362,6 +362,7 @@ void uart_lld_init(void) {
#if STM32_UART_USE_USART1
uartObjectInit(&UARTD1);
UARTD1.usart = USART1;
UARTD1.dmamode = STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
UARTD1.dmarx = STM32_DMA_STREAM(STM32_UART_USART1_RX_DMA_STREAM);
UARTD1.dmatx = STM32_DMA_STREAM(STM32_UART_USART1_TX_DMA_STREAM);
#endif
@ -369,6 +370,7 @@ void uart_lld_init(void) {
#if STM32_UART_USE_USART2
uartObjectInit(&UARTD2);
UARTD2.usart = USART2;
UARTD2.dmamode = STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
UARTD2.dmarx = STM32_DMA_STREAM(STM32_UART_USART2_RX_DMA_STREAM);
UARTD2.dmatx = STM32_DMA_STREAM(STM32_UART_USART2_TX_DMA_STREAM);
#endif
@ -376,6 +378,7 @@ void uart_lld_init(void) {
#if STM32_UART_USE_USART3
uartObjectInit(&UARTD3);
UARTD3.usart = USART3;
UARTD3.dmamode = STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
UARTD3.dmarx = STM32_DMA_STREAM(STM32_UART_USART3_RX_DMA_STREAM);
UARTD3.dmatx = STM32_DMA_STREAM(STM32_UART_USART3_TX_DMA_STREAM);
#endif
@ -390,8 +393,6 @@ void uart_lld_init(void) {
*/
void uart_lld_start(UARTDriver *uartp) {
uartp->dmamode = STM32_DMA_CR_DMEIE | STM32_DMA_CR_TEIE;
if (uartp->state == UART_STOP) {
#if STM32_UART_USE_USART1
if (&UARTD1 == uartp) {

View File

@ -92,7 +92,9 @@
to 2.4.3).
- FIX: Potential problem with RTC_CRL_RSF bit (bug 3593972)(backported
to 2.4.3).
- FIX: Fixed DMA reconfiguration problem in STM32 SPI driver (bug 3592809)
- FIX: Fixed STM32 UART driver redundant initialization (bug 3592809)
(backported to 2.4.3).
- FIX: Fixed DMA reconfiguration problem in STM32 SPI driver (bug 3592764)
(backported to 2.4.3).
- FIX: Fixed wrong stack initializations in GCC STM32L1xx port files (bug
3591321)(backported to 2.4.3).