<?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>Unable to allocate a Pipe/Buffer in Driver internal Thread (ncs 2.2.0)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96279/unable-to-allocate-a-pipe-buffer-in-driver-internal-thread-ncs-2-2-0</link><description>Hello, I am currently developing a driver for the ADS1293 from Texas Instruments. As there is no suitable API for a &amp;quot;EKG AD-Converter&amp;quot; i am not using any overlay API like the Sensor Api. I am referencing the ADXL372 Interrupt Driven Driver as a Base for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Feb 2023 11:49:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96279/unable-to-allocate-a-pipe-buffer-in-driver-internal-thread-ncs-2-2-0" /><item><title>RE: Unable to allocate a Pipe/Buffer in Driver internal Thread (ncs 2.2.0)</title><link>https://devzone.nordicsemi.com/thread/408256?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2023 11:49:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:178b4c07-0ca7-4a4e-8972-c417a745ecde</guid><dc:creator>Kriki</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;I have tried giving the Thread Stack more Resources but that didn&amp;#39;t help.&lt;br /&gt;&lt;br /&gt;But i have just tried adding a Buffer like you said and that worked. I dont know exactly why it works now but all i changed was:&lt;/p&gt;
&lt;p&gt;1. Use the unsigned char __aligned(4) my_ring_buffer[100]; you suggested&lt;br /&gt;2. I Specifically didnt use the uin8_t Type, though this should not have an Effect as its the same as unsigned char.&lt;br /&gt;&lt;br /&gt;I can now also allocate a uint8_t Buffer.&lt;br /&gt;&lt;br /&gt;Thank you for your fast Reply and the Help.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Nick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to allocate a Pipe/Buffer in Driver internal Thread (ncs 2.2.0)</title><link>https://devzone.nordicsemi.com/thread/408228?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2023 10:11:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8699fe4a-560d-4c92-bbe4-080cffc49191</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]Any Help or Insight on how Kernel Threads and Stacks work in Zephyr would be greatly appreciated&lt;br /&gt;[/quote]
&lt;p&gt;For general Zephyr questions I recommend that you reach out to Zephyr&amp;#39;s support. I would start &lt;a href="https://www.zephyrproject.org/"&gt;here&lt;/a&gt;. (link to their discord support channel)&lt;/p&gt;
&lt;p&gt;Have you tried giving your stack a bit more resources?&lt;/p&gt;
&lt;p&gt;Alternatively, you can try to add a buffer to your struct and use that one for k_pipe_init() :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;unsigned char __aligned(4) my_ring_buffer[100];&lt;/pre&gt;&lt;br /&gt;Please see:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/kernel/services/data_passing/pipes.html#implementation"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/kernel/services/data_passing/pipes.html#implementation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>