Buydisplay RA8875 ESP32 issues


Hi all, I have started experimenting with LVGL in the previous weeks. I have this display, with the RA8875 controller, and FT5206 Capacitive touch controller (I am planning to add support after making the display work).

What are the issues I am encoutering out of the box?

When using the lv_port_esp32 example, I encounter multiple issues, namely:

  1. The display’s backlight does not turn on, since this specific display uses the internal RA8875’s PWM signal 1, so it should be activated by SPI. (Solved)
  2. I am not able to select “Half duplex” mode for the SPI. (Solved?)
  3. After solving the above, the display remains white (See picture in the end).
    My MCU is an ESP32 based developer board (Wemos LOLIN32).

How did I solve the above issues?

  1. I added some code in order to update the PWM register to set the brightness. I have started working on making it more “publishable”, however some support would be needed in order to make a pull request in the future.
  2. I temporarily Commented the “memory clear” part of the initialization procedure.
// Perform a memory clear (wait maximum of 100 ticks)
ra8875_write_cmd(RA8875_REG_MCLR, 0x80);
      for(i = 100; i != 0; i--) {
           /* commenting start */
            // if ((ra8875_read_cmd(RA8875_REG_MCLR) & 0x80) == 0x00)
            //     break;
            // }
            /* commenting end*/
    /* commenting start */
    // if (i == 0) {
    //     ESP_LOGW(TAG, "WARNING: Memory clear timed out; RA8875 may be unresponsive.");
    // }
    /* commenting end*/

What do I want to achieve?

I would like a fully working display, in order to start to work on porting support for the touch controller.

What have I tried so far?

See “How did I solve the above issues?”

Screenshot and/or video

sdkconfig.txt (59.4 KB)
log.txt (17.6 KB)