<?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 and 11-bit I2C slave address devices</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25499/twi-and-11-bit-i2c-slave-address-devices</link><description>Hi. We are attempting to use the Infineon XMC1202 LED shield with our NRF52 device. The XMC1202 has an I2C address of 0x15E, instead of the traditional 7 bit address. We have been using the simple non-blocking TWI implementation to date. We can fake out</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Sep 2017 20:47:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25499/twi-and-11-bit-i2c-slave-address-devices" /><item><title>RE: TWI and 11-bit I2C slave address devices</title><link>https://devzone.nordicsemi.com/thread/100519?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 20:47:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:245648e1-c3e5-4986-88eb-5d252f5ac138</guid><dc:creator>tanekaf</dc:creator><description>&lt;p&gt;Please disregard.  Looks like we needed to enable TWI0_USE_EASY_DMA in our config file.  That fixed the issue.  Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI and 11-bit I2C slave address devices</title><link>https://devzone.nordicsemi.com/thread/100518?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 20:31:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d9f5d05-cd8c-4014-91c3-56d11b4bf5bf</guid><dc:creator>tanekaf</dc:creator><description>&lt;p&gt;Hi Jorgen.  Thanks for the reply.  I used the twi_scanner example to implement the TXRX suggestion.  Code snippet below.
nrf_drv_twi_xfer_desc_t xfer;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tx_buf[0] = lowerAddress;
tx_buf[1] = Command;  
       
xfer.type = NRF_DRV_TWI_XFER_TXRX;
xfer.address = upperAddress;
xfer.primary_length   = sizeof(tx_buf);
xfer.secondary_length = sizeof(rx);
xfer.p_primary_buf    = tx_buf;
xfer.p_secondary_buf  = rx;
err_code = nrf_drv_twi_xfer(twi_instance, &amp;amp;xfer, NRF_DRV_TWI_FLAG_NO_XFER_EVT_HANDLER);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This code works.  I can read from the XMC1202.  However, once this code is integrated into our platform that uses a soft device, the read fails.  Specifically, the nrf_drv_twi_xfer() returns NRF_SUCCESS, but the rx_buffer is not populated.  To test this theory, we added TWI to the ble_app_blinky example in ble_peripheral.  Again, the read returns success, but the rx_buffer is not populated.  Is there an issue with using this function with a softdevice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI and 11-bit I2C slave address devices</title><link>https://devzone.nordicsemi.com/thread/100517?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2017 13:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e213f18-9d93-4dcb-bf37-9c55dca34cb8</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From the user manual of the shield I can see the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The RGB LED Shield’s I2C address is a
10-bit address and is pre-configured
to be 0x15E. To address it, the master
will send 2 bytes of address:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first 7 bits of the first byte are 11110XX, of which XX are the two
most significant bytes of the 10-bit
address. The 8th bit determines the
read or write direction of the data
transfer.&lt;/li&gt;
&lt;li&gt;The second byte is the lower 8-bits of the address.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://www.i2c-bus.org/addressing/10-bit-addressing/"&gt;This page&lt;/a&gt; describes the procedure for interfacing 10-bit addressable devices. If you setup a RXTX transfer where you write the second byte of the address before switching to TX mode, it should work. This is also described in &lt;a href="https://www.nxp.com/docs/en/user-guide/UM10204.pdf#page=15"&gt;section 3.1.11 in the I2C-bus specification and user manual&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>