<?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>Thingy 52 twi_manager current_int_priority_get quandary.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30598/thingy-52-twi_manager-current_int_priority_get-quandary</link><description>On the included Thing52 example, the LED fires m_ioext_osc_status_change from an interrupt. Eventually, when it comes to requesting use of the TWI this comparison happens in twi_manager.c: 
 uint8_t current_context = current_int_priority_get(); 
 if </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 May 2018 18:56:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30598/thingy-52-twi_manager-current_int_priority_get-quandary" /><item><title>RE: Thingy 52 twi_manager current_int_priority_get quandary.</title><link>https://devzone.nordicsemi.com/thread/130882?ContentTypeID=1</link><pubDate>Thu, 03 May 2018 18:56:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:129c5ce3-91ee-47b8-95e6-54d61ad4cbaf</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Turns out that when I was porting the Thingy to the latest SDK (at the time) I had failed to copy over the config exactly. In this case&amp;nbsp;APP_TIMER_CONFIG_USE_SCHEDULER was set to 0 where as it should have been set to 1. When the timer interrupts were firing they were firing in a higher interrupt context thus causing my issues above.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy 52 twi_manager current_int_priority_get quandary.</title><link>https://devzone.nordicsemi.com/thread/124229?ContentTypeID=1</link><pubDate>Tue, 13 Mar 2018 17:44:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e52bf974-87b2-48c1-8f8f-a878d385f008</guid><dc:creator>jublin</dc:creator><description>&lt;p&gt;s_context_limit may not be what you expect. Look at what is calling twi_manager_init.&lt;/p&gt;
&lt;p&gt;In the thingy app:&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;err_code &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;twi_manager_init&lt;/span&gt;&lt;span&gt;(APP_IRQ_PRIORITY_THREAD)&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
uint32_t twi_manager_init(app_irq_priority_t context_limit)
{
    s_context_limit = context_limit;
    s_collisions    = 0;

    return NRF_SUCCESS;
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;So APP_IRQ_PRIORITY_HIGHEST means nothing.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Prio_thread would be either 4 or 15, from the app_util_platform.h&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I just spent two hours tracking this crap down for a project of my own that suddenly stopped working.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy 52 twi_manager current_int_priority_get quandary.</title><link>https://devzone.nordicsemi.com/thread/121131?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 21:15:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fa7c051-5e19-4b19-8c6b-9e020fef3b44</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hey Ketil,&lt;/p&gt;
&lt;p&gt;Hope you are well and thanks for the response. I ended up changing the default 15 down to 7 and it seems to have fixed what I was seeing without any adverse effects since I wrote this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy 52 twi_manager current_int_priority_get quandary.</title><link>https://devzone.nordicsemi.com/thread/121130?ContentTypeID=1</link><pubDate>Mon, 12 Feb 2018 10:30:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a3da1fc-4a07-4cc3-8e74-b302688ba688</guid><dc:creator>ketil</dc:creator><description>&lt;p&gt;Hi Jared,&lt;/p&gt;
&lt;p&gt;Which Thingy:52 example are you referring to? If this is related to the Thingy:52 firmware i recommend you file an issue&amp;nbsp;in the &lt;a href="https://github.com/NordicSemiconductor/Nordic-Thingy52-FW"&gt;Thingy:52 GitHub repository&lt;/a&gt; as the devs will answer you directly.&lt;/p&gt;
&lt;p&gt;Ketil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy 52 twi_manager current_int_priority_get quandary.</title><link>https://devzone.nordicsemi.com/thread/121132?ContentTypeID=1</link><pubDate>Thu, 08 Feb 2018 20:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49785375-9acc-4d52-9145-3f181f1dc950</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;One weirdness is&amp;nbsp;&lt;span&gt;APP_IRQ_PRIORITY_HIGHEST should be 2 not 15 according to &lt;strong&gt;app_util_platform.h&lt;/strong&gt;. Basically this function is preventing any calls from SD&amp;nbsp;callbacks?&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>