<?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>SCL Stuck Low with NRF52810 SDK 15.0 on Custom Board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34208/scl-stuck-low-with-nrf52810-sdk-15-0-on-custom-board</link><description>I&amp;#39;ve got a custom board using the NRF52810 with SDK v15.0.0. 
 I am using the TWIM driver (nrfx_twim.c master mode) to drive an LCD driver IC, a capacitive touch sensor IC, and a fuel gauge IC. After connection there is no activity on I2C for the LED</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Jun 2018 09:44:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34208/scl-stuck-low-with-nrf52810-sdk-15-0-on-custom-board" /><item><title>RE: SCL Stuck Low with NRF52810 SDK 15.0 on Custom Board</title><link>https://devzone.nordicsemi.com/thread/134881?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 09:44:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6f7fcf5-9943-435a-bfce-54add8ab60b4</guid><dc:creator>Keton</dc:creator><description>&lt;p&gt;I have similar issue:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/30878/app_twi-gets-stuck-in-while-internal_transaction_in_progress"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/30878/app_twi-gets-stuck-in-while-internal_transaction_in_progress&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have tried above solution and I&amp;#39;m still getting&amp;nbsp;it to hang with my repro code from the thread.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve also observed random hangs in scenario where there&amp;#39;s a lot of long TWI TX operations (complete overwrite of Adesto RM24C512C eeprom).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT: I&amp;#39;ve dug some deeper in my repro and It seems that in certain circumstances TWIM irq handler stops being called despite pending transfers so no events are propagated to the app_twi and the application code.&lt;/p&gt;
&lt;p&gt;Also in my case value of AMMOUNT register is larger than MAXCNT which is weird.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SCL Stuck Low with NRF52810 SDK 15.0 on Custom Board</title><link>https://devzone.nordicsemi.com/thread/134068?ContentTypeID=1</link><pubDate>Wed, 30 May 2018 14:33:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b274ba6-b823-4c60-b7ae-532daad31eb7</guid><dc:creator>Radoslaw Koppel</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I cannot recreate the problem, but guessing by the registers state you have provided we can tell that the twim_irq_handler (line 493 in nrfx_twim.c) hited the &amp;quot;else&amp;quot; conditional in line 562. The way this condition is added here seems not to be 100% safe. For quick test could you replace it by:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_SUSPENDED))&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And check if the problem persist?&lt;/p&gt;
&lt;p&gt;To clarify, there should be&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    if (nrf_twim_event_check(p_twim, NRF_TWIM_EVENT_SUSPENDED))
    {
        nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED);
        NRFX_LOG_DEBUG(&amp;quot;TWIM: Event: %s.&amp;quot;, EVT_TO_STR_TWIM(NRF_TWIM_EVENT_SUSPENDED));
        if (p_cb-&amp;gt;xfer_desc.type == NRFX_TWIM_XFER_TX)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Instead of&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    else
    {
        nrf_twim_event_clear(p_twim, NRF_TWIM_EVENT_SUSPENDED);
        NRFX_LOG_DEBUG(&amp;quot;TWIM: Event: %s.&amp;quot;, EVT_TO_STR_TWIM(NRF_TWIM_EVENT_SUSPENDED));
        if (p_cb-&amp;gt;xfer_desc.type == NRFX_TWIM_XFER_TX)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sorry for providing not tested solution, but as you did not provide any code to check the problem and we cannot recreate it this was the only one I can think right now. It would really speed thing up if you could test it in your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SCL Stuck Low with NRF52810 SDK 15.0 on Custom Board</title><link>https://devzone.nordicsemi.com/thread/131657?ContentTypeID=1</link><pubDate>Fri, 11 May 2018 04:12:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42e4d690-da8a-4bc9-bc08-2d5a46e3862e</guid><dc:creator>F Iannce</dc:creator><description>&lt;p&gt;Thanks for the code--I&amp;#39;ll definitely take a look&amp;nbsp;a closer look at it in&amp;nbsp;the near future to see if it fixes the issue.&amp;nbsp; I wish that I had the time to look into this more, but I have to get some other features working before&amp;nbsp;our software team starts to complain about not having hardware to develop on and/or our delaying production schedule.&lt;/p&gt;
&lt;p&gt;For now, I added a check in my EVT handler for the stuck condition and am performing an I2C reset, and then resending the last command.&amp;nbsp; This is a clunky &amp;quot;solution&amp;quot;, but it is working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SCL Stuck Low with NRF52810 SDK 15.0 on Custom Board</title><link>https://devzone.nordicsemi.com/thread/131646?ContentTypeID=1</link><pubDate>Thu, 10 May 2018 19:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0258bcc-11fa-4c8c-8b0e-7b1f0316fd9b</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Not sure what caused it but you may want to have a look at this&amp;nbsp;alternative &lt;a href="https://github.com/I-SYST/EHAL/blob/master/ARM/Nordic/nRF52/EHAL/src/i2c_nrf52.cpp"&gt;i2c driver for the nRF52&lt;/a&gt;. &amp;nbsp;It is probably simpler to understand.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SCL Stuck Low with NRF52810 SDK 15.0 on Custom Board</title><link>https://devzone.nordicsemi.com/thread/131644?ContentTypeID=1</link><pubDate>Thu, 10 May 2018 19:16:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:befb4627-6cb2-4469-9901-3ce6a3a1d05b</guid><dc:creator>F Iannce</dc:creator><description>&lt;p&gt;I put a breakpoint in my TWIM handler function.&amp;nbsp; When the SCL line is getting stuck low, I am getting an NRFX_TWIM_EVT_DONE event, but the AMOUNT != MAXCNT.&amp;nbsp; I reduced the amount of data I am transferring so that MAXCNT is now only 0xAF.&lt;/p&gt;
&lt;p&gt;I will be writing some code to reset the I2C when this error occurs (as a workaround), but I really would like a better understanding of the root cause.&amp;nbsp; Why would I be getting an NRFX_TWIM_EVT_DONE event when I have received all of the data I requested in nrfx_twim_xfer()?&amp;nbsp; It works perfectly fine sometimes for 2-300 calls, but then suddenly one call returns done without completing the request...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SCL Stuck Low with NRF52810 SDK 15.0 on Custom Board</title><link>https://devzone.nordicsemi.com/thread/131640?ContentTypeID=1</link><pubDate>Thu, 10 May 2018 18:10:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aeb6e17a-ecfd-4503-89b1-a42f38e29a23</guid><dc:creator>F Iannce</dc:creator><description>&lt;p&gt;I thought for a second that this did the trick, but it appears that it was just a slightly longer delay before the TWIM driver crashed.&amp;nbsp; I limited my read to 200 bytes, and it is still getting stuck.&amp;nbsp; I&amp;#39;m going to see if I can find out any more clues.&amp;nbsp; Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SCL Stuck Low with NRF52810 SDK 15.0 on Custom Board</title><link>https://devzone.nordicsemi.com/thread/131632?ContentTypeID=1</link><pubDate>Thu, 10 May 2018 14:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52850b1e-ce66-43f0-b830-a6ff7cbe04b8</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;I think the MAXCNT is limited to 0xFF only. &amp;nbsp;Although the datasheet showed a 32bits value. &amp;nbsp;The AMOUNT is limited to 8 bits. &amp;nbsp;The behaviour seems to be related. &amp;nbsp;try limit to 0xFF max per transfer to see what happens.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>