<?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>TWI/S110 &amp;quot;issue&amp;quot; vs nRF51822 hardware revision</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34439/twi-s110-issue-vs-nrf51822-hardware-revision</link><description>Hi, 
 1. 
 I feel really stupid as I cannot make any sense of any of the information found in Product Specification (v3.3), or the online Compatibility Table or past forum messages (most with dead links anyway) ... things like &amp;quot;QFAC Ax0&amp;quot; (x in [0..9]</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 May 2018 08:24:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34439/twi-s110-issue-vs-nrf51822-hardware-revision" /><item><title>RE: TWI/S110 "issue" vs nRF51822 hardware revision</title><link>https://devzone.nordicsemi.com/thread/133158?ContentTypeID=1</link><pubDate>Thu, 24 May 2018 08:24:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:832f43a4-b44f-4655-ac75-b03eccffbf58</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The fact that you see this also if you do the TWI transaction from&amp;nbsp;app context seems strange. The TWI handling should not get in the way of the SoftDevice in that case.&lt;/p&gt;
&lt;p&gt;The only thing I can think of is if you use a high priority for the TWI interrupt and a lot of time is spent in TWI interrupt/event handlers, but the twi_hw_master.c file that is included in SDK 6.1.0 is not interrupt driven. Are you using a different driver that is interrupt driven? If so, what is the priority of your TWI interrupt?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/S110 "issue" vs nRF51822 hardware revision</title><link>https://devzone.nordicsemi.com/thread/132947?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 09:53:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5734a114-5b05-40c4-ac50-9ee9ed1f1a44</guid><dc:creator>jy</dc:creator><description>&lt;p&gt;- when receiving a BLE packet, ble_nus take over and pass to my incoming handler: it receives a command to set clock (6 bytes: 2 header + 4 for clock info): there I&amp;nbsp;foward that value to&amp;nbsp;the rtc(/i2c/twi) to set that time; once this is done; the incoming handler will give a positive/negative response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- when using the loop-variant (sending 8 i2c/twi packet) I get a reason= 0x08 (connection_timeout) on disconnect;&lt;/p&gt;
&lt;p&gt;- when using the move-blob-at-once, things work properly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/S110 "issue" vs nRF51822 hardware revision</title><link>https://devzone.nordicsemi.com/thread/132939?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 09:17:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b13c039-da22-4afd-a006-04936244d813</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Indeed it is. Apparently I did not read much of the code listing…&amp;nbsp;I do not see any reason why this should cause a BLE disconnect. Can you say more about what happens at that time? Any event from the SoftDevice? What is the disconnect &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/structble__gap__evt__disconnected__t.html?cp=3_7_2_1_1_2_1_4_19_0#a11211be968ad2898f3dd9b4d31b5ce22"&gt;reason&lt;/a&gt; when you get the&amp;nbsp;BLE_GAP_EVT_DISCONNECTED event?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/S110 "issue" vs nRF51822 hardware revision</title><link>https://devzone.nordicsemi.com/thread/132805?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 14:26:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3738e988-ad57-4a60-a3c9-457a03f829c2</guid><dc:creator>jy</dc:creator><description>&lt;p&gt;Hi Einar. i2c_data_write implementation is in previous reply (see code snippet above). In terms of context, the behavior is identical when running from&amp;nbsp;SD event handler or in app context.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/S110 "issue" vs nRF51822 hardware revision</title><link>https://devzone.nordicsemi.com/thread/132780?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 13:04:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:671e3760-f388-4587-9eec-c29d86466b27</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is this code running in main context or interrupt context?&amp;nbsp;If interrupt, which priority? How have you implemented&amp;nbsp;i2c_data_write()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/S110 "issue" vs nRF51822 hardware revision</title><link>https://devzone.nordicsemi.com/thread/132533?ContentTypeID=1</link><pubDate>Fri, 18 May 2018 17:31:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6041829c-ab9b-4136-8836-009d25d41de8</guid><dc:creator>jy</dc:creator><description>&lt;p&gt;more insights: it seems to come from when sending large chunks (here 8 bytes) over TWI while having an ongoing BT connection;&lt;/p&gt;
&lt;p&gt;the chunks are send to an i2c RTC as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// blob is 8 bytes wide

// DOES NOT WORK if there is an ongoing BT connection
i2c_data_write(RV4162_I2C_ADDRESS, RV4162_REG_DATE_SSEC, blob, sizeof(blob));

// WORKS:
uint8_t idx;
for (idx=0; idx&amp;lt;sizeof(blob); idx++)
{
    i2c_data_write(RV4162_I2C_ADDRESS, RV4162_REG_DATE_SSEC + idx, &amp;amp;blob[idx], 1);
}

// with:
bool i2c_data_write(uint8_t address, uint8_t reg, uint8_t *data, uint8_t len)
{
    ASSERT(m_i2c_init);
    ASSERT(len &amp;gt;= 1);
    uint8_t stream[1 + len];
    stream[0] = reg;
    memcpy(&amp;amp;stream[1], data, len);
    return twi_master_transfer(address, stream, 1 + len, TWI_ISSUE_STOP);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI/S110 "issue" vs nRF51822 hardware revision</title><link>https://devzone.nordicsemi.com/thread/132530?ContentTypeID=1</link><pubDate>Fri, 18 May 2018 16:20:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b16f978-d9a3-4c61-ad05-e933a60d05bb</guid><dc:creator>jy</dc:creator><description>&lt;p&gt;ok; got confirmation 51822 QFAC chips are rev.3; so the PPI vs TWI concurrency should not be any issue .... yet I get a&amp;nbsp;BLE_GAP_EVT_DISCONNECTED whenever I use TWI. Any clues on why that is?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>