AN531 - uSDCARD SPI Adaptor for V2M-MPS2+

Application Note 531



Release Information

The following changes have been made to this Application Note.

Change History

Date

Issue

Confidentiality

Change

29/03/2017

A

Non-Confidential

First release

 

Non-Confidential Proprietary Notice

This document is protected by copyright and other related rights and the practice or implementation of the information contained in this document may be protected by one or more patents or pending patent applications. No part of this document may be reproduced in any form by any means without the express prior written permission of ARM. No license, express or implied, by estoppel or otherwise to any intellectual property rights is granted by this document unless specifically stated.

Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use the information for the purposes of determining whether implementations infringe any third party patents.

THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, ARM makes no representation with respect to, and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or other rights.

This document may include technical inaccuracies or typographical errors.

TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to ARM’s customers is not intended to create or refer to any partnership relationship with any other company. ARM may make changes to this document at any time and without notice.

If any of the provisions contained in these terms conflict with any of the provisions of any signed written agreement covering this document with ARM, then the signed written agreement prevails over and supersedes the conflicting provisions of these terms. This document may be translated into other languages for convenience, and you agree that if there is any conflict between the English version of this document and any translation, the terms of the English version of the Agreement shall prevail.

Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM Limited or its affiliates in the EU and/or elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective owners. Please follow ARM’s trademark usage guidelines at http://www.arm.com/about/trademark-usage-guidelines.php

Copyright © [2015], ARM Limited or its affiliates. All rights reserved.

ARM Limited. Company 02557590 registered in England.

110 Fulbourn Road, Cambridge, England CB1 9NJ.

LES-PRE-20349

                                                                                                                                                                                                                                                                    


1     Conventions and Feedback

The following describes the typographical conventions and how to give feedback:

Typographical conventions

The following typographical conventions are used:

monospace      denotes text that you can enter at the keyboard, such as commands, file and program names, and source code.

monospace      denotes a permitted abbreviation for a command or option. You can enter the underlined text instead of the full command or option name.

monospace italic
denotes arguments to commands and functions where the argument is to be replaced by a specific value.

monospace bold
denotes language keywords when used outside example code.

italic               highlights important notes, introduces special terminology, denotes internal cross-references, and citations.

bold                highlights interface elements, such as menu names. Denotes signal names. Also used for emphasis in descriptive lists, where appropriate.

Feedback on this product

If you have any comments and suggestions about this product, contact your supplier and give:

·         Your name and company.

·         The serial number of the product.

·         Details of the release you are using.

·         Details of the platform you are using, such as the hardware platform, operating system type and version.

·         A small standalone sample of code that reproduces the problem.

·         A clear explanation of what you expected to happen, and what actually happened.

·         The commands you used, including any command-line options.

·         Sample output illustrating the problem.

·         The version string of the tools, including the version number and build numbers.

Feedback on documentation

If you have comments on the documentation, e-mail errata@arm.com. Give:

·         The title.

·         The number, DAI0531A.

·         If viewing online, the topic names to which your comments apply.

·         If viewing a PDF version of a document, the page numbers to which your comments apply.

·         A concise explanation of your comments.

ARM also welcomes general suggestions for additions and improvements.

ARM periodically provides updates and corrections to its documentation on the ARM Information Center, together with knowledge articles and Frequently Asked Questions (FAQs).

Other information

·         ARM Information Center, http://infocenter.arm.com/help/index.jsp

·         ARM Technical Support Knowledge Articles, http://infocenter.arm.com/help/topic/com.arm.doc.faqs/index.html

·         ARM Support and Maintenance,

http://www.arm.com/support/services/support-maintenance.php

·         ARM Glossary, http://infocenter.arm.com/help/topic/com.arm.doc.aeg0014g/index.html

The ARM Glossary is a list of terms used in ARM documentation, together with definitions for those terms.  The ARM Glossary does not contain terms that are industry standard unless the ARM meaning differs from the generally accepted meaning.

 

1.1         Terms and abbreviations

