<?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>nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14390/nrf52-spim-no-miso-response</link><description>Hi, 
 Im trying to connect MCP25625 via SPI on nrf52. I checked with the scope that CS, MOSI and SCK are correct, but I get no reply on MISO line whatsoever.
I perform a very easy operation: 
 
 Reset - send 1 byte data 
 Read register - send 3 bytes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Jun 2016 23:22:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14390/nrf52-spim-no-miso-response" /><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54954?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2016 23:22:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4718abd7-1f21-4306-9c32-33fd64b6e0a6</guid><dc:creator>SRA</dc:creator><description>&lt;p&gt;I&amp;#39;m glad you figured it out, and that workaround Wojtek posted is really easy to follow, so I&amp;#39;d recommend rolling that in.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54953?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2016 09:52:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0d0af41-df34-41dc-a7ac-34c67a049e07</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Instead of bitbanging 1-byte command, you can use workaround described in &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.Rev1.errata/anomaly_832_58.html?cp=2_2_1_0_1_8"&gt;PAN 58&lt;/a&gt; :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54952?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2016 09:49:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a721f595-d78f-4938-8e83-028908d19649</guid><dc:creator>Sergy</dc:creator><description>&lt;p&gt;I figured it out with your help:) So here is what happened:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On one side the RESET pin of the device had to be connected to VCC if unused, so that was totally unrelated to nrf52 2) On the other side NRF52 cant send 1byte commands via SPI, and RESET command was a 1-byte command. I ended up bitbanging RESET command and using SPIM for the rest of longer commands.
Thanks for the help!&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54950?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2016 16:14:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8682d62d-2752-40b9-96e8-93bd06749fa8</guid><dc:creator>SRA</dc:creator><description>&lt;p&gt;Great. If you bit banged and have errors, it shouldn&amp;#39;t be an issue with nRF52. Try next:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If I had a bitbanging setup, I&amp;#39;d double check that against my nRF52 SPI code on the scope.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The 25625 requires 3V and 5V right? I&amp;#39;m assuming you have both hooked up. There is a strong possibility that the error is in the 25625 right now, so double check everything.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Datasheet says SPI mode 0-0 or 1-1 but they show examples sampled on rising edge. Make sure you understand 0-0 and 1-1 modes, and that you&amp;#39;re sending MSB FIRST! So, reset should be 00000011 on the scope.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Stick with the bitbanging. Get it working before you move on to hardware SPI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Don&amp;#39;t underestimate the input vs expected output! If you set register, make sure you can read that back. You may receive all zeros only to think it&amp;#39;s broken - only to find out that&amp;#39;s supposed to happen. You may need to re-engage CS sometimes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54951?ContentTypeID=1</link><pubDate>Sun, 12 Jun 2016 10:41:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0062eac1-9968-499e-ae9c-2b563045d56e</guid><dc:creator>Sergy</dc:creator><description>&lt;p&gt;Hi, I followed your advice and did the bitbanging.
The thing is that to reset the chip first command has to be 1 byte only and nrf52 has problems with it.
So I sent 1 byte command and then 3 byte reading register. Unfortunately without any luck. Ive attached 3-byte command and the OSC2 waveform which seems a bit weird to my original message. What do you think, am I missing something?&lt;/p&gt;
&lt;p&gt;CS line works as well, its just i have only 2 inputs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54949?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 17:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45ea2c7a-2a15-4845-9fa7-7527abd555b9</guid><dc:creator>SRA</dc:creator><description>&lt;p&gt;I&amp;#39;ve used the older version of the 25625, I had no extra pullups or anything like that. All the pins ran straight to my micro.&lt;/p&gt;
&lt;p&gt;That said... A LOT of SPI devices don&amp;#39;t have proper tri-state on the MISO line. It&amp;#39;s frustrating.&lt;/p&gt;
&lt;p&gt;Remember that many SPI devices won&amp;#39;t reply to a command until the NEXT attempt to read/write to it. I can&amp;#39;t remember anything about the MCP part&amp;#39;s SPI protcol, but you may need to release chip select and re-engage before you&amp;#39;ll get meaningful data.&lt;/p&gt;
&lt;p&gt;Another way to eliminate the possibility of the nRF52&amp;#39;s setup being wrong... Turn the GPIO to input/float and not SPI function and re-scope. You want to make sure you aren&amp;#39;t stuck in an open drain mode or something like that. Also and likewise, if possible maybe you can physically unhook the MISO line and scope with it not connected to the nRF52.&lt;/p&gt;
&lt;p&gt;Of course this is all assuming the MCP is &amp;quot;on&amp;quot;. Something I&amp;#39;d recommend for debugging like this is to bit bang out that first SPI message. Take the nRF52&amp;#39;s peripheral and setup out of the equation.&lt;/p&gt;
&lt;p&gt;Good luck - SPI MISO errors aren&amp;#39;t fun.&lt;/p&gt;
&lt;p&gt;Test:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Put a pullup on the MISO line.&lt;/li&gt;
&lt;li&gt;Send a command, release SS, send a read command&lt;/li&gt;
&lt;li&gt;Isolate the nRF52 out of the system by bit banging a test command or disconnecting the trace&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54948?ContentTypeID=1</link><pubDate>Thu, 09 Jun 2016 11:35:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcd78f85-5b30-44ec-9b92-65859e33c163</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;If you have good MOSI, SCK and CS signals and you actually can see them going into MCP module, there is something wrong with MCP module. Maybe it is not powered correctly, reset pin is not pulled or something.I wouldn&amp;#39;t search for problem on nrf52 side if it works ok. Or you just send wrong commands.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54947?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2016 20:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97a016a6-9ecb-4bb6-ae33-40900ac50efa</guid><dc:creator>Sergy</dc:creator><description>&lt;p&gt;just a standard config:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define NRF_DRV_SPI_DEFAULT_CONFIG(id)                       \
{                                                            \
    .sck_pin      = CONCAT_3(SPI, id, _CONFIG_SCK_PIN),      \
    .mosi_pin     = CONCAT_3(SPI, id, _CONFIG_MOSI_PIN),     \
    .miso_pin     = CONCAT_3(SPI, id, _CONFIG_MISO_PIN),     \
    .ss_pin       = NRF_DRV_SPI_PIN_NOT_USED,                \
    .irq_priority = CONCAT_3(SPI, id, _CONFIG_IRQ_PRIORITY), \
    .orc          = 0xFF,                                    \
    .frequency    = NRF_DRV_SPI_FREQ_4M,                     \
    .mode         = NRF_DRV_SPI_MODE_0,                      \
    .bit_order    = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST,         \
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MISO is using  GPIO 11
Tried enabling and disabling EASYDMA, didnt change anything&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 SPIM no MISO response</title><link>https://devzone.nordicsemi.com/thread/54946?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2016 20:09:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a278c3f9-ab99-43ba-8dcb-d596b7e39c5a</guid><dc:creator>James Yu</dc:creator><description>&lt;p&gt;How did you configure your SPI? What pin are you using for MISO?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>