Hello.
I'm using the following two functions to send /receive data from UART0
Rx
================================================
void uart0Receive(byte* uartRxBuf, unsigned short uartRxBufLength) {
 unsigned short uartRxIndex;
 U0CSR |= 0x40; 
 URX0IF = 0;
 for (uartRxIndex = 0; uartRxIndex < uartRxBufLength; uartRxIndex++) 
 {
 while( !URX0IF );
 uartRxBuf[uartRxIndex] = U0DBUF;
 
 URX0IF = 0;
 }
}
Tx
===================================
void uart0Send(byte* uartTxBuf, unsigned short uartTxBufLength) {
 unsigned short uartTxIndex;
 
 UTX0IF = 0;
 for (uartTxIndex = 0; uartTxIndex < uartTxBufLength; uartTxIndex++) 
 {
 U0DBUF = uartTxBuf[uartTxIndex];
 while( !UTX0IF );
 UTX0IF = 0;
 }
}
The rx part works perfect until I send data, after that I can't receive anything, just hang on while( !URX0IF );
Any suggestions?