<?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>Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14311/configuring-miso-pin-for-spim-nrf52</link><description>Greetings
I am working on an application that logs data to SPI flash device. I am having an issue where it appears that the pin configured as a MISO for SPIM is garbling up the flash device&amp;#39;s responses. I have verified with a logic analyzer that the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Mar 2017 21:39:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14311/configuring-miso-pin-for-spim-nrf52" /><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54605?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2017 21:39:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e084101e-2043-49f5-9d1b-46463d455c31</guid><dc:creator>ypearson</dc:creator><description>&lt;p&gt;This seems to fix it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = nrf_drv_spi_init(&amp;amp;m_spi1, &amp;amp;config, spi_event_handler);
NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(SPI0_SCLK);
reg-&amp;gt;PIN_CNF[SPI0_SCLK] |= (NRF_GPIO_PIN_H0H1 &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54599?ContentTypeID=1</link><pubDate>Sat, 02 Jul 2016 14:40:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96e32963-9281-4f53-8826-d407b5304d73</guid><dc:creator>troglobyte</dc:creator><description>&lt;p&gt;I used a 74AHC125 buffer on the MISO signal.  This corrected all issues and ultimately allowed erasing/writing to the device reliably...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54603?ContentTypeID=1</link><pubDate>Sat, 02 Jul 2016 14:38:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b5b7b45-ecc3-4d19-8b82-33a8ae3ce6ae</guid><dc:creator>troglobyte</dc:creator><description>&lt;p&gt;Well, I stand to be corrected.  After witnessing my client erase the nrf52 and get the interface to read the device ID correctly I prematurely posting this solution.  I was also unable to get the interface to reliably work even after erasing the device with my IDE...why it worked with my client&amp;#39;s IDE I have no idea....  Ultimately the only solution I found was to buffer the MISO signal between the two devices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54604?ContentTypeID=1</link><pubDate>Sat, 02 Jul 2016 02:13:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a963642-07e8-496f-9f7e-0939d70c5792</guid><dc:creator>Sir Oslay</dc:creator><description>&lt;p&gt;I cannot replicate your solution.  I tried erasing the entire device and reflashing using both nrfjprog and nRFGo without success.  I also tried manually changing the GPIO config (pullup, pulldown, etc.) in the PIN_CFG register with no success, so I don&amp;#39;t understand how reflashing the soft device could make any difference. At the moment, my project is not using a soft device (and therefore not flashing it), but honestly that shouldn&amp;#39;t matter.  The SPI code &lt;em&gt;should&lt;/em&gt; work regardless of whether or not the soft device is present.  I&amp;#39;m going to stick with the solution I found.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54602?ContentTypeID=1</link><pubDate>Sun, 12 Jun 2016 13:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f2947dc-fbd7-4ccc-ada2-ef49a13ce4ab</guid><dc:creator>troglobyte</dc:creator><description>&lt;p&gt;I would agree that my understanding of the device is limited at this time.  To be clear, I received the development board in an unknown state from my client...I had no idea what soft device was loaded (nor what a soft device was for that matter...).  I started with one of the non-BLE examples and got the TWI peripheral working without problems.  Once I tried to add a SPIM peripheral was where the problems started...I am afraid I don&amp;#39;t see much difference between &amp;quot;screwing up the pins&amp;quot; vs &amp;quot;random behaviour&amp;quot; however...
My point is  that developers new to the part should be aware of the nRF Go Studio utility...
t&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54601?ContentTypeID=1</link><pubDate>Sun, 12 Jun 2016 13:34:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:194ef5a4-8dc0-4b1c-98a8-31c07d9518ff</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;No you can&amp;#39;t &amp;#39;get the nrf52 into a corrupt state&amp;#39; nor can you &amp;#39;screw up most of the pins&amp;#39; nor does it have a &amp;#39;soft core&amp;#39;, I&amp;#39;m afraid most of what you&amp;#39;ve written is completely incorrect.&lt;/p&gt;
&lt;p&gt;If you erase the softdevice and try to run a softdevice application then the device does completely absolutely nothing at all because there is no code for it to run because it was erased. It will go directly to the hardfault handler on reset, not run any of your application code or do anything useful at all. So if it was running your app at all, then you had the softdevice loaded. Although it&amp;#39;s quite possible you loaded the wrong softdevice and got very random behaviour.&lt;/p&gt;
&lt;p&gt;Happy to hear that you are working again, but your understanding of why is, I&amp;#39;m afraid, just wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54598?ContentTypeID=1</link><pubDate>Sun, 12 Jun 2016 13:26:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6757c1d-d548-4a43-903b-1453ea83375f</guid><dc:creator>troglobyte</dc:creator><description>&lt;p&gt;I was about to do the same thing...see my answer below...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54600?ContentTypeID=1</link><pubDate>Sun, 12 Jun 2016 13:25:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa5cbda0-0853-4f81-a0f4-a367fa1a8a2c</guid><dc:creator>troglobyte</dc:creator><description>&lt;p&gt;Ok
I believe that I have discovered what the core issue is.  As a nrf52 newbie, I could see  how this could happen but want to caution others new to the part...
Ultimately what fixed my problem was running the &amp;quot;nrf Go Studio&amp;quot; application and erasing the device.  As this device contains a &amp;quot;soft core&amp;quot; if one attempts to run one of the soft device application examples without first programming the soft device, the nrf52 can get into a corrupt state.  At some point I believe that I attempted to do exactly that and it screwed up most of the pins on the device.
I have been working on this on and off for the past few weeks.  Ultimately my client who I am doing my first project on nrf52 for, alerted me to this issue and I was able to fix it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54597?ContentTypeID=1</link><pubDate>Sun, 12 Jun 2016 01:19:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:823d2e54-6e74-46ee-9117-a0c6f48fc9bc</guid><dc:creator>Sir Oslay</dc:creator><description>&lt;p&gt;I was having the same issue with an Adesto AT45DB041E flash chip on the PC10040 board. I ended up getting it to work by putting a current limiting resistor in series with the MISO line.  I used a 39 ohm resistor because it happened to be the only resistor I had on hand at the time.  If there&amp;#39;s a more suitable value, please let me know!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54596?ContentTypeID=1</link><pubDate>Sun, 12 Jun 2016 00:17:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0389aa5-2142-4923-958a-f0160fc23c35</guid><dc:creator>Sir Oslay</dc:creator><description>&lt;p&gt;I&amp;#39;m having the same issue with an Adesto AT45DB041E flash chip on the PC10040 board.  The program reads complete garbage when MISO is connected to the board.  When I disconnect MISO I can see on my scope that the correct info is being sent.  Something is interfering with whatever pin is configured as the MISO input.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54595?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2016 13:04:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8518147-acb7-4464-b699-32d070dcb2ed</guid><dc:creator>troglobyte</dc:creator><description>&lt;p&gt;I will also add that the version of the dev board is PCA10040 V 0.9.0 2015.49&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54594?ContentTypeID=1</link><pubDate>Mon, 06 Jun 2016 23:40:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edaba93f-00e5-4648-8b89-a817c5611582</guid><dc:creator>troglobyte</dc:creator><description>&lt;p&gt;The signal connects only to the nrf52 on this development board.  There are no other drivers (or receivers for that matter).  I have ohmed the signal to ground and is high impedance.  Also note that this happens with every pin that I try on the nrf52 dev board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring MISO pin for SPIM nrf52</title><link>https://devzone.nordicsemi.com/thread/54593?ContentTypeID=1</link><pubDate>Mon, 06 Jun 2016 13:33:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b46ef55-1494-4dfd-8260-f16a1a68d6e4</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;How do you know that the nRF52 is driving the line other than that what you read is incorrect?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>