aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md48
-rw-r--r--sysconf/config.txt5
2 files changed, 44 insertions, 9 deletions
diff --git a/README.md b/README.md
index 8d22b40..c2c0385 100644
--- a/README.md
+++ b/README.md
@@ -5,26 +5,58 @@ Experimental control software for robotics, tested on Raspberry Pi 5.
To configure the system, the files in the `sysconf` directory must be
installed:
-1. Copy the UDEV `*.rule` files into `/etc/udev/rules.d`.
-2. Copy `config.txt` to `/boot`.
-3. Reboot the Raspberry Pi for the changes to take effect.
+1. Copy the UDEV `*.rule` files into `/etc/udev/rules.d`
+2. Copy `config.txt` to `/boot`
+3. Reboot the Raspberry Pi for the changes to take effect
+
+## Low Power Consumption When Powered Off:
+By default, the Raspberry Pi 5 keeps the SoC powered on (in a shutdown state)
+even after the system is shut down. As a result, it continues to consume
+1.2-1.6W of power, even with nothing plugged in except for power. For more
+details, see:
+[Reducing Raspberry Pi 5's Power Consumption](https://www.jeffgeerling.com/blog/2023/reducing-raspberry-pi-5s-power-consumption-140x)
+
+This can be easily fixed by editing the EEPROM configuration with the
+following command:
+```console
+user@alarm$ sudo rpi-eeprom-config -e
+```
+Ensure that `POWER_OFF_ON_HALT=1` is set, while leaving the other variables
+unchanged:
+```config
+[all]
+BOOT_UART=[...]
+POWER_OFF_ON_HALT=1
+BOOT_ORDER=[...]
+```
+
+To run `rpi-eeprom-config` on Arch Linux, you’ll need to install the
+`rpi5-eeprom` package from the `PKGBUILDs` repository. Run the following
+commands to do so:
+```console
+user@alarm$ git clone https://github.com/archlinuxarm/PKGBUILDs
+user@alarm$ cd PKGBUILDs/alarm/rpi-eeprom
+user@alarm$ makepkg -s
+user@alarm$ sudo pacman -U rpi5-eeprom-*.pkg.tar.xz
+```
## GPIO and PWM Access Without Root:
To enable GPIO and PWM access without root privileges on the Raspberry Pi 5,
follow these steps:
-1. Create two new user groups: `gpiod` and `pwm`.
-2. Add your user to both groups.
+1. Create two new user groups: `gpiod` and `pwm`
+2. Add your user to both groups
3. The UDEV rules installed previously will grant the `gpiod` and `pwm` user
-groups permission to access the respective subsystems.
+ groups permission to access the respective subsystems.
This configuration ensures that GPIO and PWM operations can be performed
without needing root access.
## Build Instructions:
1. Install [`stack`](https://docs.haskellstack.org/en/stable/). It’s
-recommended to use [`ghcup`](https://www.haskell.org/ghcup/) for installation.
-2. Run `stack build` to compile the libraries and executables.
+ recommended to use [`ghcup`](https://www.haskell.org/ghcup/) for
+ installation.
+2. Run `stack build` to compile the libraries and executables
> Note: You may need to install system dependencies on your host first (e.g.,
> `libgpiod`, etc.)
diff --git a/sysconf/config.txt b/sysconf/config.txt
index 4bd4f67..f9ff6db 100644
--- a/sysconf/config.txt
+++ b/sysconf/config.txt
@@ -35,7 +35,7 @@ disable_overscan=1
# Uncomment if you want to disable wifi or bluetooth respectively
#dtoverlay=disable-wifi
-#dtoverlay=disable-bt
+dtoverlay=disable-bt
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
@@ -44,6 +44,9 @@ disable_overscan=1
# Run as fast as firmware / board allows
arm_boost=1
+# Set GPIO pins to output / low state on boot
+gpio=0-27=op,dl
+
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required