Unable to Set CONFIG_SSD1306 to 'y' in Zephyr for nRF52

Hi Nordic DevZone Community,

I am working on a project using the Zephyr RTOS with an nRF52833 series board, and I am trying to interface with an SSD1306 OLED display via I2C. However, I am encountering an issue where I am unable to set CONFIG_SSD1306 to 'y' in my prj.conf file. The build system keeps setting it to 'n' and gives the following error:

CONFIG_SSD1306 was assigned the value 'y' but got the value 'n'. Missing dependencies: DT_HAS_SOLOMON_SSD1306FB_ENABLED || DT_HAS_SINOWEALTH_SH1106_ENABLED

Here are the details of my setup:

Project Configuration (prj.conf):

CONFIG_GPIO=y

#Needed for Sensirion I2C Sensor (SHT4x)
CONFIG_I2C=y
CONFIG_I2C_NRFX=y
CONFIG_SPI=y


CONFIG_DEBUG=y

#Needed for button
CONFIG_SMF=y
CONFIG_EVENTS=y


CONFIG_HEAP_MEM_POOL_SIZE=4096

#Display driver
CONFIG_DISPLAY=y
CONFIG_SSD1306=y
# CONFIG_SSD1306_DEFAULT_CONTRAST=128



Device Tree Overlay (board.overlay):

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

};

&i2c1 {
    compatible = "nordic,nrf-twi";
    status = "okay";
    clock-frequency = <I2C_BITRATE_FAST>;
    ssd1306fb: ssd1306fb@3c {
        compatible = "solomon,ssd1306fb";
        status = "okay";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        prechargep = <0x22>;
    };
};
The build is succesful but devices freezes if I flash. 

Could someone please help me identify what might be missing or misconfigured? Any guidance on how to properly set up the SSD1306 OLED display with the nRF52 series board in Zephyr would be greatly appreciated.

Thank you!

Related