<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84235/zephyr-nrf5240-dk-lvgl-ssd1306</link><description>Hi, 
 I am developing an application with the lvgl driver. I was trying to make the example lvgl works, but I can not. I am using a 128 x 32 screen with a ssd1306 controller (in the description of the example says it is compatible). When I connect the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 13 Apr 2024 06:29:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84235/zephyr-nrf5240-dk-lvgl-ssd1306" /><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/478616?ContentTypeID=1</link><pubDate>Sat, 13 Apr 2024 06:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e4c9f26-d115-44b3-a436-158f91621a2e</guid><dc:creator>Amank0623</dc:creator><description>&lt;p&gt;i already raised a new case but they are not replaying properly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/478008?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 10:24:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07dd8eeb-1906-4428-a7de-541e371afa92</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Please make a new case if you have problems.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/477788?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 11:52:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:439399f1-82a2-486c-8995-42ae35340162</guid><dc:creator>Amank0623</dc:creator><description>&lt;p&gt;how does your ssd1306 work can you help with that i am facing issue in interfacing with nrf52840&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/350703?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 13:57:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b28268e-3151-49f6-9609-4d55ac681155</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Nice! I&amp;#39;m happy you made it work!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/350543?ContentTypeID=1</link><pubDate>Tue, 01 Feb 2022 00:24:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27dc50a5-d02f-4361-b82a-e19a150aee1b</guid><dc:creator>Carlos Galiana</dc:creator><description>&lt;p&gt;It is solved. I was missing CONFIG_I2C=y in prj.confg.&lt;/p&gt;
&lt;p&gt;Thank you Simon!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/350536?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 21:45:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f3f90d7-927d-450e-a0f0-8b9af601d519</guid><dc:creator>Carlos Galiana</dc:creator><description>&lt;p&gt;Thank you sipan112. I am trying to learnt as fast as possible, but like you said, I select nrf52840 because the amount of examples around it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/350535?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 21:41:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd2f55db-f9e6-45cb-9792-7ba92c3ca39b</guid><dc:creator>Carlos Galiana</dc:creator><description>&lt;p&gt;Hi Simon. Thanks for the time you have spent answering me. The lvgl guide from Zephyr says that you have to use the Shield of ssd1306 (called &amp;quot;&lt;span&gt;ssd1306_128x32&lt;/span&gt;&amp;quot; in my case) from the SDK. This shield includes a kconfig.defconfig file which put the display name as &amp;quot;SSD1306&amp;quot; and execute &amp;quot;config SSD1306&amp;quot;. The shield also has an overlay file creating a node with the requirements and the links you have commented. I have set the shield in the CMakeList.txt as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(lvgl)

FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
set(SHIELD ssd1306_128x32)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The shield contents the following files&lt;/p&gt;
&lt;p&gt;&amp;bull; The kconfig.defconfig form the shield file set:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if SHIELD_SSD1306_128X64 || SHIELD_SSD1306_128X32 || SHIELD_SH1106_128X64

config I2C
	default y

endif # SHIELD_SSD1306_128X64 || SHIELD_SSD1306_128X32 || SHIELD_SH1106_128X64

config SSD1306
	default y

choice SSD1306_CONTROLLER_TYPE
	default SSD1306_SH1106_COMPATIBLE if SHIELD_SH1106_128X64
endchoice

if LVGL

