Forum: ARM programming with GCC/GNU tools USARTS on the SAM7A3 eval board

Author: Jim Kaz (ancaritha)
Posted on:

Rate this post
0 useful
not useful
I know this isn't exactly the right forum to ask this, since this
supposed to be a WinARM forum but everyone here knows a lot, and the
boards are fairly active, so away we go!

I'm trying to use USART 0 on the AT91SAM7A3 eval board.  I seem to be
failing though.  I was able to get the DBGU port up and running, and
since the example that I took that code from casted all the DBGU stuff
as a USART, I figured it should be the same thing.

    // Open PIO for USART0

    // Enable Transmitter & receivier

    // Configure DBGU
  AT91F_US_Configure (
    AT91C_BASE_US0,       // USART base address
    AT91C_US_ASYNC_MODE,                 // Mode Register to be 
    57600,                  // Baudrate to be programmed
    0);                                  // Timeguard to be programmed

    // Enable Transmitter & receivier

    // Enable USART IT error and AT91C_US_ENDRX
    AT91F_US_EnableIt(AT91C_BASE_US0, AT91C_US_RXRDY);

    // open interrupt ------ Using DBGU receive interrupt
  AT91F_AIC_ConfigureIt(AT91C_BASE_AIC, AT91C_ID_US0,
  AT91F_AIC_EnableIt(AT91C_BASE_AIC, AT91C_ID_US0);

And later on I do:
        AT91C_BASE_US0->US_CR = AT91C_US_TXEN;

This is pretty much the same code that I used for my DBGU port, except
that works and this doesn't.  At first glance does it appear that I'm
doing anything wrong?  Is there something that needs to be initialized
differently for a USART than the DBGU port?

I set up an oscilliscope to the USART0 Transmit pin on the the testing
pins on the side of the board, and its never moving at all.  The DBGU
one moves right when it should.

Anyone have any thoughts about what the problem could be?  Thanks in

Author: Jim Kaz (ancaritha)
Posted on:

Rate this post
0 useful
not useful
It figures.... I've been working on this for 3 days on and off, and 45
minutes after posting I find the problem, thus ensuring I've wasted
atleast someones time :(  To anyone that read the first post and this
post, thanks for taking the time to read it atleast!

P.S.  I did not set PMC stuff, which apparently the DBGU port does not
need but USARTS do.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.