This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Example at ...\ncs\v1.4.0\zephyr\samples\drivers\display does not work with SSD1306 wired directly to nRF9160DK

When I program the nrf9160dk with the example, the code detects the SSD1306, but the display looks like:

The image is only using the middle half (16 rows) of the display that has 32 rows and 128 columns. 

And the left side of the image is a random set of pixels.

What can I do to get the example to give me text on the screen?

I am using the SSD1306 OLED at: https://www.amazon.com/Pieces-Display-Module-SSD1306-3-3V-5V/dp/B08CDN5PSJ/ref=sr_1_8?dchild=1&keywords=ssd1306&qid=1606702037&sr=8-8

Do I have to modify any of the files to target the nRF9160 instead of the nRF52 family?

Parents
  • I tried the suggestion to add the 2 attributes to the twim2 entry in the device tree. This twim2 entry is apparently not available for the NRF9160. Maybe it is only used for the NRF52? Was it replaced with the i2c2 entry that I am already using?

    &twim2 {
      status = "okay";
      concat-buf-size = <1024>;
    };

    -- Found BOARD.dts: D:/Users/craig/ncs/v1.4.99-dev1/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns.dts
    -- Found devicetree overlay: D:/nordicProjects/cfb/nrf9160dk_nrf9160ns.overlay
    Error: nrf9160dk_nrf9160ns.dts.pre.tmp:577.1-7 Label or path twim2 not found
    FATAL ERROR: Syntax error parsing input tree
    CMake Error at D:/Users/craig/ncs/v1.4.99-dev1/zephyr/cmake/dts.cmake:206 (message):
    command failed with return code: 1

    The addition of the prj.conf options did not result in any errors or functional change.

    CONFIG_NRFX_TWIM2=y
    CONFIG_I2C_NRFX=y

    Please let me know what you find out when you try this out this week.

    I also looked at the i2c signals the i2c2 master in the NRF9160 is sending to the ssd1306. The edge rates look good, and the ssd1306 is consistently acknowledging the transfers. Here was one random data sample to demonstrate the signal integrity. 

    I have also included a screenshot with a "stop" and a "start" that shows the 0x78 device address followed by 0x00 data byte.

    Regards,

    Craig

  • Hi Craig,

    Thank you for the update, I have been out of office this week, so I have not read trough your reply yet. I will hopefully be back before the week is over.

    Regards,

    Håkon

  • Have you been able to spend any time on this? If your build works to use all pixels of the 128x32 array, can you please provide your files and let me know what versions of the tools you are using? Thanks!

  • Yes, 'cfb' and a few other samples work with the whole array. I will post the complete code tomorrow. I have tested the display with 'cfb' and ncs v1.4.2, v1.5.0-rc1 and v1.5.0.

    I had success using i2c2. I will share a few details on this later.

Reply Children
No Data
Related