<?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>sprintf increases by 2-3uA per parameter as the parameters increase.  huge current.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74862/sprintf-increases-by-2-3ua-per-parameter-as-the-parameters-increase-huge-current</link><description>I encountered sprintf with the increase of parameters, the power consumption will increase by 2-3uA for each parameter. When I use the sprintf function, the power consumption is related to the number of parameters. My data sampling frequence is 100Hz</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 May 2021 13:19:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74862/sprintf-increases-by-2-3ua-per-parameter-as-the-parameters-increase-huge-current" /><item><title>RE: sprintf increases by 2-3uA per parameter as the parameters increase.  huge current.</title><link>https://devzone.nordicsemi.com/thread/308758?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 13:19:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d0a6235-378a-4fcc-97bf-1592c7dbd0ad</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;No, but the NRF core consumes about 5-10mA during execution.&lt;/p&gt;
&lt;p&gt;Your 2-3&amp;micro;A increased average (my guess here) might actually be the additional CPU time required to generate and/or handle the string result.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sprintf increases by 2-3uA per parameter as the parameters increase.  huge current.</title><link>https://devzone.nordicsemi.com/thread/308721?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 11:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf2a3903-028e-401b-894e-661a63d16b27</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;My variable argument is interger.The current is also 2-3uA.&lt;/p&gt;
&lt;p&gt;Is there other situation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sprintf increases by 2-3uA per parameter as the parameters increase.  huge current.</title><link>https://devzone.nordicsemi.com/thread/308698?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 10:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afc5a63f-cde2-4184-9d4f-e05adde080bd</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Are those parameters of &lt;strong&gt;float &lt;/strong&gt;type? There is an exception for float values in variable argument functions (like all printf variants): Floats are automatically converted to doube type. This conversion (and the corresponding calculations inside sprintf) are a little more expensive than to simply copy a value onto the stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>