<?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 ssd16xx driver and epaper refresh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88790/zephyr-ssd16xx-driver-and-epaper-refresh</link><description>Hi 
 
 I use in my project Zephyr ssd16xx driver with Waveshare epaper and LVGL and everything seems to be OK, but there is a strange behavior, when the e-paper works longer period (I saw that first, if I forgot my work in progress project running on</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Apr 2024 07:48:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88790/zephyr-ssd16xx-driver-and-epaper-refresh" /><item><title>RE: Zephyr ssd16xx driver and epaper refresh</title><link>https://devzone.nordicsemi.com/thread/477242?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 07:48:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:050df99c-6fbb-4242-8f1a-259f85fe063d</guid><dc:creator>Tiit</dc:creator><description>&lt;p&gt;I used some examples from Zephyr LVGL library. With new Zephyr versions is the grayish color problem also gone.&lt;/p&gt;
&lt;p&gt;SSD1680 and newer chips have waveform table included into the chips ROM and you don&amp;#39;t have to write the code to overlay anymore. But I got partial refresh not working anymore -- maybe its better that way -- screen is cleared after every refresh.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Main&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/types.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;math.h&amp;gt;

#include &amp;lt;soc.h&amp;gt;
#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/sys/atomic.h&amp;gt;

#include &amp;lt;zephyr/drivers/display.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;lvgl.h&amp;gt;

#include &amp;lt;zephyr/logging/log.h&amp;gt;

LOG_MODULE_REGISTER(epaper);

static lv_obj_t *info_value;
static lv_obj_t *info_label;

static lv_obj_t *info_scr = NULL;

static lv_style_t big_font, small_font;

static const struct device *display_dev;

void main()	{
	
	info_scr = lv_obj_create(NULL);

	//Initialize display device
	display_dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_display));
	if (!device_is_ready(display_dev)) {
		LOG_ERR(&amp;quot;E-paper initialize error&amp;quot;);
		return;
	}

	//Initialize fonts
	lv_style_t* big_font_pointer = &amp;amp;big_font;
    lv_style_t* small_font_pointer = &amp;amp;small_font;

	lv_style_init(big_font_pointer);
	lv_style_init(small_font_pointer);

	lv_style_set_text_font(big_font_pointer, &amp;amp;lv_font_montserrat_48);
	lv_style_set_text_font(small_font_pointer, &amp;amp;lv_font_montserrat_20);

	//Main label for informative text	
	info_value = lv_label_create(info_scr);
	lv_obj_add_style(info_value, big_font_pointer, LV_PART_MAIN);
	lv_obj_align(info_value, LV_ALIGN_LEFT_MID, 0, 0);

	//Sublabel for informative text
	info_label = lv_label_create(info_scr);
	lv_obj_add_style(info_label, small_font_pointer, LV_PART_MAIN);
	lv_obj_align(info_label, LV_ALIGN_LEFT_MID, 0, 30);

	//Text	
	lv_label_set_text(info_value, &amp;quot;some text&amp;quot;);
	//Subtext
	lv_label_set_text(info_label, &amp;quot;some subtext&amp;quot;);

	lv_scr_load(info_scr);

	lv_task_handler();
}
	&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Overlay:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/ {
    chosen {
        zephyr,display = &amp;amp;ssd16xx;
    };
};

&amp;amp;spi1 {

    status = &amp;quot;okay&amp;quot;;
    compatible = &amp;quot;nordic,nrf-spim&amp;quot;;
    cs-gpios = &amp;lt;&amp;amp;gpio1 15 GPIO_ACTIVE_LOW&amp;gt;;
    pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
    pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;

    ssd16xx: ssd16xx@0 {
        compatible = &amp;quot;solomon,ssd16xxfb&amp;quot;;
        spi-max-frequency = &amp;lt;4000000&amp;gt;;
        reg = &amp;lt;0&amp;gt;;
        width = &amp;lt;250&amp;gt;;
        height = &amp;lt;122&amp;gt;;
        pp-width-bits = &amp;lt;8&amp;gt;;
        pp-height-bits = &amp;lt;16&amp;gt;;
        dc-gpios = &amp;lt;&amp;amp;gpio0 11 GPIO_ACTIVE_LOW&amp;gt;;
        reset-gpios = &amp;lt;&amp;amp;gpio0 5 GPIO_ACTIVE_LOW&amp;gt;;
        busy-gpios = &amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_HIGH&amp;gt;;
        supply-gpios = &amp;lt;&amp;amp;gpio0 16 GPIO_ACTIVE_HIGH&amp;gt;;
        zephyr,pm-device-runtime-auto;
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;prj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=8
CONFIG_MAIN_STACK_SIZE=2048

CONFIG_DISPLAY=y
CONFIG_DISPLAY_LOG_LEVEL_ERR=y

CONFIG_USE_SEGGER_RTT=y

CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y

# Enable SPI
CONFIG_SPI=y
CONFIG_SPI_NRFX=y

CONFIG_DISPLAY=y
CONFIG_SSD16XX=y

CONFIG_LVGL=y

CONFIG_LV_COLOR_DEPTH_1=y

CONFIG_LV_USE_LABEL=y
CONFIG_LV_USE_WIN=y=y
CONFIG_LV_USE_IMG=y

CONFIG_LV_TXT_ENC_UTF8=y
CONFIG_LV_FONT_MONTSERRAT_12=y
CONFIG_LV_FONT_MONTSERRAT_20=y
CONFIG_LV_FONT_MONTSERRAT_30=y
CONFIG_LV_FONT_MONTSERRAT_38=y
CONFIG_LV_FONT_MONTSERRAT_48=y
CONFIG_LV_USE_FONT_SUBPX=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That should work and maybe you get the idea from it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Tiit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr ssd16xx driver and epaper refresh</title><link>https://devzone.nordicsemi.com/thread/467484?ContentTypeID=1</link><pubDate>Sun, 04 Feb 2024 22:41:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27dee0ce-d44f-42ad-9550-b2dd8f5c3c07</guid><dc:creator>lvh831</dc:creator><description>&lt;p&gt;That&amp;#39;s very cool that you able to incopperate&amp;nbsp;ssd16xx into the design. I&amp;#39;m wondering if you could share this sample code setup? Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr ssd16xx driver and epaper refresh</title><link>https://devzone.nordicsemi.com/thread/371689?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2022 13:22:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cb33de5-37c3-4f41-9cf4-b552b9e59adb</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I would recommend that you check with the E-paper manufacture to see if this is a known issue that can happen just in case.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;As for the driver it is maintained by Zephyr so i would recommend that you ask in the Zephyr forum/&lt;a href="https://discord.com/invite/Ck7jw53nU2"&gt;discord&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Sorry for not being of much help, maybe other community members here can provide more assistance.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>