<?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 stuck and blocked</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13990/twi-stuck-and-blocked</link><description>Hi, 
 I&amp;#39;m connecting to a proximity sensor, IQS263 over TWI interface and having some weird problems. 
 I&amp;#39;m using the same code I used to connect with the Invensense MPU 9250 so I know that on the same platform, the same code works fine with no problems</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Jul 2016 14:46:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13990/twi-stuck-and-blocked" /><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53430?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2016 14:46:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d02ac08c-ce52-42c2-b958-b6434f41b7f8</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Ouch! Sorry to hear that. Glad it&amp;#39;s solved though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53429?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2016 11:28:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce81681f-3b4c-4ff4-8842-e8fe450ff8ab</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Manufacturer had chip on backwards.. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53428?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 13:32:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48fe052f-859e-4c57-97fb-02fe4bbfe154</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Thanks Martin, will update once I debug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53427?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 13:30:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24f28731-c7ff-402e-ab9d-0153c27c0642</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Sounds good. I&amp;#39;ll wait for an update with a logic trace then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53426?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 13:05:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1500bd69-f1cc-48ff-b327-18f3da300810</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;It&amp;#39;s a nice part, its got some crazy range for a capacitive prox pickup... best out of about 5 chips I tried.&lt;/p&gt;
&lt;p&gt;Plus works across the V range of the Nordic.. so its a nice tidy combo.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53425?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 13:05:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed3cfcdf-8fe7-44ee-9205-2d8f1a85b15e</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;I looked at the driver you sent (I had another one from the chip co) and it&amp;#39;s doing what I&amp;#39;m doing.. so I think its a HW fault on my boards. They are new (Board bring up) but simple but hey.. never know.&lt;/p&gt;
&lt;p&gt;Might have to wait until I can get the scope/logic analyser on it.. give me a chance to try my new analyser!!&lt;/p&gt;
&lt;p&gt;And yeah, the docs say to do it that way.. I don&amp;#39;t think the line ever moves from ground which makes me wonder if the chip is powered/working at all.. I don&amp;#39;t even have a multi-meter with me which is a pain.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53424?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 13:03:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c3d8ade-a7a4-4dd0-b9a9-992f084081ba</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Does it say anywhere that you should take control of the RDY pin like this?&lt;/p&gt;
&lt;p&gt;Maybe you can try to use a TWI event handler and see if it returns any error codes that make sense.&lt;/p&gt;
&lt;p&gt;Anyway I think a logic trace might be very helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53423?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 11:50:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b1c8f95-5b9f-4389-8a69-7b4ef8ba4fce</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Yes, I also went and re-read the driver code as well as their data sheet (I had made some assumptions) but it doesn&amp;#39;t appear to have fix it.&lt;/p&gt;
&lt;p&gt;For example I now do this to wait for the communications window with the IC but it appears to break after no delay (which I find almost impossible to believe)..&lt;/p&gt;
&lt;p&gt;So I had set it as an input with a pull-up so it sits high..&lt;/p&gt;
&lt;p&gt;Then I pull it low for 10ms to signal to the IQS that I want to communicate&lt;/p&gt;
&lt;p&gt;Then I set it as an input (floating high) and the IQS should pull it low to say &amp;quot;ok, I&amp;#39;m ready&amp;quot;&lt;/p&gt;
&lt;p&gt;But doesn&amp;#39;t seem to happen.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m in Sweden at the mo so will have to wait until I get back to NZ to break out the scope and figure out what&amp;#39;s up.. feel its a HW problem on my PCB..&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_gpio_cfg_input(PROXIMITY_I2C_RDY, NRF_GPIO_PIN_PULLUP);
delay_ms(10);

// We need to pull the RDY line low for at least 10ms
nrf_gpio_cfg_output(PROXIMITY_I2C_RDY);
nrf_gpio_pin_clear(PROXIMITY_I2C_RDY);

delay_ms(10);

nrf_gpio_cfg_input(PROXIMITY_I2C_RDY, NRF_GPIO_PIN_PULLUP);


int i=0;
for (i=0; i&amp;lt;200; i++) {
    if (!nrf_gpio_pin_read(PROXIMITY_I2C_RDY)) {
        break;
    }
    delay_ms(1);
}

if (i == 200) {
    RMLOG(&amp;quot;Broke out, never detected&amp;quot;);
}
RMLOG(&amp;quot;Detected after %u&amp;quot;,i);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TWI stuck and blocked</title><link>https://devzone.nordicsemi.com/thread/53422?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 10:20:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f10d319-6992-4793-bf90-135334ced8f3</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If I understand you correctly you are using a GPIO on the nRF52 to pull down the RDY pin whenever you want to read data. However the way I read the datasheet, and after skimming through &lt;a href="https://github.com/SuperPichu/shield-tablet-kernel/blob/master/drivers/staging/iio/light/iqs253.c"&gt;this IQS263 driver&lt;/a&gt;, that is not the way to go. I think the IQS263 is controlling the pin, pulling it low whenever it has new data available. What you should do is to set up an interrupt triggering on a negative edge on the RDY signal. When the interrupt is triggered you can read data.&lt;/p&gt;
&lt;p&gt;I think the datasheet is a little vague on this though, so I might be wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>