|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-99FC067C-0AED-5373-AF63-8DB7FF5C1F7E" xml:lang="en"><title>SPI Technology Guide</title><shortdesc>This document describes the Serial Peripheral Interface |
|
13 (SPI) technology. The SPI devices are used for fast data exchange |
|
14 between two or more peripherals. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
15 |
|
16 <section id="GUID-B3154A94-3117-5427-BAAD-C402F41AF217"><title>Introduction</title> <p>The SPI is a synchronous serial interface. The SPI supports full |
|
17 duplex communication channel for the devices that use SPI interface. |
|
18 The devices and peripherals that use the SPI interface are described |
|
19 as SPI devices in this document. </p> </section> |
|
20 <section id="GUID-6FAE8B3E-904C-567B-A6CC-5558D417BA66"><title>Architecture</title> <p>In the SPI bus one of the node must be a master device and one |
|
21 or more slave devices. There can be only one slave active at a time. |
|
22 The master device initiates and terminates communication between the |
|
23 SPI devices. The SPI is a full duplex serial data communication. In |
|
24 full duplex communication the data can be transferred between the |
|
25 master and the slave devices simultaneously. </p> <p>The SPI devices |
|
26 can be configured as master or slave. The SPI bus contain four wires. |
|
27 The first one is the serial clock signal sent by the master device |
|
28 to the slave device. The clock signal is used for synchronisation. |
|
29 The Master Output / Slave Input (<codeph>MOSI</codeph>) is used to |
|
30 send data from the master to the slave. The Slave Output / Master |
|
31 Input (<codeph>SOMI</codeph>) is used by the master device to read |
|
32 data from the slave device. The fourth line is the Slave Select (<codeph>SS</codeph>) that is used by the master to select a slave to initiate |
|
33 the communication. </p> <fig id="GUID-E7B96ED2-9814-5B75-8051-48337121F985-GENID-1-2-1-10-1-5-1-6-1-1-6-1-5-1-3-2-4"> |
|
34 <title> SPI Bus </title> |
|
35 <image href="GUID-2AE438CC-F2E4-5FCB-971F-CFFAE5EF81E4_d0e93636_href.png" placement="inline"/> |
|
36 </fig> </section> |
|
37 <section id="GUID-6931A479-BF67-4BF7-8593-712D1770B402"><title>Communication</title> <p>The master device is the node on the SPI bus that initiates and |
|
38 terminates the communication. The master must provide the configuration |
|
39 to the slave devices. The configuration includes the details like |
|
40 the channel number and the data length. The SPI devices uses 4 and |
|
41 8 bit words to communicate. If a slave device or a channel is not |
|
42 available the appropriate error is returned to the master. </p> </section> |
|
43 <section id="GUID-B9575A06-1A72-529D-9023-FAC1ED895A34"><title>Advantages</title> <p>The following are the advantages of the SPI interface: </p> <ul> |
|
44 <li id="GUID-5FFFECEF-BCEA-5A8A-83F1-52E24019B22C"><p>Full duplex |
|
45 synchronous communication </p> </li> |
|
46 <li id="GUID-358181F9-4831-582F-B6F3-06AD09724BCB"><p>Low power requirements |
|
47 compared to the I2C devices </p> </li> |
|
48 <li id="GUID-701BDE22-3306-55EC-96FF-4E8F241CFFD6"><p>Less space compared |
|
49 to the parallel bus </p> </li> |
|
50 <li id="GUID-97E797F6-9228-58AA-984A-D872CCFDD812"><p>Slave devices |
|
51 do not require unique address assigned </p> </li> |
|
52 </ul> </section> |
|
53 <section id="GUID-8EF6A8EA-E813-5EF9-AE61-9ACD7FF8625E"><title>SPI |
|
54 devices</title> <p>Typically the SPI devices are used for data transfers |
|
55 where a delay in the time taken to send the data is acceptable. The |
|
56 clients of the SPI interface are device drivers running on the application |
|
57 specific integrated circuits (ASIC). Some of the peripherals that |
|
58 use SPI interface are: </p> <ul> |
|
59 <li id="GUID-D72EE2AE-A335-53FA-8A5E-DB110D4DDB2A"><p>Touch screens </p> </li> |
|
60 <li id="GUID-E60C872B-5B0B-5973-81FA-F93585859037"><p>Codecs </p> </li> |
|
61 <li id="GUID-4332DFC4-A2BF-5533-8704-6F56EF76C161"><p>Real Time Clocks </p> </li> |
|
62 <li id="GUID-DDFD3CB6-9696-504C-B23F-698873FA075E"><p>Built-in cameras </p> </li> |
|
63 <li id="GUID-DA624D60-DEDD-56F0-BC77-13FCBDB0D959"><p>Flash memory |
|
64 like MMC and SD cards </p> </li> |
|
65 </ul> </section> |
|
66 </conbody><related-links> |
|
67 <link href="GUID-B2F86F54-EF50-56DB-ADF7-15325AC9324D.dita"><linktext>IIC |
|
68 Concepts</linktext></link> |
|
69 </related-links></concept> |