<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: What is the significance of D10 designated as 1_NSS?</title>
		<link>http://forums.leaflabs.com/topic.php?id=2391</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:08:12 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=2391" rel="self" type="application/rss+xml" />

		<item>
			<title>feurig on "What is the significance of D10 designated as 1_NSS?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2391#post-12385</link>
			<pubDate>Mon, 13 Aug 2012 15:00:33 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">12385@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I don't think it can be understated that the libmaple people have also made it convenient to map the slave select pin consistently across multiple processors and multiple spi peripherals using the spiX-&#38;gt;nss() mechanism.  Even if the library doesn't manage this pin having a way to portably reference it as apposed to hard-coding it should not be understated.  &#60;/p&#62;
&#60;p&#62;Especially if you then add the ability to (optionally) have the hardware manage it. &#60;/p&#62;
&#60;p&#62;I am not certain that the library should manage the slave select given the inconsistencies in the ways that peripherals expect the slave select to be used. But the way its written is a win/win regardless.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "What is the significance of D10 designated as 1_NSS?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2391#post-12380</link>
			<pubDate>Mon, 13 Aug 2012 11:45:06 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">12380@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;The SPI peripherals do support automatic NSS toggling, but you'd have to do that with the lower-level libmaple &#60;a href=&#34;http://leaflabs.com/docs/libmaple/api/spi.html&#34;&#62;spi.h&#60;/a&#62; interface (or by setting the control registers directly).&#60;/p&#62;
&#60;p&#62;The HardwareSPI begin() method ends up calling &#60;a href=&#34;http://leaflabs.com/docs/libmaple/api/spi.html#project0spi_8c_1a273d338b593ef0ae00d10609927157f8&#34;&#62;spi_master_enable()&#60;/a&#62; with &#60;code&#62;SPI_SW_SLAVE&#60;/code&#62; (software slave management) among the &#60;a href=&#34;http://leaflabs.com/docs/libmaple/api/spi.html#project0spi_8h_1a188902efbdb620e36c15eb8445251a96&#34;&#62;configuration flags&#60;/a&#62;, which means you have to handle NSS toggling yourself.&#60;/p&#62;
&#60;p&#62;This is basically a bug; we were under time pressure to get v0.0.12 out and didn't get hardware slave management working in time. If you fix it, please send any patches our way, so we can fold them into the next release.&#60;/p&#62;
&#60;p&#62;Be sure to check out &#60;a href=&#34;http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/REFERENCE_MANUAL/CD00171190.pdf&#34;&#62;ST RM0008&#60;/a&#62;, the Maple's chip reference manual, for information on the register bits that need setting. I believe having software slave management disabled and the SSOE bit set (in SPI_CR2) might do the trick, but TBH I haven't touched this in a while.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>pico on "What is the significance of D10 designated as 1_NSS?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2391#post-12320</link>
			<pubDate>Sat, 11 Aug 2012 12:36:28 +0000</pubDate>
			<dc:creator>pico</dc:creator>
			<guid isPermaLink="false">12320@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks robodude.&#60;/p&#62;
&#60;p&#62;It's good to know about libmaple setting D10 as an output. I didn't think it was actually doing anything!&#60;/p&#62;
&#60;p&#62;I'm interested in configuring the SPI interface to toggle 1_NSS automatically for me. I haven't seen this documented anywhere though -- is this option available through libmaple?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>robodude666 on "What is the significance of D10 designated as 1_NSS?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2391#post-12318</link>
			<pubDate>Sat, 11 Aug 2012 11:44:01 +0000</pubDate>
			<dc:creator>robodude666</dc:creator>
			<guid isPermaLink="false">12318@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;pico,&#60;/p&#62;
&#60;p&#62;libmaple will automatically configure SPI1's NSS as an output, but will not toggle it for you. You must handle that yourself.&#60;/p&#62;
&#60;p&#62;Is there a significance to using it? Not really, depends on how you handle it. If you pick another pin to act as your NSS, keep in mind that D10 will still be an output by default if you use libmaple or wirish's SPI1 setup.&#60;/p&#62;
&#60;p&#62;That said, if you want, you can reconfigure the SPI interface to automatically toggle it for you; libmaple doesn't set it up by default but you can after the fact.&#60;/p&#62;
&#60;p&#62;With that all said... The beautiful of SPI is you can use one SPI interface with multiple SPI devices each using their own NSS pin. You can use the default one for one device, then pick another pin for another device, etc.&#60;/p&#62;
&#60;p&#62;It all really depends on how you want to write your program.&#60;/p&#62;
&#60;p&#62;-robodude666
&#60;/p&#62;</description>
		</item>
		<item>
			<title>pico on "What is the significance of D10 designated as 1_NSS?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=2391#post-12315</link>
			<pubDate>Sat, 11 Aug 2012 09:06:27 +0000</pubDate>
			<dc:creator>pico</dc:creator>
			<guid isPermaLink="false">12315@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Just to make sure I understand how 1_NSS is supposed to be handled when using spi channel 1....&#60;/p&#62;
&#60;p&#62;I see in the GPIO pin maps for the Maple 5 that for spi channel 1, the assigned pins are:&#60;/p&#62;
&#60;p&#62;D10 - 1_NSS&#60;br /&#62;
D11 - 1_MOSI&#60;br /&#62;
D12 - 1_MISO&#60;br /&#62;
D13 - 1_SCK&#60;/p&#62;
&#60;p&#62;However, I'm also reading in the threads on SPI in this forum that HardwareSPI does _not_ manage 1_NSS at all, the program has to do that manually. Which is fine, but leads me to wonder: What is the significance of assigning D10 as 1_NSS? If it is an output that has to be managed manually, then _any_ available GPIO pin could be used as NSS?&#60;/p&#62;
&#60;p&#62;Or have I missed something?&#60;/p&#62;
&#60;p&#62;Thanks for any advice.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
