cancel
Showing results for 
Search instead for 
Did you mean: 

UART0 configuration

mikelcastillo
Associate
Posted on July 29, 2010 at 09:35

UART0 configuration

4 REPLIES 4
Pantuca.Erwin
Associate II
Posted on May 17, 2011 at 10:01

how did you conclude that you cannot write to DR register?

mikelcastillo
Associate
Posted on May 17, 2011 at 10:01

Hi!

thanks for your interest

Because after compiling and executing in the View -> Register window in IAR, while debugging, after  

UART_SendData(UART0, TxBuffer[TxCounter++]) 

the UART0_DR register  is always =0x0000 and should be =0x00**, being ** Data(8byte)

thanks in advance!!

Pantuca.Erwin
Associate II
Posted on May 17, 2011 at 10:01

your main() does not call scu config and gpio config?

Pantuca.Erwin
Associate II
Posted on May 17, 2011 at 10:01

although i am not familiar with IAR, i am not sure if the debugger can display DR register data in tx mode?  is it possible that it would be always zero? or it becomes zero by the time you inspect it. since you used fifo, after write to DR it automatically transferred to fifo.

we have checked our own debugger, after writing to the DR register, and we inspect the associated memory area (we dont have register view, only view memory area by address), it remains zero.  accordingly, just after character is received and we inspect the DR register address, the expected char is there.