<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.ethernut.de/nutwiki/index.php?action=history&amp;feed=atom&amp;title=Hardware%2FEIR%2FSPI</id>
		<title>Hardware/EIR/SPI - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.ethernut.de/nutwiki/index.php?action=history&amp;feed=atom&amp;title=Hardware%2FEIR%2FSPI"/>
		<link rel="alternate" type="text/html" href="http://www.ethernut.de/nutwiki/index.php?title=Hardware/EIR/SPI&amp;action=history"/>
		<updated>2026-04-24T06:14:14Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://www.ethernut.de/nutwiki/index.php?title=Hardware/EIR/SPI&amp;diff=405&amp;oldid=prev</id>
		<title>Harald: Created page with &quot;&lt;div id=&quot;content&quot;&gt;  = EIR SPI Support =  == AT91 Hardware SPI ==  The SAM7SE offers a single [http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus SPI], which is hardw...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.ethernut.de/nutwiki/index.php?title=Hardware/EIR/SPI&amp;diff=405&amp;oldid=prev"/>
				<updated>2017-07-13T09:09:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;div id=&amp;quot;content&amp;quot;&amp;gt;  = EIR SPI Support =  == AT91 Hardware SPI ==  The SAM7SE offers a single [http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus SPI], which is hardw...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;content&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= EIR SPI Support =&lt;br /&gt;
&lt;br /&gt;
== AT91 Hardware SPI ==&lt;br /&gt;
&lt;br /&gt;
The SAM7SE offers a single [http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus SPI], which is hardwired to the VS1053 audio codec and the AT45DB321 serial flash.&lt;br /&gt;
&lt;br /&gt;
The [[mmc.html|memory card socket]] is intentionally not connected to the hardware SPI. When playing or recording MP3 files, memory cards may block the SPI bus for quite some time. If this happens, the audio codec may run out of buffer space. During decoding, this will result in annoying gaps and during encoding the audio recording file may become corrupted.&lt;br /&gt;
&lt;br /&gt;
== Bit banging SPI ==&lt;br /&gt;
&lt;br /&gt;
Actually, any available three GPIO pins can serve as SPI when using a [http://en.wikipedia.org/wiki/Bit_banging bit banging driver].&lt;br /&gt;
&lt;br /&gt;
Unfortunately, bit banging is quite slow. This had been expected during the design of the board and the memory card socket was attached to the SSC interface. From the data sheet it looks like it should be possible to use SSC for SPI communication, see next chapter.&lt;br /&gt;
&lt;br /&gt;
== SPI over AT91 SSC ==&lt;br /&gt;
&lt;br /&gt;
Although intended early, it turned out, that SSC will not directly work as SPI. No related Nut/OS driver appeared for several years. The problem was, that the receiver, when started once, will not stop after the first byte or word.&lt;br /&gt;
&lt;br /&gt;
Finally a solution was found by driving the receiver from an external clock and connecting this pin to the transmitter clock. This works, because the transmitter will stop when running out of data. The first SPI bus driver for the SSC interface became available in Nut/OS 5.0.5, which allows to read from or write to [[mmc.html|memory cards]] at full speed. As explained, this requires a minor hardware modification.&lt;br /&gt;
&lt;br /&gt;
[[eir10c_mmc_spi_mod.png|[[File:eir10c_mmc_spi_mod_480px.png]]]]&lt;br /&gt;
Connecting pin 16 with pin 19 at the port A connector allows to drive the SSC receiver with the SSC transmitter clock.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Return to the [[index.html|EIR project page]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Harald</name></author>	</entry>

	</feed>