Closed matheusfinatti closed 1 month ago
Seems to be a recurring issue with this driver. I'm sorry if this has been covered before. I'm an amateur when it comes to embedded and it's my first time doing it.
No problem, these issues can be tricky to resolve if you aren't familiar with embedded designs and this crate. There have been quite a few ST7789 related issues lately. I don't know if this is just a sign that this is a popular controller or if we have a problem with our code or at least with incomplete documentation. Every reported issue gives us the opportunity to improve the crate.
However, my display is black and the code seems to be stuck at the display
init()
call.
That's weird. There is no two way communication between the controller and the display, so that it shouldn't be possible for init
to hang, even if the display didn't initialize properly. But my guess that init
panics for some reason and causes the panic_abort
handler to be called. I would suggest that you switch to another panic handler to see what is causing the issue, like panic-probe
which is used in the RP2040 template: https://github.com/rp-rs/rp2040-project-template/blob/main/Cargo.toml
Thanks, that was very helpful. I could see the error in terminal now.
assertion failed: width + offset_x <= max_width
I checked the ST7789 framebuffer size and is set to 240x320 instead of 320x240, that's why it's failing. Swapping the values around fixed the issue.
Thanks a bunch, spent a good 3-4 hours debugging but without a error message it was hard to point the issue.
Seems to be a recurring issue with this driver. I'm sorry if this has been covered before. I'm an amateur when it comes to embedded and it's my first time doing it.
I have a Pi Pico with a Pimoroni Pico Display 2''. From the example in their repo and the datasheet I managed to figure out the display driver and pin layout, which other issues found here seemed to corroborate.
However, my display is black and the code seems to be stuck at the display
init()
call. I see the backlight turning on, but I don't see the LED on the board turning on. (Moving theled.set_high()
to before the display intialization makes the LED turn on)I've looked at the troubleshooting, tried to change the SPI mode to 0, 1, 2, 3. Nothing changes.
The display works, if I run the example in the manufacturer repo it runs flawleslly
Thanks in advance.