<?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 resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13185/how-to-resolve-nrf_error_internal-error-in-twi-communication</link><description>Hi, 
 I&amp;#39;m using PCA10040 board, There i connected the fuel gauge IC via TWI communication.
There pca10040 will acts as master and fuel gauge IC will acts as slave. 
 While Read and write we are getting &amp;quot;NRF_ERROR_INTERNAL&amp;quot; error and hangs there itself</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Apr 2016 08:29:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13185/how-to-resolve-nrf_error_internal-error-in-twi-communication" /><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50273?ContentTypeID=1</link><pubDate>Wed, 27 Apr 2016 08:29:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78e27388-e129-4086-b44c-25511aa11a0d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Naveen,&lt;/p&gt;
&lt;p&gt;Glad that you found the issue. Yeah, I2C on the nRF51 doesn&amp;#39;t really support multiple master mode which require arbitration logic and busy detection.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50272?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2016 13:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36de1657-76ac-43df-8a06-1acdc13b82c8</guid><dc:creator>naveen</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;Thanks for your valuable responses,&lt;/p&gt;
&lt;p&gt;Now read and write is working fine without any error.&lt;/p&gt;
&lt;p&gt;In previous setup slave is connected to one more master, now we connected that slave to nordic master alone.&lt;/p&gt;
&lt;p&gt;Thanks regards,
-Naveen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50271?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 15:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ced45297-3dda-426f-9825-37cf8145455c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;It&amp;#39;s strange, Naveen. What is the supply voltage ?&lt;/p&gt;
&lt;p&gt;The SCL, SDA when not in transaction should retain the voltage level of at least 0.7VDD.
A photo of your setup could help a little bit.&lt;/p&gt;
&lt;p&gt;I suspect there could be something wrong with the sensor. If you don&amp;#39;t connect the pin to the sensor, could you try to monitor the pin ? (of course it can only transmit the address because of no ACK, but we can still can see if it can transmit properly).&lt;/p&gt;
&lt;p&gt;In your &amp;quot;OTHER_MASTER&amp;quot; trace, I can also see that the pins are pulled low, this is not normal. When the pins are connected to pullup resistors, they should be high between transaction.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50270?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 14:34:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cef109e-a7f2-4eb2-ae49-299468abdfc2</guid><dc:creator>naveen</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;We didn&amp;#39;t remove internel pull up. If we use only internel pull up, the maximum SCL &amp;amp; SDA value is 1.7V &amp;amp; 1.9V respectively.Are we supposed to receive the above mentioned voltage values for the SCL and SDA pins or it should be different ? Moreover we didnt see any output with only internal pull up in DSO so we decided to add an external pull up(10K).&lt;/p&gt;
&lt;p&gt;For each write i&amp;#39;m sending 5 bytes, i didn&amp;#39;t use SUSPEND task.
Even i&amp;#39;m not sure why there is gap between each bytes transfer.
when transaction is finished, SCL &amp;amp; SDA pins are not going high (In twi_master_with_twis_slave example after transaction SCL &amp;amp; SDA pins goes high).&lt;/p&gt;
&lt;p&gt;Note :
SCL connected to P0.03
SDA connected to P0.04&lt;/p&gt;
&lt;p&gt;Thanks Regards,
-Naveen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50269?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 11:50:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24c4b143-5ecd-4663-94cd-71fe575ae7e9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I assume you used the external pullup resistors, have you removed the internal pull up when configuring TWI ? By default we use internal pullup for the TWI pins with the twi driver.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not very clear for me, from your trace, there is no STOP condition but there are gaps between each byte, does that mean you used SUSPEND task? When you finish a transaction would the pins go high up ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50268?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 09:49:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c6caf1e-9174-44f7-80f2-4ad7e57b3772</guid><dc:creator>naveen</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;Thanks for your responses,&lt;/p&gt;
&lt;p&gt;Transaction is not yet completed that’s why its low, whatever i sent above (probed pics) that’s for single write but i&amp;#39;m doing multiple writes so its showing low state.&lt;/p&gt;
&lt;p&gt;we are using fuel gauge sensor, Please find the data-sheet and circuit diagram (Figure-1) in below link.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.onsemi.com/pub_link/Collateral/LC709203F-D.PDF"&gt;www.onsemi.com/.../LC709203F-D.PDF&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;we verified the twi_master_with_twis_slave example, its fine.&lt;/p&gt;
&lt;p&gt;Thanks Regards,
-Naveen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50267?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 08:42:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d830042f-28d8-49f1-9322-9bf9a4f79c1b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Naveen,&lt;/p&gt;
&lt;p&gt;If the TWI slave NACK, then on the master we will receive NRF_TWI_EVENT_ERROR and in the application it will be resulted as NRF_ERROR_INTERNAL.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a little bit strange in your probe trace that the SDA and SCL were held low when finished transaction, it should be high as the pins are pulled up. I assume that the slave held them low.
Could you send the schematic ? Also please update the datasheet of the sensor you used.&lt;/p&gt;
&lt;p&gt;Have you tried to test with the twi_master_with_twis_slave example, just to verify the normal behaviour of the nRF52 and TWIS+TWIM ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50266?ContentTypeID=1</link><pubDate>Mon, 18 Apr 2016 15:27:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23dfc8bc-ff73-47e7-983f-e2138a94088d</guid><dc:creator>naveen</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;The &amp;quot;twi_tx_start_transfer&amp;quot; function is throwing &amp;quot;NRF_ERROR_INTERNAL&amp;quot; error.&lt;/p&gt;
&lt;p&gt;I enabled  debug prints in &amp;quot;twi_tx_start_transfer&amp;quot; and &amp;quot;twi_transfer&amp;quot; functions.&lt;/p&gt;
&lt;p&gt;In success case (with delay for each read and write) &amp;quot;twi_transfer&amp;quot; function returned false condition after writing all bytes (NRF_TWI_EVENT_STOPPED is  stopped).&lt;/p&gt;
&lt;p&gt;In Failure case (without delay) &amp;quot;twi_transfer&amp;quot; function returned true condition continuously, so its hangs.&lt;/p&gt;
&lt;p&gt;May i know how to resolve this issue ?&lt;/p&gt;
&lt;p&gt;Thanks regards,
-Naveen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resolve NRF_ERROR_INTERNAL error in TWI communication?</title><link>https://devzone.nordicsemi.com/thread/50265?ContentTypeID=1</link><pubDate>Thu, 14 Apr 2016 12:08:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84ed3a97-d7cb-4d5e-8539-560840552f04</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Naveen,&lt;/p&gt;
&lt;p&gt;Could you track down and find which function threw the &amp;quot;NRF_ERROR_INTERNAL&amp;quot; error ?
Could you try to use the TWI directly and skip the driver, just to send or receive a few bytes.&lt;/p&gt;
&lt;p&gt;If you send 2-3 bytes at a time in one packet what the signal would be?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>