<?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>Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14139/clarification-of-gpio-configuration-for-spi-master</link><description>Hi all 
 Chapter 26.1.1 of the nRF51 series reference manual v3.0 states that the pins used by the SPI master have to be configured in the GPIO registers according to table 221. 
 Now, I have some points that are not quite clear to me: 
 
 Are the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Apr 2019 08:16:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14139/clarification-of-gpio-configuration-for-spi-master" /><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/182285?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2019 08:16:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:145453a9-4fc6-47d3-a248-b38181d5a85d</guid><dc:creator>11tacle</dc:creator><description>&lt;p&gt;Hello Ole,&lt;/p&gt;
&lt;p&gt;your valuable reply is more than three years old, though unfortunately I don&amp;#39;t see any change in the nRF51 Series Reference Manual V3.0.1 regarding the configuration of GPIOs for usage as SPI pins.&amp;nbsp; The same ambiguous information can still be found in chapter 26.1.1 imposing the SCK pin to be configured with an active input buffer...&lt;/p&gt;
&lt;p&gt;Will there someday be a revised version of this manual ?&lt;/p&gt;
&lt;p&gt;This very description is even also given &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/spi.html?cp=3_0_0_5_23"&gt;online &lt;/a&gt;for the nRF52.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;While I&amp;#39;m at it, I&amp;#39;d also like to propose changing the description for the SPI ENABLE register in table 227.&amp;nbsp; As I am writing my own SPI driver I have to rely on good information.&amp;nbsp; I had to find out the hard way that the SPI peripheral is enabled by writing a &amp;quot;1&amp;quot; to this register.&amp;nbsp; As my first assumption was to set all three bits marked as &amp;quot;A&amp;quot;, I never succeeded in activating SPI on my nRF51822.&amp;nbsp; So please mark only bit 0 with an &amp;quot;A&amp;quot; in table 227.&lt;/p&gt;
&lt;p&gt;BTW, in the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/spi.html?cp=3_0_0_5_23"&gt;online &lt;/a&gt;nRF52 Product Specification I saw that bits 0-3 are marked &amp;quot;A&amp;quot;, so I am confused how to start SPI there, too, if I am ever to work with this kind of chip in the future.&lt;/p&gt;
&lt;p&gt;2nd proposal: in the &amp;quot;nRF51 Series Reference Manual&amp;quot; please include a description of the SPI READY event register.&amp;nbsp; Only the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/spi.html?cp=3_0_0_5_23"&gt;online &lt;/a&gt;nRF52 Product Specification offers an adequate explanation.&amp;nbsp; The same holds for other event registers as well, like the TIMER Compare event registers in table 18.2.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54032?ContentTypeID=1</link><pubDate>Tue, 31 May 2016 10:27:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:362cc5c3-d48e-40f7-9ffe-668ace1d839b</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;Thank you very much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54031?ContentTypeID=1</link><pubDate>Tue, 31 May 2016 09:20:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f08e9520-7cea-4f05-a823-9eb6399f111d</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;PULL and DRIVE will still be valid for the pin configuration, so not overwritten and will always take effect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54030?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 16:30:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22afdcce-715f-48fb-8b7e-7ee402f01992</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;I think so Remo, i understood it exactly like that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54029?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 14:53:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc456c94-8a6a-4cce-8af7-ecce679a2cb0</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;Thank you for the clarification!&lt;/p&gt;
&lt;p&gt;Just to be sure, did I understand that correct that the pull-up and pull-down settings are the only GPIO settings that are not overwritten by a peripheral and therefore always take affect?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54028?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 14:24:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fa3afa4-5998-4eea-b8b9-3ff3b1c94284</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;Thanks for clarifying Ole.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54027?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 14:13:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c5040ee-1bbc-46d5-88dd-a31141bdd78f</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;The SPI peripheral will override the gpio pin configuration so it does not matter what it is when SPI is enabled (other than pull-up/pull-down resistors). This is a bug in the Reference Manual and has been reported internally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54026?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 14:04:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8478f26-01e2-4f75-aeb7-4a74866b7fd2</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;I know that  PSELSCK, PSELMOSI, and PSELMISO are just selecting the pins, but when I enable the SPI master module I assume/expect that the SPI master takes over the control of these pins and therefore overrides the settings made in the GPIO module.&lt;/p&gt;
&lt;p&gt;I would have expected that the suggested GPIO settings from table 221 are only relevant when the SPI master is disabled again or the chip enters the OFF mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54023?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 12:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a7094b2-916b-44f7-b8e0-a4dbae85e489</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;Why wouldn&amp;#39;t you? PSELSCK, PSELMOSI, and PSELMISO are only selecting which pins you are going to use for SPI. These pins do not modify the pins behavior. To modify pins behavior you have to modify it in GPIO module. It is kinda naturally . It is exactly the same in every mcu. First you select the pins used, then you modify them for desired interface.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54025?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 11:52:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:263cbdf6-d74b-417a-aeca-7bbef53bfdc0</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;You&amp;#39;ve understood me wrong. Of course do I modify the PSELx registers, otherwise our SPI driver won&amp;#39;t work. The question was why it is necessary to configure the SPI pins also in the GPIO peripheral module.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54022?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 09:10:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa0976be-cb20-4e83-897f-f3498867a5ce</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;Well it would be good to see how &amp;quot;your&amp;quot; drivers look like, because if you don&amp;#39;t modify values of SPI PSELSCK, PSELMOSI nad PSELMISO registers, then these registers will have default value of 0xFFFFFFFF, and that means that associated SPI master signal is not connected to any pin of your chip. So it is imposible to use SPI without modyfing these registers. Also, from reading reference manual i can see that these registers configurations are used only as long as SPI master is enabled. And i checked the manual to see about your second question, however i didn&amp;#39;t find any answer. The only thing i was able to find is that input buffer must always be connected to the SCK pin to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54024?ContentTypeID=1</link><pubDate>Mon, 30 May 2016 05:53:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e14a0aa-9a76-48a0-8f93-71155866b4d3</guid><dc:creator>Remo</dc:creator><description>&lt;p&gt;Thanks for your answer, but we aren&amp;#39;t using the SPI library from Nordic. We use our own SPI driver.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Clarification of GPIO configuration for SPI master</title><link>https://devzone.nordicsemi.com/thread/54021?ContentTypeID=1</link><pubDate>Fri, 27 May 2016 22:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:306b67c9-f219-4730-a907-d2848d3f91f7</guid><dc:creator>Artucas</dc:creator><description>&lt;p&gt;dont know for second question, but for the first one - if you are using nordic libs for SPI, they are configuring GPIO&amp;#39;s when creating new instance of SPI which you are using.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>