Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: AT91SAM9G20EK Turn LED DS5 on/off in shell (/sys/class/leds)
PostPosted: Mon Apr 23, 2012 9:48 am 
Offline

Joined: Mon Apr 23, 2012 9:26 am
Posts: 2
Hi there,
I'm using the AT91SAM9G20-EK Board running the linux demo files (angstrom) found on:

http://www.at91.com/linux4sam/bin/view/ ... d#Demo9g20

How is it posible to turn the "DS5" user LED on/off using a simple shell command?

What I've done with no success:

#: echo 1 > /sys/class/leds/ds5/brightness

#: echo 0 > /sys/class/leds/ds5/brightness

What's wrong :?:

Risto


Top
 Profile  
 
 Post subject: Re: AT91SAM9G20EK Turn LED DS5 on/off in shell (/sys/class/l
PostPosted: Fri Apr 27, 2012 8:58 am 
Offline

Joined: Mon Apr 23, 2012 9:26 am
Posts: 2
I found the reason for my led turn on/off problem:

- In "linux-2.6.30/arch/arm/mach-at91/board-sam9g20ek.c" the leds on the board are configured as follows:

/*
* LEDs
*/
static struct gpio_led ek_leds[] = {
{ /* "bottom" led, green, userled1 to be defined */
.name = "ds5",
.gpio = AT91_PIN_PA6,
.active_low = 1,
.default_trigger = "none",
},
{ /* "power" led, yellow */
.name = "ds1",
.gpio = AT91_PIN_PA9,
.default_trigger = "heartbeat",
}
};

- Now, have a look at the schematic diagrams:
led ds5 is connected to gpio AT91_PIN_PB8
led ds1 is connected to gpio AT91_PIN_PB9

- LED configuration in kernel sources does not match with the AT91SAM9G20EK (REV C) Board.

risto


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: