Utilizing the NanoBoard Flash Memory
Upcoming SlideShare
Loading in...5
×
 

Utilizing the NanoBoard Flash Memory

on

  • 1,793 views

 

Statistics

Views

Total Views
1,793
Views on SlideShare
1,793
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Utilizing the NanoBoard Flash Memory Utilizing the NanoBoard Flash Memory Document Transcript

  • Utilizing the NanoBoard Flash Memory Summary This application note describes how the serial Flash Memory on the NanoBoard-NB1 can be used as embedded Flash memory within an FPGA design. Application Note AP0114 (v2.0) February 29, 2008 The NanoBoard-NB1 provides serial Flash memory for use as embedded memory in an FPGA design, enabling you to load and store an embedded software file that will be used when the target design is running. One example of where such functionality would prove useful is in a design that takes, as input, an audio data file and subsequently processes the data from that file. The audio file would be just the candidate for storage in the memory provided by the NanoBoard. Using Flash Memory for Embedded Storage An 8Mbit Flash memory device (M25P80) is used to provide embedded memory functionality within an FPGA design. This device is component U7 on the NanoBoard-NB1. Wiring the Flash Memory into the FPGA Design When wiring up the schematic in the FPGA design project, the Flash memory device is represented by a Port-Plugin component (SERIALFMEMORY) and is available from the FPGA NB1 Port-Plugin integrated library (FPGA NB1 Port-Plugin.IntLib), located in the LibraryFpga folder of the installation. Figure 1 shows an example of how the Flash memory is wired into a design. Figure 1. Placing the embedded Flash memory in the design. The Flash memory is an SPI-compatible device. The host microcontroller accesses the memory through the SPI Controller, as illustrated in Figure 2. The SPI Controller itself resides within the NanoTalk Controller on the NanoBoard-NB1. The SPI Controller determines who accesses the SPI Bus (NanoTalk Controller, FPGA daughter board or Host Computer (via the parallel port)) and which of the SPI slave devices (Embedded Flash memory, FPGA Boot Flash memory, NanoBoard System Clock) is selected for communications. AP0114 (v2.0) February 29, 2008 1
  • Utilizing the NanoBoard Flash Memory Flash Memory MCU SPI Controller (Embedded) SPI_DOUT SDO SPI_DIN SDI SPI_CLK SCLK SPI_MODE Flash Memory Finite State (FPGA Boot) SPI_SEL Machine CS3 CS2 CS1 Board Clock Figure 2. MCU-to-Flash memory communications. Running the Flash Memory Controller The procedure for loading an embedded software file into the Flash memory can be carried out at any time – with or without an FPGA project open and irrespective of whether a design has currently been programmed into the target FPGA device (on the daughter board). From the Devices view, simply double-click on the icon for the NanoBoard Controller whose associated Embedded Flash memory you wish to load. The Instrument Rack for the NanoBoard Controllers will appear as shown in Figure 3. Figure 3. NanoBoard Controllers Instrument Rack. Note: If you have multiple NanoBoards daisy-chained together, the NanoBoard Controller chain will reflect each detected (powered-up) board. Each NanoBoard Controller in the chain will only appear in the Instrument Rack after its corresponding icon has been specifically double-clicked. On the instrument panel of the required NanoBoard Controller, click on the Embedded button. The Flash RAM Controller For Embedded Software dialog will appear (Figure 4). From this dialog, press the Read Electronic Signature button. This tests the communications link between the NanoBoard Controller and the Flash memory device. If communications are successful, a value will be entered into the field to the immediate right of the button and the confirmatory message “Device Found: M25P80 (8M-Bit Serial Flash RAM)” will be displayed. 2 AP0114 (v2.0) February 29, 2008
  • Utilizing the NanoBoard Flash Memory Figure 4. Flash RAM Controller for Embedded Software dialog. Erasing the Flash Memory Before loading the required embedded software file into the Flash memory device, the memory must first be cleared. To erase the entire 8Mbit of Flash memory, press the Erase Entire Device button in the Flash RAM Controller for Embedded Software dialog. The erasing process will take approximately 5 seconds, after which a confirmation dialog will appear. Figure 5. Confirmation of memory erasure. To verify that the device has been successfully erased, press the Blank Check button in the Flash RAM Controller for Embedded Software dialog. Once the check has been conducted, you will receive another confirmation dialog. Figure 6. Verifying that memory erasure was successful. Programming the Flash Memory Once the Flash memory has been erased, the embedded software file can now be downloaded. From the Flash RAM Controller for Embedded Software dialog, press the … button (located at the top-right of the dialog). The Choose Embedded Software File for Download dialog appears (Figure 7). This dialog allows you to browse for and open the required embedded software file. AP0114 (v2.0) February 29, 2008 3
  • Utilizing the NanoBoard Flash Memory Figure 7. Browsing for the embedded software file to download. After choosing the file and clicking Open, you will be returned to the Flash RAM Controller for Embedded Software dialog. The chosen file (including path) will be displayed, as shown in Figure 8. Figure 8. Embedded software file chosen and ready for download. To download this file to the Flash memory, simply click the Save File To Flash button. The download process will proceed, with progress shown in Altium Designer's Status bar. At the end of the download an information dialog will appear confirming the end of the process (Figure 9). Figure 9. Confirmation of file download to the Flash RAM device. 4 AP0114 (v2.0) February 29, 2008
  • Utilizing the NanoBoard Flash Memory Verification of Download to Flash Memory After you have downloaded the embedded software file to the Flash memory device, a check should be made to ensure the integrity of the file. To do this, from the Flash RAM Controller for Embedded Software dialog, click on the Verify against File button. The contents of the Flash memory are read back and compared against the original embedded software file. The progress for this process is again shown in Altium Designer's Status bar. An information dialog will appear with details of the verification results. Figure 10. Successful verification of downloaded file. If the download process is shown to have failed, the verification will report an error count. A large number of errors typically indicates that the Flash memory device was not successfully erased prior to download of the embedded software file. In this case, try erasing the device again – using the Erase Entire Device button – and then using the Blank Check button to verify that the device's memory has indeed been successfully erased. The embedded software file can then be downloaded again. Revision History Date Version No. Revision 20-Jan-2004 1.0 New product release 25-May-2005 1.1 Updated for Altium Designer SP4 12-Dec-2005 1.2 Path references updated for Altium Designer 6 29-Feb-2008 2.0 Updated for Altium Designer Summer 08 Software, hardware, documentation and related materials: Copyright © 2008 Altium Limited. All rights reserved. You are permitted to print this document provided that (1) the use of such is for personal use only and will not be copied or posted on any network computer or broadcast in any media, and (2) no modifications of the document is made. Unauthorized duplication, in whole or part, of this document by any means, mechanical or electronic, including translation into another language, except for brief excerpts in published reviews, is prohibited without the express written permission of Altium Limited. Unauthorized duplication of this work may also be prohibited by local statute. Violators may be subject to both criminal and civil penalties, including fines and/or imprisonment. Altium, Altium Designer, Board Insight, Design Explorer, DXP, LiveDesign, NanoBoard, NanoTalk, P-CAD, SimCode, Situs, TASKING, and Topological Autorouting and their respective logos are trademarks or registered trademarks of Altium Limited or its subsidiaries. All other registered or unregistered trademarks referenced herein are the property of their respective owners and no trademark rights to the same are claimed. AP0114 (v2.0) February 29, 2008 5