<?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>Always getting NCK.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21642/always-getting-nck</link><description>Hi, 
 I&amp;#39;m trying to control LSM6DS3 by TWI communication.
Slave address of the chip is 0xD4 when SDO/SA0 pin is low. 
 I&amp;#39;m using SDK13.0.0. 
 My code is like below. 
 ret_code_t err_code;

uint8_t flag=0;
uint8_t *LSM_DATA;

err_code = twi_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 May 2017 01:16:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21642/always-getting-nck" /><item><title>RE: Always getting NCK.</title><link>https://devzone.nordicsemi.com/thread/84955?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 01:16:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a466d04f-5cd2-4296-9dfa-5de725c9ce7c</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;I solved the problem.
It was just cold solder joint.. I didn&amp;#39;t consider about soldering because I did SMT.
I&amp;#39;m sorry and thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always getting NCK.</title><link>https://devzone.nordicsemi.com/thread/84954?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 09:51:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98cd08c4-5f70-4ac9-a1df-20d35592399b</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Your oscilloscope output looks correct. I can see clean start bit and the device address 0x6a (110 10101) and the write bit but a Nack from slave. If the slave is able to give NACK on the 9th byte then the proper stop bit. You said that the sensor is Acking with other masters. Only thing we can do is to put the oscilloscope output side by side and where the timing issue is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always getting NCK.</title><link>https://devzone.nordicsemi.com/thread/84957?ContentTypeID=1</link><pubDate>Thu, 27 Apr 2017 08:43:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95b2d6b5-3b5e-42bc-a497-5c5fafd9576b</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;I did it already.
But if I try as like you told me, slv_addr will be sent 0xA8 and return NCK. (Slave address &amp;lt;&amp;lt; 1)
I think 0xD4&amp;gt;&amp;gt;1 or 0x6A is correct.
Anyway, thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always getting NCK.</title><link>https://devzone.nordicsemi.com/thread/84956?ContentTypeID=1</link><pubDate>Thu, 27 Apr 2017 07:56:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:861e7ca8-8c2b-4e6a-bfbe-695e3c4ad4f4</guid><dc:creator>Daniel Sullivan</dc:creator><description>&lt;p&gt;I had a similar issue. Try just uint8_t slv_addr = 0xD4;  (I seem to recall the twi_tx automatically does the offset)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always getting NCK.</title><link>https://devzone.nordicsemi.com/thread/84953?ContentTypeID=1</link><pubDate>Thu, 27 Apr 2017 00:30:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca05bf9e-6eed-4948-bffe-3a92b8284e74</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;I just attached oscilloscope capture files for SDA and SCL.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always getting NCK.</title><link>https://devzone.nordicsemi.com/thread/84952?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 08:32:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8f3ff79-b029-4ebf-8985-6918bf951076</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;can you show some logic analyzer pin output for SDA and SCL so that we can see why the slaves are NCKING&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always getting NCK.</title><link>https://devzone.nordicsemi.com/thread/84951?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 08:20:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:663fe97a-f1ba-4b56-8466-c6a76649c8e6</guid><dc:creator>Kim</dc:creator><description>&lt;p&gt;Thanks for your answer.
I got NCK for address byte. I think so LSM6DS3 chip is not understanding.
So I tried to the other sensors. (Of course, I changed slave address for each sensors.)
But they are also return NCK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Always getting NCK.</title><link>https://devzone.nordicsemi.com/thread/84950?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2017 07:20:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dec16dc-e7b1-4008-853c-deb210d7fba9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;is it an address byte or data byte that you get the first nack? If it is an address byte then it is obviously the address the TWI slave is not understanding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>