nRF54L15 + ST7789 + LVGL bus fault

Hi

I try to start with ST7789 display on nRF54L15 and there are bus fault after add LVGL library. The project is building correctly, but stop just after leave bootloader. When I cut off LVGL lib, program start and LED blinks. I used NCS3.1.1 and my own board. I changed between SPI00 and SPI30, but the same situation. Is there any problem with mipi and spi in nRF54l15 implementation?

LOG:

00> *** Booting MCUboot v2.1.0-dev-ae1ee57f3906 ***
00> *** Using nRF Connect SDK v3.0.2-89ba1294ac9b ***
00> *** Using Zephyr OS v4.0.99-f791c49f492c ***
00> I: Starting bootloader
00> I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
00> I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
00> I: Boot source: none
00> I: Image index: 0, Swap type: none
00> I: Bootloader chainload address offset: 0x10000
00> I: Image version: v0.1.1
00> I: Jumping to the first image slot
00> [00:00:00.246,500] <err> os: ***** BUS FAULT *****
00> [00:00:00.246,510] <err> os:   Precise data bus error
00> [00:00:00.246,514] <err> os:   BFAR Address: 0xc
00> [00:00:00.246,525] <err> os: r0/a1:  0x00000000  r1/a2:  0x00000009  r2/a3:  0x00000000
00> [00:00:00.246,532] <err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x000497ef
00> [00:00:00.246,536] <err> os:  xpsr:  0x69000000
00> [00:00:00.246,540] <err> os: Faulting instruction address (r15/pc): 0x0005c3b2
00> [00:00:00.246,573] <err> os: Current thread: 0x200044b8 (unknown)

prj.conf:

# SPI config
CONFIG_SPI=y
CONFIG_SPI_NRFX=y
CONFIG_SPI_NRFX_RAM_BUFFER_SIZE=256
CONFIG_MIPI_DBI=y
CONFIG_MIPI_DBI_SPI=y

# DISPLAY config
CONFIG_ST7789V=y
CONFIG_ST7789V_RGB565=y
CONFIG_DISPLAY=y
CONFIG_DISPLAY_LOG_LEVEL_ERR=y

# LVGL config
CONFIG_LVGL=y
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_USE_LABEL=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_16=y

overlay:

#include <zephyr/dt-bindings/display/panel.h>
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>

/ {
    chosen {
        zephyr,display = &st7789v;
    };

    mipi_dbi {
        compatible = "zephyr,mipi-dbi-spi";
        status = "okay";
        reset-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
        dc-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
        spi-dev = <&spi30>;
        write-only;
        #address-cells = <1>;
        #size-cells = <0>;

        st7789v: st7789v@0 {
            compatible = "sitronix,st7789v";
            status = "okay";
            reg = <0>;
            mipi-max-frequency = <8000000>;
            mipi-mode = "MIPI_DBI_MODE_SPI_4WIRE";
            width = <240>;
            height = <240>;
            x-offset = <0>;
            y-offset = <0>;
            vcom = <0x19>;
            gctrl = <0x35>;
            vrhs = <0x12>;
            vdvs = <0x20>;
            mdac = <0x00>;
            gamma = <0x01>;
            colmod = <0x05>;
            lcm = <0x2c>;
            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];
        };
    };
};

&spi30 {
    status = "okay";
    compatible = "nordic,nrf-spim";
    cs-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
    pinctrl-0 = <&spi30_default>;
    pinctrl-1 = <&spi30_sleep>;
    pinctrl-names = "default", "sleep";
};

part of main.c:

	display_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_display));	

	if (!device_is_ready(display_dev)) 
	{
		LOG_ERR("Device not ready, aborting test");
		return 0;
	}
	
	lv_init();
	lv_obj_clean(lv_scr_act());
	lv_obj_t * label1 = lv_label_create(lv_scr_act());	
	
	lv_label_set_text(label1, str_test);
	lv_obj_set_style_text_color(label1, lv_color_hex(0xffffff), LV_PART_MAIN);
	lv_obj_align(label1, LV_ALIGN_CENTER, 0, -30);

	lv_task_handler();
	display_blanking_off(display_dev);

	for (;;) {

		led_red_on();		
		k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));
		led_red_off();
		k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));

	}

Best regards

PW

Parents Reply Children
No Data
Related