<?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>NRF52810 SPI PSEL pins wont set &amp;amp; infinite loop</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63792/nrf52810-spi-psel-pins-wont-set-infinite-loop</link><description>Currently blocked by this issue. 
 // CFG_PIN_GLUE_DAT = 5 
 // CFG_PIN_GLUE_CLK = 6 NRF_GPIO-&amp;gt;PIN_CNF[CFG_PIN_GLUE_DAT] = pinDisconnectInputBuffer | (GPIO_PIN_CNF_DIR_Output &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos); NRF_GPIO-&amp;gt;PIN_CNF[CFG_PIN_GLUE_CLK] = (GPIO_PIN_CNF_DIR_Output</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jul 2020 12:35:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63792/nrf52810-spi-psel-pins-wont-set-infinite-loop" /><item><title>RE: NRF52810 SPI PSEL pins wont set &amp; infinite loop</title><link>https://devzone.nordicsemi.com/thread/260581?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2020 12:35:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e1474a4-10ac-4379-b826-5f5126813e1d</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;It&amp;#39;s ok, I implemented the EasyDMA approach and this is working fine. :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52810 SPI PSEL pins wont set &amp; infinite loop</title><link>https://devzone.nordicsemi.com/thread/260556?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2020 11:21:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9bc32c4-c38d-4e07-8ea3-3112a0ea1818</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Andrew, I am going on holiday from tomorrow, if you can attach your project quickly, i can test it to see what you have missed. Everything looks correct with you code snippets, but there is something else missing . With the whole project, i will be able to debug.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52810 SPI PSEL pins wont set &amp; infinite loop</title><link>https://devzone.nordicsemi.com/thread/260414?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 14:13:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ef782c4-5262-4bdd-acb4-bb1b5dfdad8b</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;Further investigation. The EVENT_READY is most likely set by interrupt, which I wasn&amp;#39;t using. I&amp;#39;ve therefore set this with an inner loop.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;inline void GLUE_Start (void) {

  NVIC_SetPriority(SPIM0_SPIS0_SPI0_IRQn, 4);
  NVIC_EnableIRQ(SPIM0_SPIS0_SPI0_IRQn);
  __enable_irq(); // TODO: maybe not required
  NRF_SPIM0-&amp;gt;ENABLE = SPIM_ENABLE_ENABLE_Enabled &amp;lt;&amp;lt; SPIM_ENABLE_ENABLE_Pos;
}

void SPIM0_SPIS0_SPI0_IRQHandler (void) {

  waiton = 0;
  NRF_SPI0-&amp;gt;EVENTS_READY = 0;
}

static void sendWait (uint8_t payload) {

  waiton = 1;
  NRF_SPI0-&amp;gt;TXD = payload;
  while (waiton) {
    __WFE();
  }
}
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately the behaviour is the same, the interrupt isn&amp;#39;t called. All this is pre-softdevice.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52810 SPI PSEL pins wont set &amp; infinite loop</title><link>https://devzone.nordicsemi.com/thread/260328?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 10:02:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d230a9ff-3861-4ae4-a42b-b23b5d90b349</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;I found the debugging issue, I had the nrf52.svd register file selected, a left over. So now the values show up correctly.&lt;br /&gt;&lt;br /&gt;Which leaves the EVENTS_READY not setting. According to the manual this event is flag when TX has shifted out and RX has shifted in. In my case TX is set and RX should be null by the disconnect. Therefore something must be stopping TX from sending.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot_5F00_2020_2D00_07_2D00_16_5F00_11_2D00_28_2D00_05.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52810 SPI PSEL pins wont set &amp; infinite loop</title><link>https://devzone.nordicsemi.com/thread/260315?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 09:27:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22de34d2-ba4a-4c77-9e0e-c11d5e3d5582</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;If you&amp;#39;re an employee and can take it private I can send the project.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve also (yesterday) followed through to spim_pins_set and it&amp;#39;s doing the same thing under the hood.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52810 SPI PSEL pins wont set &amp; infinite loop</title><link>https://devzone.nordicsemi.com/thread/260304?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 09:05:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5592493a-2950-469d-861c-793660ee7a7c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;i can see in the SES that the registers are just updated (red) when writing these registers. I haven&amp;#39;t seen the behavior you see before,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/449x443/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c7f16550364a4afc8964797e69e397c9/pastedimage1594890311097v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Can you please attach your project so that i can try to replicate this behavior.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52810 SPI PSEL pins wont set &amp; infinite loop</title><link>https://devzone.nordicsemi.com/thread/260137?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 12:20:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:156c6ef8-0369-4759-b677-a3a0bf73994c</guid><dc:creator>snoopy20</dc:creator><description>&lt;p&gt;Segger, and yes to the rest. Actually you can see in the same screenshot the &amp;quot;frequency&amp;quot; is read correctly.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve followed the manual/spec to the letter. For the PSEL pins maybe that is still the debugger reading from the wrong memory location. If not, it could be the reason why TX doesn&amp;#39;t work (according to the lack of EVENTS_READY flag).&lt;br /&gt;&lt;br /&gt;All other peripherals are disabled and SoftDevice not initialized (although I don&amp;#39;t think anything touches SPI anyway but worth considering the main crystal hasn&amp;#39;t been halted). &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52810 SPI PSEL pins wont set &amp; infinite loop</title><link>https://devzone.nordicsemi.com/thread/260124?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 11:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2662088c-9df4-4e51-8726-bcc85aa1b68b</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]// WARN - pins appear not be set, see screenshot! Huh?!?[/quote]
&lt;p&gt;Which debugger are you using? is the debugger halted when you took the snapshot of these registers? Is the program compiled for debugging? This looks more of the IDE issue than the issue in the code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>