Re: TR: interfacing FPGA to AT91RM9200

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



First of all, CPU resets gpio pins to it's default state upon startup, 
input.
Secondly, if i'm not wrong in gpio banks init pios are initialized to 
inputs again by software, just to be sure, because some type of cpu's 
probably can have different default states for different pins.
And yes, setting the pin to peripheral depends on pin itself. In your 
case, pin's peripheral A is irq *input*, and just as a regular input, 
you can apply pullup or glitch filter, as you wish.

Kind regards,
Andrejs Cainikovs


arasv@xxxxxxxxxxxxxx wrote:
>> Sorry, everything looks fine,
>> just looking at irq setup i think it is not necessary to set the pin to
>> input and after that immediately to peripheral.
>> Wouldn't it be correct just to use:
>>
>> at91_set_A_periph( reader_irq, 1);
>> at91_set_deglitch( reader_irq, 1);
>>
>> Deglitch will work with peripherals too (looking at figure 27-3, page
>> 348 in AT91RM9200 datasheet).
>>     
>
> I generally prefer to assume that the pin is in an unknown state, so I
> make sure I set everything up so that it is electrically safe.
>
> Does setting the pin as a peripheral automatically make it an input and
> disable any prior output setting?
>
> Aras
>
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________
>
> -------------------------------------------------------------------
> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
> FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
> Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
>   

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter