<?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>NR52832 I2C problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26472/nr52832-i2c-problem</link><description>Hi , 
 I evaluate the I2c communication of your chip nrf52832.
I have few problem. 
 
 Write fonction 
 
 Is use your Tx fonction, 
 uint8_t reg[2] = {CCS811_REG_MODE, NORMAL_MODE};
err_code = nrf_drv_twi_tx(&amp;amp;m_twi, CCS811_ADDR, reg, sizeof(reg</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Nov 2017 08:38:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26472/nr52832-i2c-problem" /><item><title>RE: NR52832 I2C problem</title><link>https://devzone.nordicsemi.com/thread/104168?ContentTypeID=1</link><pubDate>Tue, 07 Nov 2017 08:38:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f1e2f71-374b-441e-9a55-bad68668ad3c</guid><dc:creator>catelain</dc:creator><description>&lt;p&gt;Thanks its working better.
Regards
Guillaume&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NR52832 I2C problem</title><link>https://devzone.nordicsemi.com/thread/104167?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 23:17:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fccb7a83-8869-4be5-a54d-bb5174ffae02</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;In your main.c file you configure the TWI in &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.1.0/hardware_driver_twi.html?cp=4_0_0_2_16_1#hardware_driver_twi_basic"&gt;non-blocking&lt;/a&gt; mode. You need to wait for the first tx to complete and for the event handler to be called before you start the rx. In your code there is a flag called &lt;code&gt;m_xfer_done&lt;/code&gt;, that is set to true in the twi_handler. You can use this flag by setting it to false before you start each TWI transfer and then wait for it to be set to true again before you start the next transfer.&lt;/p&gt;
&lt;p&gt;It is also always good practice to check the return codes in your code with &lt;code&gt;APP_ERROR_CHECK(err_code);&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NR52832 I2C problem</title><link>https://devzone.nordicsemi.com/thread/104166?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 16:52:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6661801-368b-4c09-b7f0-f0da63b995f8</guid><dc:creator>Jason Hendrix</dc:creator><description>&lt;p&gt;Hi, I don&amp;#39;t know about your first question, but I recently developed something that sounds like your second question.  Here&amp;#39;s my code to do a write/restart/read.  regNum is a uint8_t.:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Address and sub-address IMU; no I2C stop 
ret_code_t err_code = nrf_drv_twi_tx(&amp;amp;SensorTWI, SENSOR_IMU_ADDR, &amp;amp;regNum, 1, true);

// Read nBytes from the specified offset.  This is a &amp;quot;repeated start&amp;quot; from 
// the transaction started by twi_tx */
err_code = nrf_drv_twi_rx(&amp;amp;SensorTWI, SENSOR_IMU_ADDR, buf, nBytes);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hope that helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>