diff --git a/arch/arm/src/str71x/str71x_gpio.h b/arch/arm/src/str71x/str71x_gpio.h index 2eb92939a2..d8e307ec3e 100644 --- a/arch/arm/src/str71x/str71x_gpio.h +++ b/arch/arm/src/str71x/str71x_gpio.h @@ -1,7 +1,7 @@ /************************************************************************************ * arch/arm/src/str71x/str71x_gpio.h * - * Copyright (C) 2008 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without diff --git a/arch/arm/src/str71x/str71x_irq.c b/arch/arm/src/str71x/str71x_irq.c index 6be5e945ba..d9804e1748 100644 --- a/arch/arm/src/str71x/str71x_irq.c +++ b/arch/arm/src/str71x/str71x_irq.c @@ -41,6 +41,7 @@ #include #include #include +#include #include "arm.h" #include "up_arch.h" @@ -92,8 +93,11 @@ void up_irqinitialize(void) * (Needs more investigation). */ + up_mdelay(50); /* Wait a bit */ +#if 0 putreg32(0, STR71X_EIC_IER); /* Make sure that all interrupts are disabled */ putreg32(0xffffffff, STR71X_EIC_IPR); /* And that no interrupts are pending */ +#endif /* Enable global ARM interrupts */ diff --git a/arch/arm/src/str71x/str71x_lowputc.c b/arch/arm/src/str71x/str71x_lowputc.c index b129366535..ae20cbb266 100644 --- a/arch/arm/src/str71x/str71x_lowputc.c +++ b/arch/arm/src/str71x/str71x_lowputc.c @@ -300,17 +300,17 @@ void up_lowsetup(void) #if HAVE_UART reg16 = getreg16(STR71X_GPIO0_PC0); - reg16 &= STR71X_UART_GPIO0_MASK; + reg16 &= ~STR71X_UART_GPIO0_MASK; reg16 |= STR71X_UART_GPIO0_PC0BITS; putreg16(reg16, STR71X_GPIO0_PC0); reg16 = getreg16(STR71X_GPIO0_PC1); - reg16 &= STR71X_UART_GPIO0_MASK; + reg16 &= ~STR71X_UART_GPIO0_MASK; reg16 |= STR71X_UART_GPIO0_PC1BITS; putreg16(reg16, STR71X_GPIO0_PC1); reg16 = getreg16(STR71X_GPIO0_PC2); - reg16 &= STR71X_UART_GPIO0_MASK; + reg16 &= ~STR71X_UART_GPIO0_MASK; reg16 |= STR71X_UART_GPIO0_PC2BITS; putreg16(reg16, STR71X_GPIO0_PC2); #endif diff --git a/arch/arm/src/str71x/str71x_serial.c b/arch/arm/src/str71x/str71x_serial.c index 1f82f7f4f5..340c166cb6 100644 --- a/arch/arm/src/str71x/str71x_serial.c +++ b/arch/arm/src/str71x/str71x_serial.c @@ -775,17 +775,17 @@ static void up_rxint(struct uart_dev_s *dev, boolean enable) struct up_dev_s *priv = (struct up_dev_s*)dev->priv; if (enable) { - /* Receive an interrupt when the Rx FIFO is half full (or an IDLE - * timeout occurs. + /* Receive an interrupt when the Rx FIFO is half full (or if a timeout + * occurs while the Rx FIFO is not empty). */ #ifndef CONFIG_SUPPRESS_SERIAL_INTS - priv->ier |= (STR71X_UARTIER_RHF|STR71X_UARTIER_TIMEOUTIDLE); + priv->ier |= (STR71X_UARTIER_RHF|STR71X_UARTIER_TIMEOUTNE); #endif } else { - priv->ier &= ~(STR71X_UARTIER_RHF|STR71X_UARTIER_TIMEOUTIDLE); + priv->ier &= ~(STR71X_UARTIER_RHF|STR71X_UARTIER_TIMEOUTNE); } up_serialout(priv, STR71X_UART_IER_OFFSET, priv->ier); }