How to access softled1(D3) on minimorph via gpio?

This topic contains 2 replies, has 2 voices, and was last updated by  abhilashtuse 4 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #31347

    I want to access softled1 (D3) using gpio. Reference manual says it can be done using UART0_RTS (GPIO 23).
    But GPIO-23 is reserved. It cannot be accessed via sysfs. So how can we access gpio-23 to actually set LED values(blinking)?



    What version of the SDK are you using? Assuming 1r9 in the answer below.

    The script in /etc/init.d/flashleds gives you an example of driving the LED.

    If you log into the Minimorph and kill the script (run at startup), you can control the LED as follows:

    # echo 1 > /sys/class/gpio/gpio11/value


    # echo 0 > /sys/class/gpio/gpio11/value

    So in a C program, open a file handle to that file and write the value to it.

    The flashleds script sets up the GPIO for you. If you stop this script from launching at startup, you’ll need to set it up yourself:


    echo $LED > $GPIO_SYSFS/export

    To use the other LED, it is currently setup to indicate SD card activity so disable that and set brightness:

    # cat /sys/class/leds/01xx::softled1/trigger
    none [mmc0]
    # echo none > /sys/class/leds/01xx::softled1/trigger
    # cat /sys/class/leds/01xx::softled1/trigger
    [none] mmc0
    # echo 1 > /sys/class/leds/01xx::softled1/brightness

    Thanks..:) I am using SDK 1r9.

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.