UARTlite problem..!!!

Hi, I am receiving some data from the uart.I take it and keep it in memory using a pointer.I use the following condition in my code: while (!XUartLite_mIsReceiveEmpty(XPAR_RS232_UART_BASEADDR)) { *uart2ram=XUartLite_RecvByte(XPAR_RS232_UART_BASEADDR); uart2ram++;

} then i have to do some processing on the data stored in the memory.I intend to do that after i receive the complete frame of data from uart. Now what happens is that the uart takes the first byte puts it in the memory and comes out of the interrupt handler.then goes back again and receives the rest of the data.I am not able to figure out y is it coming out of the handler after taking jsut one byte.shouldnt it take all the bytes from uart,store it in the ram? please give some suggestions if you guys can think about any thing that i am missing. thanx...

Reply to
fpga00
Loading thread data ...

It looks like the code should work, but you need to be sure that the interrupt only comes when there is a complete "frame". If the interrupt happens whenever the uart isn't empty, you'll get exactly the behavior you describe.

Reply to
Gabor

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.