<?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>Timer issue with getting external flash binding</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91197/timer-issue-with-getting-external-flash-binding</link><description>Hi, 
 
 
 I am using nRF52833 &amp;amp; nCS for an application development, 
 I am facing a curious issue where, if i enable printk in nCS build, I am getting SUCCESS on calling device_get_binding() to an external flash device. 
 
 While if i disable printk in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Sep 2022 10:57:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91197/timer-issue-with-getting-external-flash-binding" /><item><title>RE: Timer issue with getting external flash binding</title><link>https://devzone.nordicsemi.com/thread/384759?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 10:57:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1845bbf-22e0-4d8a-b044-f17cc8e3dc9c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Sorry, but what exactly did you do to get it working? Did you enable printing again or remove the printk statements in the&amp;nbsp;&lt;strong&gt;device_get_binding()&amp;nbsp;&lt;/strong&gt;function? As I&amp;#39;ve only seen parts of your code the only thing I can think of is that the&lt;strong&gt; printk()&lt;/strong&gt; statement is returning an error because it&amp;#39;s not recognized/included in your project when you have disabled PrintK.&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><item><title>RE: Timer issue with getting external flash binding</title><link>https://devzone.nordicsemi.com/thread/384567?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 12:00:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25365fb2-792a-4c5b-b9d0-74e296433465</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Yeah seems this is the case:&amp;nbsp;&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/91197/timer-issue-with-getting-external-flash-binding/382988"]If you&amp;#39;re calling multiple printk functions in your application after disabling the printk that is likely to cause issues. [/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Not altogether.&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/91197/timer-issue-with-getting-external-flash-binding/382988"]Is there a reason you have printk() function(s) if your plan is to disable printk altogether?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Anyways, Now it is working, I am able to get device binding for serial flash.&lt;/p&gt;
&lt;p&gt;Help me understand how disabling print posed problems in getting&amp;nbsp;&lt;span&gt;device binding for serial flash..?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Ubaid&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer issue with getting external flash binding</title><link>https://devzone.nordicsemi.com/thread/382988?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2022 06:17:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c6689fe-1df1-4b2a-b5ea-767b9f834c6b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re calling multiple printk functions in your application after disabling the printk that is likely to cause issues. Is there a reason you have printk() function(s) if your plan is to disable printk altogether?&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><item><title>RE: Timer issue with getting external flash binding</title><link>https://devzone.nordicsemi.com/thread/382820?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 07:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f928847c-eaf6-407f-a0ab-9b348f7e3723</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt;,&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/91197/timer-issue-with-getting-external-flash-binding/382811"]And what do you mean by[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What I mean is, as in printk definition below:&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1661166054190v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;I added a return statement on line number 1 in the above definition.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So the revised definition of printk applies everywhere.&lt;br /&gt;&lt;br /&gt;Now with this revised definition,&amp;nbsp;&lt;strong&gt;the device_get_binding() returns 19.&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer issue with getting external flash binding</title><link>https://devzone.nordicsemi.com/thread/382811?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2022 06:37:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63fd5f6b-29c7-4a04-ab70-79487bda6a2e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What version of NCS are you using here? And what do you mean by &amp;quot;&lt;strong&gt;if I am removing return statement from printk(), the device_get_binding() returns 0&lt;/strong&gt;&amp;quot;? Is the &lt;strong&gt;device_get_binding&amp;nbsp;&lt;/strong&gt;successful if you&amp;#39;re not adding these printk() functions?&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><item><title>RE: Timer issue with getting external flash binding</title><link>https://devzone.nordicsemi.com/thread/382644?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 11:01:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad3d60b6-41ae-4294-a820-9e7ec5984d96</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/simonr"&gt;Simonr&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am using&amp;nbsp;&lt;strong&gt;device_get_binding()&amp;nbsp;&lt;/strong&gt;&lt;span&gt;function, in a C++ application file as:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1661165909261v1.png" alt=" " /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here I &lt;strong&gt;device_get_binding() is returning 19, if in printk() definition I am calling return; as soon as execution enters printk().&lt;br /&gt;&lt;br /&gt;If I am removing return statement from printk(), the&amp;nbsp;device_get_binding() returns 0.&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1661166054190v2.png" alt=" " /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer issue with getting external flash binding</title><link>https://devzone.nordicsemi.com/thread/382641?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 10:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31b2b575-adb5-4c03-80c6-a252a4fc0035</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;In what file and code line does your application call&amp;nbsp;&lt;strong&gt;&lt;/strong&gt;the&amp;nbsp;&lt;strong&gt;device_get_binding()&amp;nbsp;&lt;/strong&gt;function?&amp;nbsp;&lt;span&gt;This function iterates through the devices on the system. If a device with the given&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;name&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;field is found, and that device initialized successfully at boot time, this function returns a pointer to the device.&lt;/span&gt;&amp;nbsp;To debug, it&amp;#39;s best to set a breakpoint on your device driver&amp;#39;s init function. Perhaps there is something in your application requiring printk. Is it the same call both if you enable and disable printk? Error 19 points to there being &amp;quot;no such device&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What nRF Connect SDK version are you using, and is your project based on one of our samples?&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>