How to read whole RX buffer

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to read whole RX buffer

244 次查看
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 项奖励
回复
2 回复数

219 次查看
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 项奖励
回复

219 次查看
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 项奖励
回复