<?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>how to use deferred NRF logging and twi manager</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71322/how-to-use-deferred-nrf-logging-and-twi-manager</link><description>Hi, 
 
 When using the TWI manager you normally provide a callback function that is executed once the transaction has been completed. I&amp;#39;m using the NRF logger module to display the output from the device to my computer and don&amp;#39;t know how I&amp;#39;m supposed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Feb 2021 07:13:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71322/how-to-use-deferred-nrf-logging-and-twi-manager" /><item><title>RE: how to use deferred NRF logging and twi manager</title><link>https://devzone.nordicsemi.com/thread/293675?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 07:13:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d637f5c3-97db-46d4-b6ca-6531f263ba9d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;George,&lt;/p&gt;
[quote user="George Sykes"]I&amp;#39;ve since fixed the issue by moving to the deferred logging and flushing using a low priority FreeRTOS task[/quote]
&lt;p&gt;&amp;nbsp;Since by default&amp;nbsp;configUSE_TIME_SLICING is set to 0 in our examples, the scheduling becomes priority-based and cooperative. You might have already figured that out by now. Unless you choose the lowest priority for the logger task, there is always a chance that the logger task can starve other tasks for a reasonably long time. So choosing lowest priority for logger module makes good sense.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use deferred NRF logging and twi manager</title><link>https://devzone.nordicsemi.com/thread/293637?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 20:42:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9e25d06-7903-468f-bb71-fe2ec590052d</guid><dc:creator>George Sykes</dc:creator><description>&lt;p&gt;Do you have an update on the best method to use the NRF Logger and FreeRTOS together?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use deferred NRF logging and twi manager</title><link>https://devzone.nordicsemi.com/thread/293313?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 11:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ba294e6-5639-4f38-bf54-d11df224dc67</guid><dc:creator>George Sykes</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve since fixed the issue by moving to the deferred logging and flushing using a low priority FreeRTOS task. Is this the correct way to use the NRF Logger in conjunction with FreeRTOS? If not is there a FreeRTOS logger I should use instead?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to use deferred NRF logging and twi manager</title><link>https://devzone.nordicsemi.com/thread/293286?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 10:26:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eacbeab-c9e2-46d9-9885-70c6763a1e29</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The TWI callbacks are called from TWI interrupt context and calling NRF_LOG_FLUSH in that context is not correct as it is very time-consuming.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;At which function does the NRF_BUSY error code is returned? could it be that the logger thread was running and was in the middle of the of processing the log buffer when the TWI ISR was called and left the logger module in a state where it would not accept any addition of logs to the buffer?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have not seen the scenario above myself but would be possible. Could you give me your project so that i can test to see if that is the case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>