How to read whole RX buffer

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

How to read whole RX buffer

236 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by masterboy on Mon Mar 25 07:08:02 MST 2013
Hi,

how can I read whole RX buffer in USART? I have interrupt routine for USART, but when I send more than 2 chars into uP so It reads only 1 char.

void USART_IRQHandler(void) {
if (LPC_USART->IIR & (1 << 1)) {
   FLAG.u8_tx_empty = 1;
} else if (LPC_USART->IIR & (2 << 1)) {
   uint8_t i;
   for (i = 0; i < 16; i++) {
      OTHER.u8_rx_buffer = LPC_USART->RBR;
   }
}
0 Kudos
2 Replies

211 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cwpjr on Fri Mar 29 19:48:27 MST 2013
The root expression of how this was resolved would be nice.
0 Kudos

211 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by masterboy on Mon Mar 25 07:29:31 MST 2013
The problem is resolved. I set up RXTL in FCR register.
0 Kudos