Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RA8875 with Adafruit Display does not work #588

Closed
tobi807 opened this issue Jul 9, 2024 · 1 comment
Closed

RA8875 with Adafruit Display does not work #588

tobi807 opened this issue Jul 9, 2024 · 1 comment

Comments

@tobi807
Copy link

tobi807 commented Jul 9, 2024

Carefully written Issues are more likely to be given priority.
丁寧に記述された報告は優先して対応される可能性が高くなります。

Environment ( 実行環境 )

  • MCU or Board name: [ESP-WROOM-32 on custom Board]
  • Panel Driver IC: [RA8875]
  • Bus type: [SPI]
  • LovyanGFX version: [v1.1.16]
  • FrameWork version: [ArduinoESP32]
  • Build Environment: [PlatformIO]
  • Operating System: [Windows]

Problem Description ( 問題の内容 )

Expected Behavior ( 期待される動作 )

Show something, e.g. a circle or a rect. Later I would like to have it working with lvgl.

Actual Behavior ( 実際の動作 )

display stays white and draws nothing at all.

I use the Adafruit RA8875 together with an 5" Display and a ESP32 Module. The controller boots up than the display turns from black to white and thats it.
I can manipulate the Brightness of the Backlight if I change line 55 in Panel_RA8875.cpp what indicates that the SPI Communication works.

   0x8b      , 1, 0x20, //Backlight brightness setting //Brightness parameter 0xff-0x00

I tried multiple settings (trial and error really) and drawing methods (draw dirctly and with sprites) but nothing works.
If I use the AdafruitGFX Library on the exact same setup it works perfectly fine.

If you need any additional information I'll give my best to provide them. I just dont know how to narrow down the problem

aufbau
The setup. The wires from the esp32 to the RA8875 Board run on the back side.

Code to reproduce this issue ( 再現させるためのコード )

main.cpp
platformio.ini
SPI Communication

additional information

Adafruit Driver Board
circuit diagramm of driver board
Adafruit Display

SPI oscilloscope snippet

I analyzed the signals directly on the RA8875 driver board

Pico Scope file:
lovyan_spi_comm.zip

overview
spi1
magnified
spi2

decoded

Data MOSI Data MISO
80 88 FF FF
00 0B FF FF
80 89 FF FF
00 01 FF FF
80 04 FF FF
00 82 FF FF
80 15 FF FF
00 02 FF FF
80 16 FF FF
00 03 FF FF
80 17 FF FF
00 01 FF FF
80 18 FF FF
00 03 FF FF
80 1B FF FF
00 0F FF FF
80 1C FF FF
00 00 FF FF
80 1D FF FF
00 0E FF FF
80 1E FF FF
00 06 FF FF
80 1F FF FF
00 01 FF FF
80 8A FF FF
00 80 FF FF
80 8A FF FF
00 81 FF FF
80 8B FF FF
00 7F FF FF
80 01 FF FF
00 80 FF FF
80 14 00 64 FF FF FF FF
...
@tobi807
Copy link
Author

tobi807 commented Jul 15, 2024

tl;dr
just add

0xc7      , 1, 0x01,  // set Extra General Purpose IO Register to Output (used to enable Display by Adafruit)

to

const uint8_t* Panel_RA8875::getInitCommands(uint8_t listno) const

inside Panel_RA8875.cpp right above PWM Setting.

long Version
The issue trouble me and left me no rest so I kept investigating. Aaaand after a few more hours I found the Problem! And, also as expected, it was something trivial but very hard to find. Adafruit uses on their RA8875 Board the GPIOX to Enable/Disable the Display (tiny ON/OFF label on Pin 46 in the schematic). These GPIO must be set to Output, otherwise the Display wont get the Signal to turn on. So just one register write solved the Problem.

Regards,
Tobi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant