<?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>Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1852/ready-to-development-twi-application-while-using-softdevice</link><description>Hi, I am developing a BLE application using SPI and TWI. (Using nRF51822)
This discussion is about my survey in development zone for future develop the TWI part.
I want to discuss... not just ask some specific question ;) 
 I&amp;#39;ve used SPI slave to read</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Jun 2014 12:20:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1852/ready-to-development-twi-application-while-using-softdevice" /><item><title>RE: Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/thread/8025?ContentTypeID=1</link><pubDate>Wed, 25 Jun 2014 12:20:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ddb885c-c187-496d-b2ee-a87efc3bb8d0</guid><dc:creator>Nick</dc:creator><description>&lt;p&gt;Hi Tim, did you end up resolving your TWI issue? It looks like I may have the same problem...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/thread/8024?ContentTypeID=1</link><pubDate>Fri, 21 Mar 2014 17:58:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:128378d8-b290-45fc-a25f-405f1a3f05ff</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;This is very interesting. However, could it be that you see the problem Scarlet mentions in a comment above? If so, I fixed it in a new commit after I pushed the original example project: &lt;a target="_blank" href="https://github.com/NordicSemiconductor/nrf51-ble-app-lbs/commit/95736081adf66a3e0683d6694e358f22d8e65041" rel="nofollow"&gt;https://github.com/NordicSemiconductor/nrf51-ble-app-lbs/commit/95736081adf66a3e0683d6694e358f22d8e65041&lt;/a&gt;
Have you updated your project with this? If you have, and still see the issue, would it be possible for you to provide a logic analyzer trace showing it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/thread/8023?ContentTypeID=1</link><pubDate>Thu, 20 Mar 2014 23:24:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b59877f1-9c0e-472b-b582-20181ff66b7e</guid><dc:creator>Tim Clark</dc:creator><description>&lt;p&gt;Yup - have triple checked - G0.  Have tried on multiple nRF51822-QFAAG0 parts.
Using latest (just this week) SDK drop - and the 6.0.0 S110 SoftDevice.&lt;/p&gt;
&lt;p&gt;I am using a custom PCBA - it has an InvenSense part as well as a Serial Flash onboard - that&amp;#39;s pretty much it.&lt;/p&gt;
&lt;p&gt;It seems like it is able to do a few (like 3 or 4) TWI operations - but then gets into this block of code - and never seems to recover (TWI functionality that is).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    if (timeout == 0 || NRF_TWI1-&amp;gt;EVENTS_ERROR != 0)
    {
      // Recover the peripheral as indicated by PAN 56: &amp;quot;TWI: TWI module lock-up.&amp;quot; found at
      // Product Anomaly Notification document found at
      // &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-R-low-energy/nRF51822/#Downloads"&gt;www.nordicsemi.com/.../&lt;/a&gt;
      NRF_TWI1-&amp;gt;EVENTS_ERROR = 0;
      NRF_TWI1-&amp;gt;ENABLE = TWI_ENABLE_ENABLE_Disabled &amp;lt;&amp;lt; TWI_ENABLE_ENABLE_Pos;
      NRF_TWI1-&amp;gt;POWER = 0;
      nrf_delay_us(5);
      NRF_TWI1-&amp;gt;POWER = 1;
      NRF_TWI1-&amp;gt;ENABLE = TWI_ENABLE_ENABLE_Enabled &amp;lt;&amp;lt; TWI_ENABLE_ENABLE_Pos;

      (void)twi_master_init();

      return false;
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;#39;ve not had the time to delve into it further than just running in debugger and seeing that it finds it&amp;#39;s way into the PAN 56 lock-up condition - which the twi_SD_master.c driver never does.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/thread/8022?ContentTypeID=1</link><pubDate>Mon, 17 Mar 2014 13:53:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ed4c300-46e7-44ec-903a-70b7cd23f4b7</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Are you absolutely certain that it is G0 and not C0 on your chip? C0 would be a first revision chip. As far as I can see, from testing the example both on FA and G0, it works as expected. Which board and version are you working with? Have you remembered to hook up the TWI interface?&lt;/p&gt;
&lt;p&gt;If you have further problems, it might be easier to post a separate question, making sure to take a photo of your setup, upload the compiled hex and include anything else that may be of interest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/thread/8021?ContentTypeID=1</link><pubDate>Sat, 15 Mar 2014 01:02:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e523ef93-c2b2-465b-bf53-2926a48d5805</guid><dc:creator>Tim Clark</dc:creator><description>&lt;p&gt;I&amp;#39;ve been trying to use this (nrf51-ble-app-lbs) twi_hw_master.c w/ an nRF51822-QFAAG0 part - but it just doesn&amp;#39;t seem to be working for me.  Even w/ the line 81 change to add -&amp;gt;EVENTS_STOPPED.
I&amp;#39;ve tried at both 100 and 400kHz ...&lt;/p&gt;
&lt;p&gt;The twi_hw_master_SD.c file (which uses the sd_ppi calls) however works perfectly.&lt;/p&gt;
&lt;p&gt;Comparing the two - seems like a couple other places where there are some sd_ppi calls which don&amp;#39;t seem to have corresponding SHORTS - but guess that could be down to just how SHORTS differs from using PPI and sd_ppi.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/thread/8020?ContentTypeID=1</link><pubDate>Thu, 13 Mar 2014 11:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b2c9579-f552-4bb9-a0b4-dc2c13dd14aa</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Good point! I just pushed a fix for that one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/thread/8019?ContentTypeID=1</link><pubDate>Thu, 13 Mar 2014 09:26:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d8f9308-662c-45d8-8744-f9ba91fd23ce</guid><dc:creator>Scarlet</dc:creator><description>&lt;p&gt;Thanks Ole! Another little problem is in below link
&lt;a target="_blank" href="https://devzone.nordicsemi.com/index.php/i-think-i-have-found-a-bug-in-twi_hw_master-for-nrf51822#reply-3904" rel="nofollow"&gt;https://devzone.nordicsemi.com/index.php/i-think-i-have-found-a-bug-in-twi_hw_master-for-nrf51822#reply-3904&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think in twi_hw_master.c is also need to adding
NRF_TWI1-&amp;gt;EVENTS_STOPPED = 0; At line 81.
Anyway, thanks your help!! :D :D :D&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ready to development TWI application while using softdevice</title><link>https://devzone.nordicsemi.com/thread/8018?ContentTypeID=1</link><pubDate>Tue, 11 Mar 2014 15:21:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1abca0c-698e-4f4f-846d-230d1a3795a2</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;A HW implementation of a serial interface is always better from a power perspective than a SW implementation!&lt;/p&gt;
&lt;p&gt;Changing from TWI1 to TWI0 shouldn&amp;#39;t cause any problem.&lt;/p&gt;
&lt;p&gt;You can take a look at &lt;a href="https://github.com/NordicSemiconductor/nrf51-ble-app-lbs/tree/twi-display-5.1.0"&gt;this project&lt;/a&gt; to see how twi_hw_master.c can be changed to use the shorts instead of the PPI. You need to enable one of the shortcuts at a time, not both, as your line does.&lt;/p&gt;
&lt;p&gt;Disabling the TWI by writing the disable value to the ENABLE register should be sufficient to reduce current consumption.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>