summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-20 16:24:14 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-09-20 16:24:14 +0000
commit1ad2ebcc1b40ae32deaad616cec9f4255e6f7ace (patch)
treed5f7fa9ae21ab59f56a63159d10d278ba306fcab /nuttx/arch/arm
parent5a3ff6669c47495674320f0bc8d1e91251c61da1 (diff)
downloadpx4-nuttx-1ad2ebcc1b40ae32deaad616cec9f4255e6f7ace.tar.gz
px4-nuttx-1ad2ebcc1b40ae32deaad616cec9f4255e6f7ace.tar.bz2
px4-nuttx-1ad2ebcc1b40ae32deaad616cec9f4255e6f7ace.zip
Fix initiali interrupt issue
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@947 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm')
-rw-r--r--nuttx/arch/arm/src/lpc214x/lpc214x_serial.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
index 84de77ff5..b2817dbc9 100644
--- a/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
+++ b/nuttx/arch/arm/src/lpc214x/lpc214x_serial.c
@@ -61,8 +61,6 @@
* Definitions
****************************************************************************/
-#define BASE_BAUD 38400
-
/****************************************************************************
* Private Types
****************************************************************************/
@@ -356,6 +354,15 @@ static int up_setup(struct uart_dev_s *dev)
up_serialout(priv, LPC214X_UART_FCR_OFFSET,
(LPC214X_FCR_FIFO_TRIG8|LPC214X_FCR_TX_FIFO_RESET|\
LPC214X_FCR_RX_FIFO_RESET|LPC214X_FCR_FIFO_ENABLE));
+
+ /* The NuttX serial driver waits for the first THRE interrrupt before
+ * sending serial data... However, it appears that the lpc214x hardware
+ * does not generate that interrupt until a transition from not-empty
+ * to empty. So, the current kludge here is to send one NULL at
+ * startup to kick things off.
+ */
+
+ up_serialout(priv, LPC214X_UART_THR_OFFSET, '\0');
#endif
return OK;
}