Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Help with AT32 part

Help with AT32 part

2011-06-16 by Philippe Habib

I'm looking at a project using the AT32 for the first time and trying  
to work through pin assignments.  The part I'm looking at is the 144  
pin AT32U3A0512.   I have a parallel interface serial display to talk  
to.  On an 8 bit processor, I'd just assign an entire port to it and  
write a byte to that port and life would be easy.

 From what I can see on this part, there are GPIO ports and, like on  
the 8 bit parts, the pins can have different functions.  Is there a  
way to group 8 pins into a group that behaves like an 8 bit port?  I  
was thinking I could use EBI data 0-7, but I don't know if that will  
wind up impacting the other EBI related pins.

Of course its a rush project and they're waiting for my response on  
pin assignment to do the layout.

Thanks.

Re: Help with AT32 part

2011-06-18 by Saundby

You use the GPIO Controller to assign the pins to a function then you use them. For this application, if you have a USART available, you'll want to find the pins for that function, enable that function for those pins with the GPIO Controller, then use the USART normally in software. That gives you the port function you're looking for by using that USARTs registers.

If you don't have an available USART, you can still bit-bash the serial by assigning the chosen pins as inputs and outputs then writing the software to operate those pins appropriately.

I recommend looking at the Getting Started doc, AVR32119:
http://www.atmel.com/dyn/resources/prod_documents/doc32086.pdf

That gives an overview of the process. Then refer to your specific chip's data sheet and summary for the details of what you'll need to do.

Given that the AT32s have from 2 to 5 UARTs on board, I think you'll be OK.

-Mark G.
saundby.com


--- In AVR-Chat@yahoogroups.com, Philippe Habib <phabib@...> wrote:
Show quoted textHide quoted text
>
> I'm looking at a project using the AT32 for the first time and trying  
> to work through pin assignments.  The part I'm looking at is the 144  
> pin AT32U3A0512.   I have a parallel interface serial display to talk  
> to.  On an 8 bit processor, I'd just assign an entire port to it and  
> write a byte to that port and life would be easy.
> 
>  From what I can see on this part, there are GPIO ports and, like on  
> the 8 bit parts, the pins can have different functions.  Is there a  
> way to group 8 pins into a group that behaves like an 8 bit port?  I  
> was thinking I could use EBI data 0-7, but I don't know if that will  
> wind up impacting the other EBI related pins.
> 
> Of course its a rush project and they're waiting for my response on  
> pin assignment to do the layout.
> 
> Thanks.
>

Re: Help with AT32 part

2011-06-18 by Saundby

--- In AVR-Chat@yahoogroups.com, "Saundby" <saundby@...> wrote:
>
> 
> You use the GPIO Controller to assign the pins to a function then you use them. For this application, if you have a USART available, you'll want to find the pins for that function, enable that function for those pins with the GPIO Controller, then use the USART normally in software. That gives you the port function you're looking for by using that USARTs registers.
> 
> If you don't have an available USART, you can still bit-bash the serial by assigning the chosen pins as inputs and outputs then writing the software to operate those pins appropriately.
> 
> I recommend looking at the Getting Started doc, AVR32119:
> http://www.atmel.com/dyn/resources/prod_documents/doc32086.pdf
> 
> That gives an overview of the process. Then refer to your specific chip's data sheet and summary for the details of what you'll need to do.
> 
> Given that the AT32s have from 2 to 5 UARTs on board, I think you'll be OK.
> 
> -Mark G.
> saundby.com
> 
> 

To be a bit more specific:

Look at the pin mux I/O assignments in section 12.7 of the datasheet and see which USART looks good to use with the least conflict with the other peripherals you plan to use in your application.

Clear the bits for those specific pins in the GPIO control register GPER so that they'll be operated by the peripheral unit rather than used as general I/Os. (Datasheet section 22)

Select the specific peripheral that will those pins using the Peripheral Multiplexer Select Register bits (there are two bits, four peripherals are muxed to each pin.)

Set up your USART using that USART's control registers.

Talk to your USART using that USART's THR and RHR registers. No worrying about the other pins that way. They'll each be configured appropriately using their own GPER registers and peripheral mux registers.

That way there's no masking or other bit-trickery necessary.

There's a brief example of a USART setup in datasheet section 22.6.2. The explanation of how this works spans section 22 on the GPIO control register and section 26 on the USARTs. Assignments of pins is in 12.1, Peripheral Address Map, and 12.7, Peripheral Muxing on Address Lines. 12.9 covers protocol modes supported for each USART.

The writing of the datasheet assumes that you can insert all the information in it into your brain at once. We mere mortals need to read back and forth through it several times and experiment to see if we really understand, however. ;)

Hope this helps. It's really not too difficult, once you understand it. Understanding it takes putting a lot of scattered little bits of information together, however.

-Mark G.
saundby.com
Show quoted textHide quoted text
> --- In AVR-Chat@yahoogroups.com, Philippe Habib <phabib@> wrote:
> >
> > I'm looking at a project using the AT32 for the first time and trying  
> > to work through pin assignments.  The part I'm looking at is the 144  
> > pin AT32U3A0512.   I have a parallel interface serial display to talk  
> > to.  On an 8 bit processor, I'd just assign an entire port to it and  
> > write a byte to that port and life would be easy.
> > 
> >  From what I can see on this part, there are GPIO ports and, like on  
> > the 8 bit parts, the pins can have different functions.  Is there a  
> > way to group 8 pins into a group that behaves like an 8 bit port?  I  
> > was thinking I could use EBI data 0-7, but I don't know if that will  
> > wind up impacting the other EBI related pins.
> > 
> > Of course its a rush project and they're waiting for my response on  
> > pin assignment to do the layout.
> > 
> > Thanks.
> >
>

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.