AT91SAM9260: How to output PCK0 clock on a GPIO pin

Stephen Munnings smunnings at gabaedevelopment.com
Mon Aug 31 14:44:19 EDT 2009


Pedro I. Sanchez wrote:
>> But, I also found that you must have the PMC clock for the GPIOC bank 
>> running before GPIO (even the configuration, it seems) will work.
>> I am not sure if I had this issue in Linux, or only in the loaders, but 
>> I did have to turn on the PMC clocks to get any GPIO based things working.
>>     
>> The standard boot loader only seems to turn on GPIOA, but I am also 
>> using GPIOB and GPIOC, and I had to turn on the PMC clocks for those
>> also before I could get very far.
>>
>> Stephen Munnings
>>     
>
> Thanks Stephen,
>
> And how do I turn on the PMC clocks for the GPIO?
>
>   
I did some more searching, and it appears that Linux for at91 turns on 
all the GPIO PMC clocks as part
of its initialization.  So, the problem appears to not be the PMC clocks.
(It does it in /arch/arm/mach-at91/gpio.c in function at91_gpio_init() )

I do presume that you have the appropriate support configured into your 
kernel when you compiled it.




More information about the linux-arm-kernel mailing list