Can't build lvgl sample with ssd1306 and nrf52832

I try to do everything as in the guide (second advanced option) devzone.nordicsemi.com/.../small-i2c-oled-displays-using-nrf-connect-sdk but I get errors when building

but here my ssd1306_128x64.overlay

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

&arduino_i2c {
	status = "okay";

	ssd1306_ssd1306_128x64: ssd1306@3c {
		compatible = "solomon,ssd1306fb";
		reg = <0x3c>;
		width = <128>;
		height = <64>;
		segment-offset = <0>;
		page-offset = <0>;
		display-offset = <0>;
		multiplex-ratio = <63>;
		segment-remap;
		com-invdir;
		prechargep = <0x22>;
	};
};

also overlay for my board 

&pinctrl {
    i2c0_default: i2c0_default {
		group1 {
			psels = <NRF_PSEL(TWIM_SDA, 0, 22)>,
				<NRF_PSEL(TWIM_SCL, 0, 23)>;
		};
	};

	i2c0_sleep: i2c0_sleep {
		group1 {
			psels = <NRF_PSEL(TWIM_SDA, 0, 22)>,
				<NRF_PSEL(TWIM_SCL, 0, 23)>;
			low-power-enable;
		};
	};
};

arduino_i2c: &i2c0 {
	compatible = "nordic,nrf-twi";
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST>;
  
    ssd1306: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>; //0x3c is the i2c address of the display controller IC, SSD1306.
        width = <128>; // Width of the display.
        height = <64>; // Height of the display. Change to '64' when using the 128x64 pixel version.
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>; //change to '63' when using the 128x64 pixel version
        segment-remap;
        com-invdir;
        com-sequential;
        prechargep = <0x22>;
	// add more driver settings here
    };
};

I work with a custom board with nRF52832 chip and with NCS 2.8.0. Help me please

  • Hi

    I am not sure if the instructions for 2022 blog should work with the latest ncs 2.8.0.

    I would suggest either use the same sdk as suggested by the blog and then follow the instructions, or first try the lvgl sample from the ncs 2.8.0 and then modify accordingly.

    Where you able to compile the basic lvgl sample (as per sample instructions) in ncs 2.8.0?

    As per your provided information, why you are using 2 separate overlays? and how you are adding them both in the build configuration?

    It looks like one of the overlays is not included in the build.

  • Hello, thank you for your reply.

    It looks like the ssd1306 overlay is added by itself.

    I made a project based on this guy's example taking the same settings, but considering the specifics of nrf52, since it's a relatively recent solution, I thought it should work. devzone.nordicsemi.com/.../nrf52840-dk---ssd1306---display. github.com/.../test_zephyr_oled . This project was built but I don't see anything.

    So here is my overlay:

    / {
        chosen {
            zephyr,display = &ssd1306;
        };
    };
    
    &pinctrl {
        i2c0_default: i2c0_default {
    		group1 {
    			psels = <NRF_PSEL(TWIM_SDA, 0, 22)>,
    				<NRF_PSEL(TWIM_SCL, 0, 23)>;
    		};
    	};
    
    	i2c0_sleep: i2c0_sleep {
    		group1 {
    			psels = <NRF_PSEL(TWIM_SDA, 0, 22)>,
    				<NRF_PSEL(TWIM_SCL, 0, 23)>;
    			low-power-enable;
            };
        };
    };
    
    &i2c0 {
        compatible = "nordic,nrf-twi";
        status = "okay";
        pinctrl-0 = <&i2c0_default>;
        pinctrl-1 = <&i2c0_sleep>;
        pinctrl-names = "default", "sleep";
        clock-frequency = <I2C_BITRATE_FAST>;
    
    
        ssd1306: ssd1306@3c {
            compatible = "solomon,ssd1306fb";
            reg = <0x3c>;
            height = <64>;
            width = <128>;
            segment-offset = <0>;
            page-offset = <0>;
            display-offset = <0>;
            multiplex-ratio = <63>;
            prechargep = <0x22>;
            com-invdir;
            segment-remap;
        };
    };

    Also I should say that I actually use sh1106, but I have worked with it on several platforms and the code for ssd1306 always worked (not always correctly, but it showed something). Should I close the failed build thread (because I was able to build), or can you help me further with the screen issue?

  • You should note that although the SSD1306 code works to a certain extent, the display results are not accurate, this may be due to the difference between the two types of screens (SH1106 and SSD1306) in signal processing, image buffer structure, or control commands.

    Block Blast

Related