Documentation:AVR32 Linux Development/How to make leds flash with BSP2.0 image (2.6.18)
From AVRFreaks Wiki
This how to assumes that you have the 2.6.18 prebuilt image installed from the 2.0 BSP ( on a stk1000/1002 )
[edit] Disabling switches
Before enabling the led's you need to disable the switches if you has not done this before follow these simple steps
- check if switches are enabled.
~ # cd config/gpio/
/config/gpio # cat switches/enabled
0 or 1
- if result is 0 then the switches are already off, else type.
/config/gpio # echo 0 > switches/enabled
- then use the cat command to check that the switches are now off. Result should now be 0
[edit] Enabling LEDS
Before enabling these leds check that SW4 are on GPIO/PS2B and that you connect J1 to J15
- type the following commands
/config/gpio # mkdir leds
/config/gpio # cd leds
/config/gpio/leds # echo 0xff > pin_mask
/config/gpio/leds # echo 0xff > oe_mask
/config/gpio/leds # echo 1 > gpio_id
/config/gpio/leds # echo 1 > enabled
- on the last command you would probably see all the leds go from brigth to dark. The next command starts sending random numbers to the leds making all of them flash
/config/gpio/leds # cat /dev/urandom > /dev/gpio1
- you can also type in number to see them binary on the leds:
/config/gpio/leds # echo 0x34 > /dev/gpio1
