This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Display driver bus fault in non secure configuration

Hello

I have been able to run the lvgl sample in the nrf9160dk, however this only works when built in a secure board, when build in non secure a bus fault occurs. Using the addr2line the fault appears in the

ssd16xx_init function, while waiting for the 
!spi_is_ready(&config->bus)
I need this to work in a non secure configuration since I willl be using the modem libraries. Are there any configurations that I need to change to use the display driver in non secure build configurations?
Parents
  • Hi,

     

    Could you share the full bus fault message?

    ssd16xx_init function, while waiting for the 
    !spi_is_ready(&config->bus)

    If this is the function that faulted, it could indicate that your device is "NULL". How have you described the device in DTS?

     

    Kind regards,

    Håkon

  • I use this overlay to describe the device

    &spi3 {
    	status = "okay";
    	mosi-pin = <11>;
    	miso-pin = <12>;
    	sck-pin = <13>;
    	cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
    	ssd16xxfb@0 {
    		//compatible = "solomon,ssd16xxfb", "gooddisplay,gdeh0154a07";
            compatible = "solomon,ssd16xxfb";
    		label = "SSD16XX";
    		spi-max-frequency = <4000000>;
    		reg = <0>;
    		height = <200>;
    		width = <200>;
    		pp-width-bits = <8>;
    		pp-height-bits = <16>;
    		dc-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;    /* D9 */
    		reset-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;    /* D8 */
    		busy-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;    /* D7 */
    		gdv = [ 00  ];
    		sdv = [ 41 a8 32  ];
    		vcom = <0x00>;
    		border-waveform = <0x05>;
    		tssv = <0x80>;
    	};
    
    	st7789v@0 {
    		compatible = "sitronix,st7789v";
    		label = "ST7789V";
    		spi-max-frequency = <20000000>;
    		reg = <0>;
    		cmd-data-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; /* D9 */
    		reset-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; /* D8 */
    		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  ];
    	};
    };
    

    I managed to control the device correctly using the nef9160dk_nrf9160 board in the build configuration

    This is the configuration

    #Display
    CONFIG_DISPLAY=y
    CONFIG_DISPLAY_LOG_LEVEL_ERR=y
    
    CONFIG_SPI=y 
    CONFIG_SSD16XX=y
    
    #LVGL
    CONFIG_LVGL_DISPLAY_DEV_NAME="SSD16XX"
    CONFIG_LVGL_HOR_RES_MAX=200
    CONFIG_LVGL_VER_RES_MAX=200
    CONFIG_LVGL_VDB_SIZE=100
    CONFIG_LVGL_DPI=180
    CONFIG_LVGL_BITS_PER_PIXEL=1
    CONFIG_LVGL_COLOR_DEPTH_1=y
    
    CONFIG_LVGL=y
    CONFIG_LVGL_USE_LABEL=y
    CONFIG_LVGL_USE_CONT=y
    CONFIG_LVGL_USE_THEME_MATERIAL=y
    CONFIG_LVGL_USE_IMG=y
    CONFIG_LVGL_USE_DEBUG=y
    
    CONFIG_LVGL_TXT_ENC_UTF8=y
    
    CONFIG_LVGL_FONT_MONTSERRAT_18=y
    
    CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_18=y

    This is the error in the sample "out of the box"

      

    When I tried it in the complete program

    Thanks

Reply
  • I use this overlay to describe the device

    &spi3 {
    	status = "okay";
    	mosi-pin = <11>;
    	miso-pin = <12>;
    	sck-pin = <13>;
    	cs-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
    	ssd16xxfb@0 {
    		//compatible = "solomon,ssd16xxfb", "gooddisplay,gdeh0154a07";
            compatible = "solomon,ssd16xxfb";
    		label = "SSD16XX";
    		spi-max-frequency = <4000000>;
    		reg = <0>;
    		height = <200>;
    		width = <200>;
    		pp-width-bits = <8>;
    		pp-height-bits = <16>;
    		dc-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;    /* D9 */
    		reset-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;    /* D8 */
    		busy-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;    /* D7 */
    		gdv = [ 00  ];
    		sdv = [ 41 a8 32  ];
    		vcom = <0x00>;
    		border-waveform = <0x05>;
    		tssv = <0x80>;
    	};
    
    	st7789v@0 {
    		compatible = "sitronix,st7789v";
    		label = "ST7789V";
    		spi-max-frequency = <20000000>;
    		reg = <0>;
    		cmd-data-gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; /* D9 */
    		reset-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; /* D8 */
    		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  ];
    	};
    };
    

    I managed to control the device correctly using the nef9160dk_nrf9160 board in the build configuration

    This is the configuration

    #Display
    CONFIG_DISPLAY=y
    CONFIG_DISPLAY_LOG_LEVEL_ERR=y
    
    CONFIG_SPI=y 
    CONFIG_SSD16XX=y
    
    #LVGL
    CONFIG_LVGL_DISPLAY_DEV_NAME="SSD16XX"
    CONFIG_LVGL_HOR_RES_MAX=200
    CONFIG_LVGL_VER_RES_MAX=200
    CONFIG_LVGL_VDB_SIZE=100
    CONFIG_LVGL_DPI=180
    CONFIG_LVGL_BITS_PER_PIXEL=1
    CONFIG_LVGL_COLOR_DEPTH_1=y
    
    CONFIG_LVGL=y
    CONFIG_LVGL_USE_LABEL=y
    CONFIG_LVGL_USE_CONT=y
    CONFIG_LVGL_USE_THEME_MATERIAL=y
    CONFIG_LVGL_USE_IMG=y
    CONFIG_LVGL_USE_DEBUG=y
    
    CONFIG_LVGL_TXT_ENC_UTF8=y
    
    CONFIG_LVGL_FONT_MONTSERRAT_18=y
    
    CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_18=y

    This is the error in the sample "out of the box"

      

    When I tried it in the complete program

    Thanks

Children
Related