UART receive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART receive

609 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Sat Aug 09 13:49:42 MST 2014
I've missed something here, and I can't find what it is:

My UART will transmit but does not receive.

I have a nice clear signal on RXD (on the pin, not just the track leading to the pin, it IS soldered down!), at the right baud rate (checked on the 'scope), but the UART shows nothing happening.
The RDR bit of the line status register stays permanently low.

1. The same routine works on an LPC1224
2. I have configured the RXD pin as RXD (0xC1 in the IOCONFIG)
3. If I configure it as a GPIO pin, I can check the signal and it is present.
4. It's a version 302 of the LPC1113, so there is not an alternative pin for RXD
5. The UART is in line-break on the TXD side (but I have tried turning off line-break and it makes no difference)

Could somebody tell me - I'm sure it's obvious!
Labels (1)
0 Kudos
Reply
5 Replies

580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Thu Aug 28 13:59:08 MST 2014
I think we've all been there. As soon as you think you'll never do it again, you've just done it once more... ;)
It's quite amazing that transmit works without power, though. :)
0 Kudos
Reply

580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Thu Aug 28 02:14:35 MST 2014
I should have known - I've been caught out by the power saving features before.

Enable a clock here, take the SPI out of reset etc. - every peripheral has a trap for the unwary! It's all part of the fun.
0 Kudos
Reply

580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Tue Aug 26 17:49:10 MST 2014
The reason you can turn the FIFO off is, I believe, that you can save power.
-But obviously, you shouldn't turn it off if it's in use. ;)

In some applications, you would perhaps need to run on battery power, and thus turn off all the peripherals you do not use, in order to make the application run for as long as possible without changing the battery.
0 Kudos
Reply

580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by IanB on Sun Aug 24 05:21:42 MST 2014
I think I found it - and I was being stupid.
It doesn't work without the FIFOs switched on.
Makes me wonder why there is a bit to switch the FIFO off: U0FCR_FIFOEN, and why it starts up with the FIFO disabled.
Also makes me wonder why the same routines worked on an LPC1224
0 Kudos
Reply

580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nerd herd on Mon Aug 11 08:30:00 MST 2014
Hello,

Is your UART code your own code? You can check out example UART code for the LPC11xx by checking LPCOpen, our software platform. Even if your board is not supported, you can double check your initialization and receive function to see if you're missing anything.

http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc11xx-packages-0
0 Kudos
Reply