<?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>Problem using lvgl in custom thread</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99377/problem-using-lvgl-in-custom-thread</link><description>I&amp;#39;m using an nRF5340DK and an Adafruit 2.8&amp;quot; TFT Touch Shield to implement a touch keyboard on the board. As you can see in the attached project, I would like to use the lvgl functions in a custom thread, but this causes the board to reboot constantly</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Jun 2023 12:18:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99377/problem-using-lvgl-in-custom-thread" /><item><title>RE: Problem using lvgl in custom thread</title><link>https://devzone.nordicsemi.com/thread/430483?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2023 12:18:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdc77fbf-4e2e-4996-ab52-3dcbdd0575ff</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Pablo,&lt;/p&gt;
&lt;p&gt;You are welcome. I am really glad that it helped.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using lvgl in custom thread</title><link>https://devzone.nordicsemi.com/thread/430415?ContentTypeID=1</link><pubDate>Mon, 12 Jun 2023 09:46:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17a9eda6-20e7-407f-ac61-815580621d13</guid><dc:creator>Pablosanserr</dc:creator><description>&lt;p&gt;Thank you, Kazi. It solved the problem.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Pablo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using lvgl in custom thread</title><link>https://devzone.nordicsemi.com/thread/424907?ContentTypeID=1</link><pubDate>Wed, 10 May 2023 13:55:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3580408e-4997-43bd-8bbb-adca19a6d5ec</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Pablo,&lt;/p&gt;
&lt;p&gt;We have reproduced the project and changing STCKSIZE define to 2048 works fine. You have stack size 1024 in your code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can have a look this documentation &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/debugging/thread-analyzer.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/debugging/thread-analyzer.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using lvgl in custom thread</title><link>https://devzone.nordicsemi.com/thread/424460?ContentTypeID=1</link><pubDate>Tue, 09 May 2023 09:48:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20048ad0-97ea-490e-ba1d-72a983467012</guid><dc:creator>Pablosanserr</dc:creator><description>&lt;p&gt;Hi Kazi,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. I didn&amp;#39;t notice the problem of having a long buffer. Now&amp;nbsp;&lt;strong&gt;buff &lt;/strong&gt;is a global variable.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, the program keeps restarting. In addition, if I comment out the following line, which assigns ta_event_cb to the textArea, the error remains. Also, I d&lt;span&gt;eleted &lt;strong&gt;buff&lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;lv_obj_add_event_cb(ta, ta_event_cb, LV_EVENT_ALL, kb);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The only way I have found to stop it from restarting is to remove the lv_task_handler function, which obviously causes the screen to display nothing.&lt;/p&gt;
&lt;p&gt;I attach the updated project, in case it&amp;#39;s useful to reproduce the problem.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/threads_5F00_sample_5F00_lvgl_5F00_v2.zip"&gt;devzone.nordicsemi.com/.../threads_5F00_sample_5F00_lvgl_5F00_v2.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;B&lt;span&gt;est regards,&lt;br /&gt;Pablo.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using lvgl in custom thread</title><link>https://devzone.nordicsemi.com/thread/424322?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 14:00:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7022ae1-e090-4eeb-a7f0-12cd1628655e</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Pablo,&lt;/p&gt;
&lt;p&gt;I have looked at your code. You have defined stack size for each thread is 1024 but in the ta_event_cb() function set buffer size 2048. So, it is most likely stack overflow issue. Large buffers like this should declare either as static or as global. Changing the line&amp;nbsp;&lt;strong&gt;char buff [2048]&amp;nbsp;&lt;/strong&gt;to&amp;nbsp;&lt;strong&gt;&lt;span dir="ltr"&gt;static char buff[2048]&lt;/span&gt;&lt;/strong&gt;&lt;span dir="ltr"&gt;&amp;nbsp;would fix the problem.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span dir="ltr"&gt;You can try that and let us know the consequence.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span dir="ltr"&gt;Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using lvgl in custom thread</title><link>https://devzone.nordicsemi.com/thread/424194?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 09:35:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b4ffcc1-0881-4d04-be83-8e76cafbf61a</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Pablo,&lt;/p&gt;
&lt;p&gt;I have been looking at your case. I will get back to you shortly.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>