Term

Meaning

MISO

MOSI

MPS2+

SPI

SMM

uSDCARD

 

Master In, Slave Out (The V2M-MPS2+ is Master)

Master Out, Slave In (The SDCard is Slave)

Cortex-M Prototyping System+

Serial Peripheral Interface

Soft Macrocell Model, FPGA implementation of a processor subsystem

Micro Secure Digital Card

 

2     Overview

2.1      Purpose of this application note

This application note details installation of the uSDCARD SPI Adaptor which provides a user storage device visible to processor SMMs loaded in to the Cortex-M Prototyping System (MPS2+) Motherboard.

2.2       Requirements

To use this adaptor you will require a SPI controller to be implemented in the FPGA design, such as the ARM® SSP primecell, PL022.  An example of this can be found in the MPS2+ default SMM, Appnote AN385.  

Software access to the SPI interface is supported by the ARM®  MBED API libraries.   

2.3      References

·          ARM® Versatile™ Express Cortex®-M Prototyping System+ (MPS2+)Technical Reference Manual

http://infocenter.arm.com/help/topic/com.arm.doc.100112_0200_06_en/index.html

·          ARM®PrimeCell Synchronous Serial Port (PL022) Technical Reference Manual

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0194g/I1005344.html

 

·          Application Note AN385, ARM® Cortex®-M3 SMM on V2M-MPS2+

http://infocenter.arm.com/help/topic/com.arm.doc.dai0385d/DAI0385D_cortex_m3_on_v2m_mps2.pdf

·          ARM® MBED API

https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/interfaces/digital/SPI/#interface

 

 

3     Getting Started

The uSDCARD SPI Adaptor kit should have arrived with the following contents:

1.     uSDCARD SPI Adaptor Board

2.     PCB spacer, male, 6 mm, M3

3.     PCB spacer, female, 11 mm, M3

4.     Screw, steel, 6mm, M3

5.     2GB uSD card

 

The steps below show you how to set up the adapter board on the MPS2+ Motherboard.

 

  1. Remove the plastic spacer, supplied with MPS2+ Motherboard, from the mounting hole (Figure 3-1).  

 

Image

Figure 31 : Plastic spacer removal

 

2.       Replace them with the two spacers provided with the Adaptor board as shown in Figure 3-2

 

Image

Figure 32 : Spacers replacement

 

 

 

 

 

 

3.       Plug the adaptor in to J21 of the V2M-MPS2+ motherboard.

  

Image

Figure 33 : Fit the Adaptor

 

4.       Place the supplied SD card in to the adaptor connector slot and push in then release, possibly repeating until it latches.   

 

Image

Figure 34 : Placing Card in Adapter board

 


 

4     PIN MAPPING

 

Image 

Figure 41 : SD Card to Adaptor to V2M-MPS2+ pin mapping

 

5     SCHEMATIC

 

Image

 

Figure 5‑1 : SD Card to Adaptor Schematic

 

6     CONNECTIVITY

 Table 5‑1 represents connectivity between MPS2+ SPI port, Adaptor and SDCard.

MPS2+ FPGA

Pin

MPS2+ Header

Signal

MPS2+ Header Pin

Adaptor Signal

Adaptor Pin

SDCard

Signal

SDCard

Pin

GND

GND

J22, 1

GND

J2, 1

GND

6

AG8

SPI_SCK (Clock)

J22, 2

SCK

J2, 2

CLK

5

K25

SPI_MISO (Master In, Slave Out)

J22, 3

DO

J2, 3

MISO_D0

7

T25

SPI_nSS (not Select)

J22, 4

nCS

J2, 4

nCS_D3

2

3V

3V

J22, 5

3V

J2, 5

3V3

4

AF30

SPI-MOSI (Master Out, Slave In)

J22, 6

DI

J2, 6

MOSI_CMD

3

Table 51 : Connectivity

 

 

Copyright © 2017 ARM Limited. All rights reserved. ARM DAI0531A
Non-Confidential