Zephry display driver for ssd1306 - not working :(

I am using display example code from zephry repo. ( zephyr/samples/drivers/display at main · zephyrproject-rtos/zephyr) . Connected to a nRF7002 dk , i am using EA W096016-XALW with SSD1306B driver. They communicate through i2c 

Here is my device tree

#include <zephyr/dt-bindings/gpio/gpio.h>

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

};

&pinctrl {
    i2c1_default: i2c1_default {
        group1 {
            bias-pull-up;
        };
    };

    i2c1_sleep: i2c1_sleep {
        group1 {
            low-power-enable;
        };
    };
};

&i2c1 {
    status = "okay";

    ssd1306: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <96>;
        height = <16>;
        segment-offset = <0>;
        page-offset = <4>;
        display-offset = <0>;
        multiplex-ratio = <15>;
        segment-remap;
        com-invdir;
        prechargep = <0x22>;
        reset-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
    };
};

i am getting this log message
[00:00:00.254,730] <err> ssd1306: Failed to suspend: -5
[00:00:00.254,730] <err> ssd1306: Failed to initialize device!
*** Booting nRF Connect SDK v3.3.4-b096d30d893b ***
*** Using Zephyr OS v4.3.99-37e6c28576ee ***
[00:00:00.254,821] <err> sample: Device ssd1306@3c not found. Aborting sample.

  • Hello,

    The log shows that it returns -5 (-EIO) when trying to suspend the device, which seems to be the first command during device initialization that calls the I2C write function. In other words, it looks like the I2C communication is failing. Please make sure the display driver's logic supply is powered from VDD on the DK so that the voltage levels match on both sides. Also, if you have a logic analyzer or oscilloscope, it would be helpful for troubleshooting to probe the bus lines.

    Best regards,

    Vidar

Related