<?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>I2C Write issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27383/i2c-write-issue</link><description>I am facing some issue while writing to i2c. On first i2c write , device is working but after that when i tries to write anything, code is stucking in loop. 
 void sensor_sleep_mode(void)
{
 ret_code_t err_code;
 uint8_t buff[2]={0x06, 0x01};

</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Nov 2017 15:34:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27383/i2c-write-issue" /><item><title>RE: I2C Write issue</title><link>https://devzone.nordicsemi.com/thread/108141?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 15:34:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc7ebac7-6deb-4979-8f4b-25b972c92703</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The error code &lt;code&gt;NRF_DRV_TWI_EVT_ADDRESS_NACK&lt;/code&gt; means that the device does not send an ACK on the address byte. Most likely the device is not ready for a new address, as you have set the &lt;code&gt;no_stop&lt;/code&gt; parameter of &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/group__nrf__drv__twi.html#ga2c5ea8408254dfa9cbff55dbee171a95"&gt;&lt;code&gt;nrf_drv_twi_tx()&lt;/code&gt;&lt;/a&gt; to true. Most devices expect a stop condition on the end of a TWI transfer, before it is ready for the next transfer. Please check the datasheet of your device.&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>