User avatar
Ultibo
Posts: 97
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia

Flash the red LED on a Pi3, now you can!

Sat Jun 03, 2017 7:01 am

I know many have complained in the past about the changes to the Pi3 that made it hard to blink the activity LED and completely impossible to control the power LED.

I'm not sure if anyone else noticed but when someone asked the other day about the list of mailbox property tags looking at the latest copy of the list in the Linux source made me wonder what some new tags like RPI_FIRMWARE_GET_GPIO_STATE and RPI_FIRMWARE_SET_GPIO_CONFIG actually do.

It turns out the firmware was recently expanded to include a new set of GPIO control functions that allow almost complete access to the GPIO expander that is connected to the GPU. After looking through the changes to the Linux source and a small bit of experimentation we have a working driver that can blink the red LED, here's a quick video on Twitter.

And here's the source to our bare metal driver, yes I know it's in Pascal but you can cope with that I'm sure :lol:
Ultibo.org | Make something amazing
https://ultibo.org

dwelch67
Posts: 825
Joined: Sat May 26, 2012 5:32 pm

Re: Flash the red LED on a Pi3, now you can!

Sun Jun 04, 2017 11:38 am

So do understand correctly that this access is still (proxied) through the GPU and not directly?

User avatar
Ultibo
Posts: 97
Joined: Wed Sep 30, 2015 10:29 am
Location: Australia

Re: Flash the red LED on a Pi3, now you can!

Mon Jun 05, 2017 12:03 am

dwelch67 wrote:So do understand correctly that this access is still (proxied) through the GPU and not directly?
Yes, unfortunately access to the GPIO expander still requires using the mailbox interface which is not as easy for getting starting as directly manipulating the GPIO registers.

However at least the interface now provides all the standard operations including input, output, function select and pull up/down.
Ultibo.org | Make something amazing
https://ultibo.org

Return to “Bare metal”

Who is online

Users browsing this forum: bzt and 6 guests