Hello,
I have a waveshare 1.69’ LCD display with the ST7789V2 driver and I'm trying to get it to work with the nRF54L15-DK board using the ST7789V driver on zephyr (docs.zephyrproject.org/.../sitronix,st7789v.html). I used the nRF54L15-DK board because it allows you to increase the spi speed up to 32 MHz.
To interact with the display, I'm trying to use the LVGL library. (https://docs.nordicsemi.com/bundle/ncs-1.8.0/page/kconfig/CONFIG_LVGL.html)
Sdk version: 2.9.1
Toolchain: 2.9.1
Board: nRF54L15 dk
Display: 1.69" LCD (240x280); ST7789V2 driver
For the overlay file, I based it on some posts on devzone:
https://devzone.nordicsemi.com/f/nordic-q-a/116909/working-devicetree-for-st7789v-display
https://devzone.nordicsemi.com/f/nordic-q-a/118566/inquiry-on-st7789v-mipi-dbi-driver-configuration-in-ncs-2-9-0/528828
https://devzone.nordicsemi.com/f/nordic-q-a/118950/define-device_name_get-dev_id-_concat-__device_-dev_id/523091
https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/releases/migration-guide-3.7.html#display
Overlay file:
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h> #include <zephyr/dt-bindings/display/panel.h> / { chosen { zephyr,display = &st7789v2; }; mipi_dbi { compatible = "zephyr,mipi-dbi-spi"; dc-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; spi-dev = <&spi00>; #address-cells = <1>; #size-cells = <0>; st7789v2: st7789v2@0 { status = "okay"; compatible = "sitronix,st7789v"; mipi-max-frequency = <8000000>; mipi-mode = <MIPI_DBI_MODE_SPI_4WIRE>; reg = <0>; width = <240>; height = <280>; x-offset = <0>; y-offset = <0>; vcom = <0x19>; gctrl = <0x35>; mdac = <0x00>; lcm = <0x2C>; colmod = <0x05>; gamma = <0x01>; porch-param = [0c 0c 00 33 33]; cmd2en-param = [5a 69 02 01]; pwctrl1-param = [a4 a1]; pvgam-param = [D0 04 0D 11 13 2B 3F 54 4C 18 0D 0B 1F 23]; nvgam-param = [D0 04 0C 11 13 2C 3F 44 51 2F 1F 1F 20 23]; ram-param = [00 F0]; rgb-param = [CD 08 14]; }; }; }; &spi00 { status = "okay"; compatible = "nordic,nrf-spim"; cs-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; pinctrl-0 = <&spi00_default>; pinctrl-1 = <&spi00_sleep>; pinctrl-names = "default", "sleep"; mx25r64: mx25r6435f@0{ status = "disabled"; }; }; &spi00_default { group1 { psels = <NRF_PSEL(SPIM_SCK, 2, 6)>, <NRF_PSEL(SPIM_MOSI, 2, 8)>, <NRF_PSEL_DISCONNECTED(SPIM_MISO)>; }; };
prj.conf file:
# Hardware config CONFIG_SPI=y CONFIG_SPI_NRFX=y CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=32 # Display config CONFIG_ST7789V=y CONFIG_ST7789V_RGB565=y CONFIG_DISPLAY=y CONFIG_DISPLAY_LOG_LEVEL_ERR=y # System config CONFIG_MAIN_STACK_SIZE=2048 CONFIG_LOG=y # LVGL config CONFIG_LVGL=y CONFIG_LV_MEM_CUSTOM=y CONFIG_LV_USE_LOG=y CONFIG_LV_COLOR_DEPTH_16=y CONFIG_LV_COLOR_16_SWAP=y CONFIG_LV_Z_BITS_PER_PIXEL=16 CONFIG_LV_USE_THEME_DEFAULT=y CONFIG_LV_THEME_DEFAULT_DARK=y CONFIG_LV_USE_METER=y
Main file:
#include <zephyr/device.h> #include <zephyr/drivers/display.h> #include <lvgl.h> #include <stdio.h> #include <string.h> #include <zephyr/logging/log.h> #include <zephyr/logging/log_ctrl.h> LOG_MODULE_REGISTER(main, LOG_LEVEL_DBG); int main(void) { LOG_INF("LCD Screen test"); return 0; }
With these files, the code compiles and flashes, but when I look at the terminal the following error appears:
*** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d *** *** Using Zephyr OS v3.7.99-ca954a6216c9 *** [00:00:00.581,722] <err> os: ***** SECURE FAULT ***** [00:00:00.581,728] <err> os: Address: 0x22 [00:00:00.581,732] <err> os: Attribution unit violation [00:00:00.581,741] <err> os: r0/a1: 0x00000000 r1/a2: 0x00000005 r2/a3: 0x0007467c [00:00:00.581,748] <err> os: r3/a4: 0x00000000 r12/ip: 0x20013f8a r14/lr: 0x000689e1 [00:00:00.581,753] <err> os: xpsr: 0x61000000 [00:00:00.581,757] <err> os: Faulting instruction address (r15/pc): 0x00069352 [00:00:00.581,775] <err> os: >>> ZEPHYR FATAL ERROR 41: Unknown error on CPU 0 [00:00:00.581,796] <err> os: Current thread: 0x20014038 (unknown) [00:00:00.651,861] <err> os: Halting system
Could you please help me resolve this issue?
Other question, with this overlay file configuration how I configure backlight pin of display ?
Thanks,
GoncaloS