AnsweredAssumed Answered

Issue on UART Rx and Tx?

Question asked by Karthickph on Jun 5, 2014
Latest reply on Jun 6, 2014 by MMA

Hi, I'm facing a strange issue in ADuC7060 micro while developing the software for our product.  The issue is that when I receive the bytes through UART from an application I can't see the read bytes in order in the stored array of buffer; however if I see the memory location of the array of buffer it looks perfect in order.  I don't why this problem comes, I never seen such a problem before....I used below arrays for store the data and Rx buffer full interrupt to store the bytes in sequence....Please suggest on this issue....


//transmit buffer

UCHAR hc_tx_buffer[40];

//receive buffer

UCHAR hc_rx_buffer[40];

Init function:

GP1CON  = BIT0 + BIT4;  

// Enable access to COMDIV registers


// Set baud rate to 1200

COMDIV0 = 0x0A;  

COMDIV1 = 0x01;

//8 bits word lenth, 1 stop bit


// Enable UART interrupts when Rx full and Tx buffer empty.

// COMIEN0 = BIT0 + BIT1;

COMIEN0 = BIT0; //+ BIT1;  // Enable UART interrupts when Rx full