1

I've been playing with the Baking Pi tutorials, getting assembly code to work on the [bare metal] Pi 1 (BCM2835).

I'm now interested in adapting the code to work on the Pi 4 BCM2711 but I'm struggling with updating the addresses. I found a thread describing the Different addressing systems but I'm still not sure which part of the data sheet I need to refer to in order to update the (very simple) assembly code to work with the latest Pi.

Which GPIO address do I need for the LED on the Pi 4? I couldn't find it from a look through the datasheet (but I'm relatively inexperienced with this)!!

Any hints to help me get to the point where I can solve it would be appreciated!

4
  • You have a lot of learning to do. I suggest you start figuring out how to use the OS first. HINT - the LED is NOT connected to GPIO!
    – Milliways
    Commented Jan 27, 2022 at 23:13
  • Is that different to the Pi 1? The tutorial suggests that the LED requires use of the GPIO controller cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ok01.html
    – moo
    Commented Jan 27, 2022 at 23:19
  • I have both gen 1 and 4. I've wasted my time on the Pi 1. I'd now quite like to get it to work on the latest Pi 4.
    – moo
    Commented Jan 27, 2022 at 23:25
  • stackoverflow.com/questions/62971558/…
    – jsotola
    Commented Jan 27, 2022 at 23:50

1 Answer 1

1

The other answers claiming that the ACT_LED on the pi4 is not connect to the gpio is wrong. However, this was true on a previous version of the pi. One of the 3 series boards. (likely the source of confusion)

The LED is not part of the SOC so you won't find documentation for it there. However from the linux dts provided by broadcom we have... (https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/bcm2711-rpi-4-b.dts#L30-L33)

That the LED is connected to GPIO42 and is active high, so writing a non zero value to it should turn it on.

2
  • 1
    "Pi 3B, 3B+, 3A+ and 4B use a GPIO expander to drive the LEDs which can only be accessed from the VPU."
    – Milliways
    Commented Jan 28, 2022 at 3:57
  • 1
    Interesting answer, but it may be at odds with some other things I've read. Personally, I despise the red LED, and disable it in my /boot/config.txt (the ACT can also be disabled here), and I'm always interested in new ways to disable it. I can promise that at least one person will upvote your answer if you can confirm it works.
    – Seamus
    Commented Jan 28, 2022 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.