Hello,
I have a Pirate Audio working on a RPi 0W. I was also able to run Mopidy succesfully with up to date Raspberry OS Buster. So the connector soldering on the Pi is good.
For my purposes, I need to use it as framebuffer device. Therefore I installed the adafruit software for this device, as described in this Tutorial,
Unfortunately after installation, the system hangs during the reboot and I can’t get it working as expected. So my question is, how it is possible to get it working? I mean the ST7789 display implemented on your pirate audio is the same as the one on the adafruit webpage. Can Iconfigure something different on the adafruit software to cooperate with your device?
At a wild guess, this may be because the Adafruit and Pimoroni screens use different pins, so the framebuffer tutorial might not be setting up the screen properly.
Adafruit’s guide says:
GPIO22 - Used to turn the backlight on and off. If you never want to turn the backlight off, cut the small jumper on the bottom of the PiTFT to free up GPIO22 SCK, MOSI, CE0 & GPIO25 - These are the display control pins. Note that MISO is not connected even though it is a SPI pin because you cannot read back from the display.
The Pinout.xyz page for Pirate Audio boards says that it uses GPIO13 for the backlight pin, SCK, MOSI, GPIO7 as the chip select, and GPIO9 as the command pin. You’d need to hoke through the files Adafruit gets you to install, see where it defines the pins, and change those.
Sorry alphanumeric, I don’t understand what that means. I’m a newbie at this. Is the problem just a question of different GPIO pins used or are there other things to change in the code for the framebuffer software?
The Pi has several SPI buses that can be used. For the most part SPI0 is the one used, and some times SPI1. SPI0 can have two devices connected, one using CE0 and the other using CE1. Or “one” device using “either” one of those two chip selects.
If your code is looking for something on CE0 for example, but your display is using CE1, it won’t work.
The Pimoroni python examples will have a screen setup section like this. That is as near as I can tell what the Pirate Audio Screen uses.
disp = ST7789.ST7789(
port=0, # 0 is SPI0 and 1 is SPI1
cs=1, # 0 is CE0 and 1 is CE1
dc=9, # 9 for SPI0 and 19 for SPI1
backlight=13, # can be any controllable GPIO pin
rotation=90,
spi_speed_hz=10000000
)
The Pimoroni screens for the most part use SPI0 but don’t always use CE0. Sometimes they use CE0 sometimes CE1. Likely because of circuit layout and track routing etc.
Anyway, long story made short. You need to edit the Adafruit code so it can access the Pimoroni screen. That is assuming its not already a match. It needs to be setup for SPI0, CE1. Don’t worry about the backlight unless its not on. It should default to on even with no signal of connection to it. You only need it to turn the backlight off, as near as i can tell anyway.
Thanks for your explanation. May I can ask directly.
Do you know where in the code I have to do the changes to get the ST7789_240x240 as frambuffer running? If not, you may can give me some hints, where I could search for it?
I like to run squeezelite + Cava at the LCD so I also need frambuffer ^^
I did not edit the scripts pins so my display is dark atm
Currently I run the adafruit script and try to fin what it changes
At boot.txt this was added:
Yeah, hopefully you let us know, if you succeed.
Independent from this. Did you install the framebuffer software from Adafruit, which I referred to in my first post?
Is there an overlays folder with drm-minipitft13 in it?
EDIT: Looking at the installer under
“type”: “st7789_240x240”,
it has
“overlay_src”: “overlays/minipitft13-overlay.dts”,
“overlay_dest”: “/boot/overlays/drm-minipitft13.dtbo”,
“overlay”: “dtoverlay=drm-minipitft13,rotation={pitftrot}”,
I’d have a look at the dts and or dtbo files.
I have asked at the pimoroni disord if someone tried to setup framebuffer…
The problem is that pimoroni did not wire the a specific pin (I think the RST) to the GPIO.
So you need a hardware mod to use framebuffer… that sucks…
Then it should be possible to set it up like here:
EDIT: I have sent them the link to the adafruit one and maybe there is hope he said
Sorry, I was not able to care about this project. Unfortunately I have still no idea how to get the pirate audio as framebuffer working. I have still no idea if the problem can be solved with changed entries in the /boot/config.txt, do I need to change the code or is it a question of incompatible wiring?