<?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 code problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46176/i2c-code-problem</link><description>Hi 
 
 I am new to nrf52840. I am trying to communicate on I2C bus with Cypress semiconductor CY8CMBR3116 capacitive touch IC. Some how I am able to connect the on I2C bus. And I am also able to read the required data register. My goal is to set the status</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Apr 2019 13:51:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46176/i2c-code-problem" /><item><title>RE: I2C code problem</title><link>https://devzone.nordicsemi.com/thread/182637?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2019 13:51:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca82e022-5931-4abc-8cf5-628d559cd8a1</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, it should stay on as long as nothing is causing the chip to reset. Is the rest of the application working as expected? The state of pin does not changed unless you do so in the code (or chip is reset).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C code problem</title><link>https://devzone.nordicsemi.com/thread/182610?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2019 12:09:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bceba9b-d251-491b-bac6-8d2a5f26f748</guid><dc:creator>abhi9912</dc:creator><description>&lt;p&gt;Yes , when I touch the sensor on my&amp;nbsp; PCB I get an input on I2C bus and the led gets on, but when I release the touch on the&amp;nbsp; button there is no command on the I2C and led gets off. I think&amp;nbsp; it should remain high when I am using the &amp;nbsp; nrf_gpio_pin_write(led1, 0); command. I know the leds on the DK are active low and I am writing the code accordingly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C code problem</title><link>https://devzone.nordicsemi.com/thread/182585?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2019 11:39:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2622aeb-fde2-43dd-bedd-b0075ce9be99</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;So the LED is turning on when you receive a command on I2C, right? When exactly does it turn off? You know that &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52832_dk/UG/nrf52_DK/hw_btns_leds.html?cp=3_1_4_5_4"&gt;the LEDs on the DK are active low&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C code problem</title><link>https://devzone.nordicsemi.com/thread/182575?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2019 11:12:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b39d67a4-ce4b-4352-b775-9a425414b252</guid><dc:creator>abhi9912</dc:creator><description>&lt;p&gt;Dear Jorgen&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried doing the same. I have removed all the code lines which can switch of the led. But the result is same.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please suggest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C code problem</title><link>https://devzone.nordicsemi.com/thread/182571?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2019 10:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f196c51-ce95-4203-9ada-09369853a021</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Please try removing any line of code that turns off the LED and see if it stays on this way.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C code problem</title><link>https://devzone.nordicsemi.com/thread/182459?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 17:14:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:992e4631-bc12-4824-af11-03b1c1e5e10b</guid><dc:creator>abhi9912</dc:creator><description>&lt;p&gt;Hi jorgen&lt;/p&gt;
&lt;p&gt;I checked the data_handler() function and it is not receiving any data which can&amp;nbsp;&amp;nbsp; disable the led.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I2C code problem</title><link>https://devzone.nordicsemi.com/thread/182130?ContentTypeID=1</link><pubDate>Mon, 15 Apr 2019 13:17:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0994201e-80c2-44ff-b029-9e2e15ddab2e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Did you check if&amp;nbsp;data_handler() is called again to disable the LED? I&amp;#39;m not sure what you expect to receive, but you are triggering TWI reads constantly in the while loop, an data_handler() will be called each time you receive data on TWI bus.&lt;/li&gt;
&lt;li&gt;The lines should not be related to TWI/I2C. What exactly is not working? Have you &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting"&gt;debugged the application&lt;/a&gt; to see if any error codes are reported, or if the code is stuck?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>