SSD1306/SH1106 does not work in custom board with nrf52832

Hello

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---displaygithub.com/.../test_zephyr_oled . This project was built and flashed but I don't see anything.

I work with sh1106 but for now, I choose ssd1306 to see at least something. If you know what exactly needs to be written and selected for sh1106 to work, I'd be grateful for advice (maybe we can just change the page offset in ssd1306 to make it work properly in sh1106?).

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;
    };
};

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

Help me please

Parents Reply
  • You can also search for the implementation of the ssd1306_init_device() to see which api that fail in specific. Though from your simply experiment it seems that there is no ack on the i2c interface, are you sure pins are connected properly, module is powered, ground is common, and that the module is in i2c mode (and not spi or other mode) with correct i2c address?

    The nRF52832 support two different hardware implementation of twi (i2c)

    compatible = "nordic,nrf-twi"; 
    compatible = "nordic,nrf-twim"; 

    I don't expect they make any difference here.

    Kenneth

Children
Related