config LVGL_DISPLAY_DEV_NAME
	default &amp;quot;SSD1306&amp;quot;
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;bull;&amp;nbsp;&lt;/span&gt;The overlay file from the shield:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
&amp;amp;arduino_i2c {
	status = &amp;quot;okay&amp;quot;;

	ssd1306@3c {
		compatible = &amp;quot;solomon,ssd1306fb&amp;quot;;
		reg = &amp;lt;0x3c&amp;gt;;
		label = &amp;quot;SSD1306&amp;quot;;
		width = &amp;lt;128&amp;gt;;
		height = &amp;lt;32&amp;gt;;
		segment-offset = &amp;lt;0&amp;gt;;
		page-offset = &amp;lt;0&amp;gt;;
		display-offset = &amp;lt;0&amp;gt;;
		multiplex-ratio = &amp;lt;31&amp;gt;;
		segment-remap;
		com-invdir;
		com-sequential;
		prechargep = &amp;lt;0x22&amp;gt;;
	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The DeviceTree of my board nrf52840dk_nrf52840.dts.pre.tmp file:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;  i2c0: i2c@40003000 {
   #address-cells = &amp;lt;1&amp;gt;;
   #size-cells = &amp;lt;0&amp;gt;;
   reg = &amp;lt;0x40003000 0x1000&amp;gt;;
   clock-frequency = &amp;lt;100000&amp;gt;;
   interrupts = &amp;lt;3 1&amp;gt;;
   status = &amp;quot;disabled&amp;quot;;
   label = &amp;quot;I2C_0&amp;quot;;
  };

arduino_i2c: &amp;amp;i2c0 {
 compatible = &amp;quot;nordic,nrf-twi&amp;quot;;
 status = &amp;quot;okay&amp;quot;;
 sda-pin = &amp;lt;26&amp;gt;;
 scl-pin = &amp;lt;27&amp;gt;;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Although I set the shield the way I have showed you the autoconfig.h is not taking the changes.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643664913395v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Do you know what could be going on?&lt;/p&gt;
&lt;p&gt;When I try to set &amp;quot;CONFIG SDD1306=y &amp;quot; in the proj.conf (I know the shield do it for me but as I said, it was not working) this warning occurs:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643665164095v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I have realised that if I go to the kconfig GUI from VisualStudio you have the option of enable SDD1306 driver, but I cant selct the option (I dont know why).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1643665247844v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Again, thank you for your time. Your message has guided me a lot.&lt;/p&gt;
&lt;pre class="tw-data-text tw-text-large tw-ta" id="tw-target-text" dir="ltr"&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/350472?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 14:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c021d3b-cb80-4921-a52b-a6bc36572d12</guid><dc:creator>sipan112</dc:creator><description>&lt;p&gt;&lt;span&gt;This requires some knowledge about the build-configuration process for zephyr.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;The difficult part are setting up the I2C driver for the target board. In this project, the nRF52 I2C support is well-known and relatively straightforward in configuring. Other SOCs and boards are not always so easy.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + nRF5240 DK + lvgl + SSD1306</title><link>https://devzone.nordicsemi.com/thread/350443?ContentTypeID=1</link><pubDate>Mon, 31 Jan 2022 13:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1973c9c3-96fc-43f5-9e41-4cf3b64597f3</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;It seems like you&amp;#39;re using the sample&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/samples/subsys/display/lvgl"&gt;\zephyr\samples\subsys\display\lvgl&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The&amp;nbsp;display_dev struct, which is returned from&amp;nbsp;device_get_binding(CONFIG_LVGL_DISPLAY_DEV_NAME) is passed into &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/samples/subsys/display/lvgl/src/main.c#L50"&gt;display_blanking_off()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The display_blanking_off() function is part of the API &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/include/drivers/display.h#L311"&gt;zephyr/include/drivers/display.h&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The API functions display.h, has to be linked with one of the source files in &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display"&gt;zephyr/drivers/display&lt;/a&gt;, and I think it is the file &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/ssd1306.c"&gt;zephyr/drivers/display/ssd1306.c&lt;/a&gt; in your case
&lt;ul&gt;
&lt;li&gt;You can see that&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/ssd1306.c#L443"&gt; blanking_off() will be linked to ssd1306_resume()&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;To enable the driver ssd1306.c, you need to do the following&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Set the Kconfig&amp;nbsp;CONFIG_SSD1306 in the prj.conf
&lt;ul&gt;
&lt;li&gt;See&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/CMakeLists.txt#L16"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/CMakeLists.txt#L16&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Enable a node in the device tree with the compatible &amp;quot;&lt;span&gt;solomon,ssd1306fb&amp;quot;&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;See&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/ssd1306.c#L7"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/ssd1306.c#L7&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Take a look at these to see how you can go about this:
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/boards/shields/ssd1306/ssd1306_128x32.overlay#L17"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/boards/shields/ssd1306/ssd1306_128x32.overlay#L17&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;This guide might give you some clues how to go about this as well:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/peripherals/posts/lvgl-on-a-tft-lcd-display-with-the-nrf9160-dk"&gt;https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/peripherals/posts/lvgl-on-a-tft-lcd-display-with-the-nrf9160-dk&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You also need to set &lt;span&gt;CONFIG_LVGL_DISPLAY_DEV_NAME to the same value as &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/boards/shields/ssd1306/ssd1306_128x32.overlay#L19"&gt;the label you pass into the &amp;quot;solomon,ssd1306fb&amp;quot; node&lt;/a&gt;, so try setting CONFIG_LVGL_DISPLAY_DEV_NAME=&amp;quot;SSD1306&amp;quot; in the prj.conf file&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Lastly you need to make the init function in&amp;nbsp;ssd1306.c runs successfully, if not the call to device_get_binding() will fail&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;The init function runs &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/eb0141519f9c278ed2c255f461b8eb82bd3566df/kernel/device.c#L72"&gt;here&lt;/a&gt;, and if it fails it will set &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/eb0141519f9c278ed2c255f461b8eb82bd3566df/kernel/device.c#L85"&gt;this&lt;/a&gt;, which will &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/eb0141519f9c278ed2c255f461b8eb82bd3566df/kernel/device.c#L162"&gt;make device_binding fail&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;As you can see, the function &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/ssd1306.c#L399"&gt;ssd1306_init()&lt;/a&gt; is &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/ssd1306.c#L454-L457"&gt;passed into the device define macro&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The init function will check if the device is connected and works correctly, &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/ssd1306.c#L365-L394"&gt;through a lot of commands&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;When&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/drivers/display/ssd1306.c#L399"&gt;ssd1306_init()&lt;/a&gt;&amp;nbsp;runs, make sure to connect the display correctly to the chip, you need to connect it according to how you have configured the hardware in the device tree. For example if you&amp;#39;ve placed the &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/2fb8ab3509edf39bd8f420e1fc57632dd561b5ac/boards/shields/ssd1306/ssd1306_128x32.overlay#L17"&gt;&amp;quot;solomon,ssd1306fb&amp;quot; node&lt;/a&gt; inside i2c0, use the pins i2c0 is configured with (to figure out this, open sample/build/zephyr/zephyr.dts and search for i2c0). Check out the Thingy board dts file to see how to change i2c configurations:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/3d51870a11dbbdab8558d9d77f71057e5ef5893d/boards/arm/thingy91_nrf9160/thingy91_nrf9160_common.dts#L113-L118"&gt;https://github.com/nrfconnect/sdk-nrf/blob/3d51870a11dbbdab8558d9d77f71057e5ef5893d/boards/arm/thingy91_nrf9160/thingy91_nrf9160_common.dts#L113-L118&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If anything is unclear, or if you face any more difficulties following my instructions, don&amp;#39;t hesitate to ask&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>