Skip to main content
Visitor II
July 29, 2010
Question

UART0 configuration

  • July 29, 2010
  • 4 replies
  • 931 views
Posted on July 29, 2010 at 09:35

UART0 configuration

    This topic has been closed for replies.

    4 replies

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 10:01

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

    Visitor II
    May 17, 2011
    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!!

    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 10:01

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

    Visitor II
    May 17, 2011
    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.