oweno
Posts: 27
Joined: Sat Feb 16, 2013 3:40 pm

Disabling Activity LED (after enabling it)

Sun Dec 02, 2018 12:39 pm

In our application we have a status LED connected to GPIO 24 and configured as the activity led :

Code: Select all

    dtoverlay=pi3-act-led,gpio=24,activelow=on
This works great, but is there a way to disable activity led on this pin after boot up? Essentially I want to alert the user of activity during boot up, then once it is up, use the LED for another status purpose.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2016
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Disabling Activity LED (after enabling it)

Sun Dec 02, 2018 4:36 pm

This might be simple, or it could be tricky. The potential issue is that, although it is easy to stop the LED from flickering, I think the LED driver will not release its claim on the GPIO, which could interfere with your subsequent usage.

You can turn off the LED activity with:

Code: Select all

$ echo none > /sys/class/leds/led0/trigger
Then try your application and see if contention is going to be a problem.

oweno
Posts: 27
Joined: Sat Feb 16, 2013 3:40 pm

Re: Disabling Activity LED (after enabling it)

Mon Dec 03, 2018 2:41 am

Thanks for this! It seems to work fine after a quick check.

Return to “Compute Module”