Accessing Serial Flash Memory Using SPI Interface Su pe rs ed ed Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA Accessing Serial Flash Memory Using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA Table of Contents Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 ed ed Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Tutorial Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Associated Project Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Target Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Design Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 1: Creating a Libero SoC Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Launching Libero SoC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Connecting Components in SPI_Flash_top SmartDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Configuring and Generating Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Step 2: Generating the Program File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Step 3: Programming the SmartFusion2 Board Using FlashPro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Step 4: Building the Software Application using SoftConsole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Step 5: Configuring Serial Terminal Emulation Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Step 6: Debugging the Application Project using SoftConsole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Appendix A - Board Setup for Running the Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 rs Appendix B - SmartFusion2 Development Kit Board Jumper Locations . . . . . . . . . . . . . . . . . . . . . . . . . 32 Product Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Su pe Customer Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Customer Technical Support Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Contacting the Customer Technical Support Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . My Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outside the U.S. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ITAR Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Revision 1 33 33 33 33 33 33 34 34 34 2 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA Introduction ed ed The Libero® System-on-Chip (SoC) software generates firmware projects using SoftConsole, IAR, and Keil tools. This tutorial describes the process to build a SoftConsole application that can be implemented and validated using the SmartFusion®2 system-on-chip (SoC) field programmable gate array (FPGA) Development Kit. The same firmware project can be built using IAR and Keil tools. Refer to the respective tutorials: • Accessing Serial Flash Memory using SPI Interface - Libero SoC and IAR Embedded Workbench Flow Tutorial for SmartFusion2 SoC FPGA • Accessing Serial Flash Memory Using SPI Interface - Libero SoC and Keil uVision Flow Tutorial for SmartFusion2 SoC FPGA After completing this tutorial, you will be able to perform the following tasks: • Create a Libero SoC project using System Builder • Generate the programming file to program the SmartFusion2 device Open the project in SoftConsole from Libero SoC • Compile application code • Debug and run code using SoftConsole rs • Tutorial Requirements pe Table 1 • Reference Design Requirements and Details Reference Design Requirements and Details Description Hardware Requirements • SmartFusion2 Development Kit Rev C or later – FlashPro4 programmer Su – USB A to Mini-B cable – 12 V adapter Host PC or Laptop Any 64-bit Windows Operating System Software Requirements Libero SoC • SoftConsole v3.4 • FlashPro programming software v11.3 11.3 USB to UART drivers - One of the following serial terminal emulation programs: - • HyperTerminal • TeraTerm • PuTTY Revision 1 3 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA Associated Project Files Download the associated project files for this tutorial from the Microsemi® website: http://soc.microsemi.com/download/rsc/?f=SF2_SPI_Flash_SC_Tutorial_DF The demo design files include: • Libero project • Programming files • Source files • Flash drivers • Readme file Target Board ed ed Refer to the Readme.txt file provided in the design files for the complete directory structure. SmartFusion2 Development Kit board (SF2_DEV_KIT) Rev C (or later). Design Overview This design example demonstrates the execution of basic read and write operations on the SPI flash present on the SmartFusion2 Development Kit board. This kit has a built-in Atmel SPI flash memory AT25DF641, which is connected to the SmartFusion2 microcontroller subsystem (MSS) through dedicated MSS SPI_0 interface. The SPI flash memory transfers are performed using the peripheral direct memory access (PDMA). Read and write data information is displayed using HyperTerminal which communicates to the SmartFusion2 MSS using the MMUART_1 interface. rs For more information on SPI, refer to the SmartFusion2 Microcontroller Subsystem User Guide. Figure 1 shows interfacing the external SPI flash to MSS SPI_0. 008$57BB5;' Su +\SHU7HUPLQDO 066 63,BB'2 WH[W )DEULF Figure 1 • SPI Flash Interfacing Block Diagram 4 R e vi s i o n 1 63,B +RVW3& 008$57BB7;' 008$57B pe 6PDUW)XVLRQ 63,BB&/. 63,BB662 63,BB', 6, 6&. &6 62 ([WHUQDO)ODVK 0HPRU\ Step 1: Creating a Libero SoC Project Step 1: Creating a Libero SoC Project Launching Libero SoC 1. Click Start > Programs > Microsemi Libero SoC v11.3 > Libero SoC v11.3, or click the shortcut on desktop to open the Libero SoC v11.3 Project Manager. rs ed ed 2. Create a new project by selecting New on the Start Page tab (highlighted in Figure 2), or by clicking Project > New Project from the Libero SoC menu. Figure 2 • Libero SoC Project Manager pe 3. Enter the information as required for the new project and the device in the New Project dialog box as shown in Figure 3. – Project - Name: SPI_Flash - Location: Select an appropriate location (for example, D:/Microsemi_prj) - Preferred HDL type: Verilog Device (select the following values using the drop-down list provided): Su – - Family: SmartFusion2 - Die: M2S050T - Package: 896 FBGA - Speed: STD - Core Voltage: 1.2 – Operating conditions: COM Revision 1 5 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA Su pe rs ed ed 4. Check the Use Design Tool check box and select Use System Builder in the Design Templates and Creators section of the New Project window as shown in Figure 3. Figure 3 • New Project Dialog Box Note: System Builder is a graphical design wizard. It creates a design based on high-level design specifications by taking the user through a set of high-level questions that will define the intended system. 6 R e vi s i o n 1 Step 1: Creating a Libero SoC Project 5. Clicking Edit Tool Profiles (highlighted in Figure 3 on page 6) displays the Tool Profiles window as shown in Figure 4. Check the following tool settings: Software IDE: SoftConsole – Synthesis: Synplify Pro ME I-2013.09M-SP1 – Simulation: ModelSim ME 10.2c – Programming: FlashPro 11.3 ed ed – Figure 4 • Tool Profiles 6. Click OK on the Tool Profiles window. 7. Click OK on the New Project window. This displays the System Builder dialog box. Su pe rs 8. Enter a name for your system, enter SPI_Flash as the name of the system and click OK. The System Builder dialog box is displayed with the Device Features page open by default, as shown in Figure 5. Figure 5 • Create New System Builder Dialog Box Revision 1 7 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA pe rs ed ed 9. In the System Builder – Device Features page, check the Peripheral DMA check box under Microcontroller Options as shown in Figure 6. Su Figure 6 • System Builder – Device Features Page 8 R e vi s i o n 1 Step 1: Creating a Libero SoC Project pe rs ed ed 10. Click Next. The System Builder – Peripherals page is displayed. Under the MSS Peripherals section, uncheck all the check boxes except MM_UART_1 and MSS_SPI_0, as shown in Figure 7. Su Figure 7 • System Builder Configurator – Peripherals Page Revision 1 9 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA pe rs ed ed 11. Configure MMUART_1 for Fabric by clicking on the MM_UART_1 configurator highlighted as shown in Figure 8. Figure 8 • System Builder – Peripherals Page Su 12. In the MM_UART_1 configurator window, select Fabric from the Connect To drop-down list, as shown in Figure 9. 10 R e visio n 1 Su pe rs Figure 9 • Configuring MM_UART_1 ed ed Step 1: Creating a Libero SoC Project Revision 1 11 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA pe rs ed ed 13. Click Next. The System Builder – Clocks page is displayed, as shown in Figure 10. Select System Clock source as On-chip 25/50 MHz RC Oscillator. The M3_CLK is configured to 100 MHz by default. Figure 10 • System Builder – Clocks Page 14. Click Next. The System Builder – Microcontroller page is displayed. Leave all the default selections. 15. Click Next. The System Builder – SECDED page is displayed. Leave all the default selections. 16. Click Next. The System Builder – Security page is displayed. Leave all the default selections. Su 17. Click Next. The System Builder – Interrupts page is displayed. Leave all the default selections. 18. Click Next. The System Builder – Memory Map page is displayed. Leave all the default selections. 19. Click Finish. 12 R e visio n 1 Step 1: Creating a Libero SoC Project ed ed The System Builder generates the system based on the selected options. The System Builder block is created and added to the Libero SoC project automatically, as shown in Figure 11. Figure 11 • System Builder Generated System Connecting Components in SPI_Flash_top SmartDesign Perform the following steps to connect the SmartDesign components: 1. Right-click FAB_RESET_N and select Tie High. 2. Right-click POWER_ON_RESET_N and select Mark Unused. 3. Right-click MSS_READY and select Mark Unused. 4. Right-click MMUART_1_FABRIC and select Promote to Top Level. 5. Expand INIT_PINS, right-click INIT_DONE and select Mark Unused. rs 6. Expand FAB_CCC_PINS, right-click FAB_CCC_GL0 and select Mark Unused. Su pe 7. Click File > Save. The SPI_Flash_top design is displayed as shown in Figure 12. Figure 12 • SPI_Flash_top Design Revision 1 13 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA Configuring and Generating Firmware The Design Firmware window displays compatible firmware drivers based on peripherals configured in the design. Following drivers are used in this tutorial: • CMSIS • MMUART • PDMA • SPI 1. To generate the required drivers click Design > Configure Firmware and uncheck all drivers except CMSIS, MMUART, PDMA, and SPI as shown in Figure 13. Figure 13 • Configuring Firmware ed ed Note:Select the latest version of the drivers. pe rs 2. From the SPI_Flash_top tab, click Generate Component, as shown in Figure 14. Figure 14 • Generate Component Su If the design is generated without any errors, a message, ’SPI_Flash_top’ was generated is displayed on the Libero SoC Log window as shown in Figure 15. Figure 15 • Log Window 14 R e visio n 1 Step 2: Generating the Program File Step 2: Generating the Program File rs Figure 16 • I/O Constraints ed ed 1. Double-click I/O Constraints in the Design Flow window as shown in Figure 16. The I/O Editor window is displayed after completing Synthesize and Compile. 2. In the I/O Editor window, make the pin assignments as shown in Table 2. Table 2 • Port to Pin Mapping pe Port Name Pin Number R29 MMUART_1_TXD_M2F R24 Su MMUART_1_RXD_F2M Revision 1 15 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA ed ed These pin assignments are for connecting MMUART_1 ports TX and RX to the mini-B USB through fabric I/Os. After the pins are assigned, the I/O Editor window is displayed as shown in Figure 17. Figure 17 • I/O Editor 3. After updating the I/O Editor, click Commit and Check. rs 4. Close the I/O Editor window. pe 5. Click Generate Programming Data as shown in Figure 18 to complete place-and-route and generate the programming file. Su Figure 18 • Generate Programming Data Step 3: Programming the SmartFusion2 Board Using FlashPro 1. Connect the FlashPro4 programmer to the J59 connector of the SmartFusion2 Development Kit. 2. Connect the jumpers on the SmartFusion2 Development Kit board as listed in Table 3 on page 17. For more information on jumper locations, refer Appendix B - SmartFusion2 Development Kit Board Jumper Locations. CAUTION: While making the jumper connections, the SW7 power supply switch on the board must be in OFF position. 16 R e visio n 1 Step 3: Programming the SmartFusion2 Board Using FlashPro Table 3 • SmartFusion2 Development Kit Jumper Settings Jumper Number Settings Notes J70, J93, J94, J117, J123, J142, J157, J160, J167, J225, J226, J227 1-2 closed J2 1-3 closed J23 2-3 closed J121, J110, J119, J118 1-2 closed These are the default jumper settings of the Development Kit. Ensure that these jumpers are set properly. To connect the SmartFusion2 SPI0 to the external flash 3. Connect the power supply to the J18 connector. ed ed 4. Switch ON the SW7 power supply switch. Refer to Appendix A - Board Setup for Running the Tutorial for information on board setup for running the tutorial. Su pe rs 5. To program the SmartFusion2 device, double-click Run PROGRAM Action in the Design Flow window as shown in Figure 19. Figure 19 • Run Programming Action Revision 1 17 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA Step 4: Building the Software Application using SoftConsole Su pe rs ed ed 1. After successful programming, open the SoftConsole project by double-clicking Write Application Code under Develop Firmware in the Design Flow window as shown in Figure 20. Figure 20 • Invoking SoftConsole from the Libero SoC Software 18 R e visio n 1 Step 4: Building the Software Application using SoftConsole rs Figure 21 • SoftConsole Workspace ed ed The SoftConsole workspace is displayed, as shown in Figure 21. 2. Browse to the main.c file location in the design files folder: <download folder>\SF2_SPI_Flash_SC_Tutorial_DF\Source Files. Su pe 3. Copy the main.c file and replace the existing main.c file under SPI_Flash_MSS_CM3_app project in the SoftConsole workspace. Revision 1 19 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA ed ed The SoftConsole window displays the main.c file, as shown in Figure 22. rs Figure 22 • SoftConsole Workspace main.c file 4. at25df641 SPI flash drivers are not included in the Libero generated SoftConsole workspace. To include the drivers in the SoftConsole workspace, browse to the location of the at25df641 drivers in the design files folder: <download_folder>\SF2_SPI_Flash_SC_Tutorial_DF\SPI_Flash_Drivers. Su pe 5. Copy the at25df641 folder to the drivers folder of SPI_Flash_MSS_CM3_hw_platform project in the SoftConsole workspace, as shown in Figure 23. Figure 23 • Project Explorer window 20 R e visio n 1 Step 4: Building the Software Application using SoftConsole This tutorial uses printf statements to display memory read data. Redirection of the output of printf() to a UART is enabled by adding the MICROSEMI_STDIO_THRU_UART symbol. pe rs ed ed 6. Right-click the SPI_Flash_MSS_CM3_hw_platform in Project Explorer window of SoftConsole project and select Properties as shown in Figure 24. Figure 24 • Project Explorer window - Properties Su 7. In Properties window, select Settings under C/C ++ Build. 8. Select Symbols under GNU C Compiler. Revision 1 21 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA rs ed ed 9. To add a symbol, click Add and enter MICROSEMI_STDIO_THRU_UART in the Add Symbol dialog box and click OK. Figure 25 • SPI_Flash_MSS_CM3_HW_Platform Properties window Su pe 10. Click Apply to save the changes made and click OK to close the Properties window. 22 R e visio n 1 Step 5: Configuring Serial Terminal Emulation Program rs ed ed 11. Perform a build by selecting Project > Clean. Leave the default settings in the Clean dialog box and click OK, as shown in Figure 26. Figure 26 • Settings for a clean build pe Note: Ensure that there are no errors. Step 5: Configuring Serial Terminal Emulation Program Su 1. Install the USB driver. For serial terminal communication through the FTDI mini USB cable, install the FTDI D2XX driver. Download the drivers and the installation guide from: www.microsemi.com/soc/documents/CDM_2.08.24_WHQL_Certified.zip. Revision 1 23 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA pe rs ed ed 2. Connect the host PC to the J24 connector using the USB Mini-B cable. The USB to UART bridge drivers are automatically detected. Of the four COM ports, select the one with Location as on USB Serial Converter D. Figure 27 shows an example Device Manager window. Figure 27 • Device Manager Window Su 3. Start the HyperTerminal session. If the HyperTerminal program is not available in the computer, any free serial terminal emulation program such as PuTTY or Tera Term can be used. Refer to the Configuring Serial Terminal Emulation Programs Tutorial for configuring the HyperTerminal, TeraTerm, or PuTTY. The HyperTerminal settings are as follows: 24 – 57,600 baud rate – 8 data bits – 1 stop bit – No parity – No flow control R e visio n 1 Step 6: Debugging the Application Project using SoftConsole Step 6: Debugging the Application Project using SoftConsole rs Figure 28 • Debug Configurations ed ed 1. Select Debug Configurations from the Run menu of the SoftConsole. The Debug Configurations dialog box is displayed. Double-click Microsemi Cortex-M3 Target to view the configurations, as shown in Figure 28. 2. Ensure that the following values are filled in the corresponding fields: – Name: SPI_Flash_MSS_CM3_app Debug – Project (optional): SPI_Flash_MSS_CM3_app – C/C++ Application: Debug\ SPI_Flash_MSS_CM3_app pe 3. Click Debug. Su 4. On the Confirm Perspective Switch window, click Yes, as shown in Figure 29. Figure 29 • Confirm Perspective Switch Revision 1 25 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA pe rs ed ed 5. The SoftConsole Debugger Perspective window is displayed, as shown in Figure 30. Su Figure 30 • SoftConsole Debugger Perspective 26 R e visio n 1 Step 6: Debugging the Application Project using SoftConsole rs ed ed 6. Run the application by clicking Run > Resume. Read data from SPI Flash is displayed along with a greeting message on the HyperTerminal, as shown in Figure 31. Figure 31 • HyperTerminal Window pe 7. Terminate execution of the code by choosing Run > Terminate. Su 8. Launch the debug session by selecting Debug Configurations from the Run menu of SoftConsole. Revision 1 27 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA ed ed 9. Click the Registers tab to view the values of the ARM® Cortex™-M3 processor internal registers, as shown in Figure 32. Figure 32 • Values of Cortex-M3 Internal Registers Su pe rs 10. Click the Variables tab to view the values of variables in the source code, as shown in Figure 33. Figure 33 • Values of the Variables in the Source Code 28 R e visio n 1 Step 6: Debugging the Application Project using SoftConsole pe rs ed ed 11. In the Debug window, select Window > Show View > Disassembly to display the assembly level instructions. The Disassembly window with assembly instructions is displayed on the right-side of the Debug perspective, as shown in Figure 34. Figure 34 • Assembly Level Instructions Su 12. Source code can be single-stepped by choosing Run > Step Into or Run > Step Over. Observe the changes in the source code window and Disassembly view. Performing a Step Over provides an option for stepping over functions. The entire function is run but there is no need to single-step through each instruction contained in the function. 13. Click Instruction Stepping ( ) and perform Step Into operations. Observe that Step Into executes a single line of assembly code. 14. Click Instruction Stepping to exit the instruction stepping mode. Single-step through the application and observe the instruction sequence in the source code window of the Debug perspective, and the values of the variables and registers. 15. Add breakpoints in the application to force the code to halt, then single-step and observe the instruction sequence. 16. When debug process is finished, terminate execution of the code by choosing Run > Terminate. 17. Close Debug Perspective by selecting Close Perspective from the Window menu. 18. Close SoftConsole using File > Exit. 19. Close the HyperTerminal using File > Exit. Revision 1 29 Accessing Serial Flash Memory using SPI Interface Libero SoC and SoftConsole Flow Tutorial for SmartFusion2 SoC FPGA Conclusion Su pe rs ed ed This tutorial provides steps to create a Libero SoC design using the System Builder. It describes the procedure to build, debug, and run a SoftConsole application. It also provides a simple design to access SPI flash. 30 R e visio n 1 Appendix A - Board Setup for Running the Tutorial Su pe rs ed ed Figure 1 shows the board setup for running the tutorial on the SmartFusion2 Development Kit board. Figure 1 • SmartFusion2 Development Kit Setup Revision 1 31 Appendix B - SmartFusion2 Development Kit Board Jumper Locations B11 B14 J1 J10 R26 C7 R27 R25 R24 R23 C42 6 AT FLAG DS10 R55 R36 R56 DS11 PGOOD R52 R35 OFF D5 D6 3 1 ON C44 SC1 U15 R104 L5 C58 R130 D11 R132 U20 J44 C71 R131 SC2 SC3 SC4 R123 C61 C68 R102 R103 R100 J29 R111 R112 R22 R21 C6 CONN1 C32 C33 R50 R80 R113 R81 R114 DS16 P1LED3 J31 DS17 P1LED2 R82 DS18 P1LED1 DS19 P1LED0 R83 DS12 P0LED3 DS13 P0LED2 DS14 P0LED1 DS15 P0LED0 R150 R151 R152 R157R153 R154 C78 C79 R158R155 J67 R137 C74 R143 J80 1P0V_PHY C67 1 DS22 J103 U33 C84 GND T2 J112 1 R170 789 J132 Q18 DS25 J116 1 R185 R184 4 HPOUTCLK5 R32 R46 R93 R94 C76 C75 C73 C72 C69 C62 C60 C59 SW8 J82 U36 R178 R179 R189 C105 U37 GND 123 L10 TXP0 TXN0 RXP0 RXN0 TXP2 TXN2 TXP1 TXN1 RXN1 RXP1 TXP3 TXN3 C119 C120 C121 C94 C95 R182 R183 1 A B C D E F G H J J142 1 J186 J182 J171 C134 J150 J148 J149 J169 J191 RXN2 RXP2 RXN3 RXP3 D14 J190 J189 TP14 J192 TP25 TS_MDIO J185 TS_MDC J170 R219 J156 J166 J168 U45 R220 R221 R243 R242 1 R247 R244 1P0V_PHY R238 R239 R240 R241 C152 C153 R278 R279 J147 J151 C128 C129 C130 C131 L13 J160 RS6 1 J167 1 1 R256 J211 Q24 R383 Q23 R381 R380 Q22 R382 Q21 Q25 Q26 Q27 1 DDR3_1P5V TP21 R354 R355 D18 R365 C204 R366 D20 TP20 J207 U61 D17 C200 C202 DVDD12 R375 D15 R350 TP24 C198 D16 R339 R346 TP12 U59 R338 C186 R353 J220 J229 1 GND R325 U60 2P5V_LDO R326 C191 R356 C189 LED8 LED7 R374 R364 LED5 R372 R362 LED6 R373 R363 LED4 R371 R361 J219 J228 Q20 J206 J205 SERDES1 REFCLK0_N J208 GND LED2 R369 R359 LED1 R368 R358 Q15 C111 R670 R230 J177 1 C150 C151 R276 R277 R274 R275 POE PWR ENB J16 R30 J15 J14 C28 C29 R45 R47 R48 R49 1 2 4 R149 R662 R203 R204 R206 R207 R217 C148 C149 C146 R2 C147 66 R2 86 R282 R283 U56 R312 3P3V_LDO J230 J152 SF2 DEV KIT R367 R357 1 C70 T1 GND 1 DDR3_VTT R377 R385 1 Q14 ON DVP-102-000400-001 REFCLK0_P RevC U55 POE CONN J6 TP10 R29 C91 C92 J117 C173 R311 1 J224 R384 B1 C98 C159 U54 C184 GND C203 R212 C103 C104 R680 R681 R678 R679 R677 R675 C172 3 TP7 C164 TP22 R376 2 PLLXVDDA 3 J233 VPP 1 J227 1 A B C D E F G H KJ L M N J226 3 R187 R280 U51 C167 789 123 789 A B DC E F G H J K L M N PLLMDDRVDDA R329 C188 J234 J130 123 789 J225 R319 R320 R317 R318 C177 C178 C182 C183 R340 C192 J223 R341 R342 1 R335 R336 C190 R337 R351 R344 R345 C195 2 1 C199 J222 R343 C196 R348 R349 R352 C201 1 J215 R290 R291 C187 J217 R295 R332 R296 R333R334 1 R299 R302 R303 R304 R305 R306 R307 R308 R309 123 A B DC E F G H J K L M N C197 C193C194 J216 J203 R281 R226 R229 R231 R232 R234 R235 R236 R237 R267 R269 R268 C162 R310 1 1 V2J21 M2 J20 M2J20 H2 J19G3 J196 H2J19 J2 J18 J3 J18 J2 J17 K2 J174 9 4 8 7 0 3 6 8 4 63 4 9 5 1 7 9 0 R287 C160 R288 U53 R328 R331 R330 U58 8 R289 C143 J212 R322R314 R323 C185 R327 R293 R300R294 C169C166 U50 U52 J204 1 C180 C176 GND U57 DB9-RS232 1 ANALOG INPUT J218 1 1 HDR-RS485 R347 C175 R315 R313 R316 C179 R324 1 U42 R270 C63 D10 GND_0 C54 J153 R218 RS5 TP29 C51 7 7 U62 L15 C171 1 C174 1 L12 R213 R215 A1 R97 TP13 SW10 A30 C37 R74 C48 R86 1 2 20 J221 19 1 J172 K23 J175 L26 J179 H26 J184 J29 J188 H30 J195 H28 J197 G29 J200 F30 J202 K25 J210 L23 J214 N23 ON U40 3 J193 C165 C181 R321 5 R284 TP26 VDDIO R292 C168 R298 R297 C170 R301 U48 1 J128 J125 RS4 C40 C43 C77 R671 R181 R186 R188 J126 J127 J124 RS3 C38 GND R166 R167 R168 Y3 R180 J123 C114 85 R2 R248 R255 C144 R264 C161 C163 AK1 R205 Q19 3 1 Su C141 R251 AK30 J139 P24 J141 N26 J144 M27 J146 L29 J155 L28 J159 K30 J162 J27 C125 R271 C155 R272 R249 R273 C142 C158 PCIEXVDD LED3 R370 R360 3 3 3 R177 L8 PLLFDDRVDDA R674 R673 R672 R676 R378 J173 J180 1 1 1 C97 C101 C102 L7 2 1 50 MHZ R379 3 C100 C96 pe J13 D12 1 R202 R192 DS26 C110 C108 R193 DS27 C112 HVDD C117 C118 R200 R197 J157 TP28 R208 R209 R210 R211 R199 C123 C124 TP27 R261 C139 R262 R245 C154 R263 C126 C127 U47 C137 1 C145 R259 R260R250 1 J138 P23 J140 N25 J143 N24 J145 M26 J154 L30 J158 K29 C133 J161 K28 1 J165 C93 C99 1 3 R175 R176 65 R2 U49 J198 L14 R227 C140 R246 R254 HVDD R252 R253 R257 R258 R233 J181 C156 C157 1 J176 4 3 C138 R190 HVSS U39 U38 J113 R222 J164 U46 2 C136 J121 5 USB MICRO AB OTG Support 1 5 1 J163 J137 D13 R216 HVSS R223 R225 C132 R224 U44 R228 1 W28 R29 R24 C113 1 CR4 P1 C135 R214 1 R196 R198 1 TP3 1 U43 CR3 R195 U41 C107 R159 R160 J105 R28 4 R201 TP5 - - C80 Y1 3 C115 C116 TP4 C106 R194 1 R60 R61 J104 R172 R173 J115 AA29 J119 Y30 J122 M23 J131 T27 J134 T26 J135 V23 J232 U24 3 R146 U23 4 J81 3 1 4 3 J111 V24 20 D7 U10 R69 R70 R73 R78 C46 J49 A14 P14 C39 Q13 P3LED2 TC2 P3LED3 TC1 TC4 P3LED1 J32 P3LED0 TC3 TC6 P2LED3 P2LED2 TC5 TC7 P2LED0 R121 A1 R161 R162 Y2 1J106 U19 P1 REFCLK0_P REFCLK0_N SERDES0 C85 C86 C87 C88 C89 C90 3 GND R59 TP30 GND_C 2 L11 C122 R191 1 C66 J70 2 U27 SW9 JTAG SEL R663 1 J54 R148 LED9 RST LED J59 C81 C82 U28 U22 R85 J30 1 1 R117 R118 R119 R122 R125 R126 R127 R129 R133 R135 R136 R138 R139 R141 R144 R145 A12 1 C109 J13 J12 SW1 R53 R54 R39 SW4 R38 J19 J26 GND J37 1 J38 J43 1 U25 J94 1 ZL RST 12 J4 10 U34 L9 J120 6 6 rs J99 J102 J101 J100 R174 RESET 1 1 V22 J110 AA28 J114 W27 J118 TP8 DS24 1 J93 RS2 R171 FP4 HEADER U31 J91 J88 J60 J66 J98 REMOTE PWR ENB DS23 9 R147 C83 U35 U69 1 J79 U32 J83 J92 R165 GND 1 R664 R169 1 Q17 1 J109 1 R163 U29 J78 J84 J89 J90 J34 J75 U30 J77 J87 J61 J95 J231 J63 J42 J76 J71 J40 J53 J69 J64 U26 1 J74 M12 R76 SW6 R58 L4 R64 R66 R68 TP11 17 1 J62 J68 R156 J73 R134 10 7 20 5 J86 J97 J85 J58 R142 J96 J65 GND 2 10 SFP CONN A1 R62 R65 GND 19 R128 GND J107 J108 U24 J57 J56 9 1 J55 L6 R140 J72 2 20 U21 X1 J45 19 J51 3 1 2 J48 J41 J39 C64 1 C65 U18 J50 R164 U8 J28 RS1 J35 1 1 DB9-CAN2 20 R115 1 5 U12 J27 C55 U17 R120 J47 1 REFP6 ETM HEADER R51 U9 R67 R71 R72 R75 R77 R79 R84 C49R87 J33 C50R88 R89 R90 R106 R107 R108 R109 R110 R95 C52 R91 C53 R92 D8 R98 U11 R105 D9 C56 DB9-CAN1 DS21 GND J46 2 1 5 R116 J36 R124 REFP5 C47 1.2V VDD_REG J11 R14 SW3 C35 J18 1 DS20 J20 3 J21 3 J22 3 J25 3 RVI HEADER U14 U13 1 TP15 R101 TP19 C57 J52 R63 Q12 J23 C45 3P3V_LDO U16 M1 R44 5 TP2 J17 U7 C34 12 J5 Q10 C20 U4 C27 1.0V CR2 FTDI INTERFACE R96 J24 1 6 17 J7 R37 R33 C25 C26 C23 C24 R41 C30 R42 C31 R43 3 CR1 1 7 C694 1 1 SW7 C41 1 C21 R57 ON USB MINI B TP1 SW2 SW5 R13 C17 C18 U5 R99 Q11 C10 C13 C19 C16 L3 R34 4 J9 1 GND 10 C22 1 HPDIFFN4 HPDIFFP4 FMC HEADER C14 C15 2P5V 1 R40 Q8 J8 1 R31 D1 R17 R18 R19 R20 C12 6 ed ed DS7 DS8 DS9 3P3V C1 R10 R9 3P3V J3 C3 C4 U6 3 Q7 1 C693 D3 R15 D2 D4 C682 R16 L2 1P8V OFF FMC HEADER L1 TP17 TP23 TP18 DC JACK12V/6A A1 A40 7 1 7 C11 C9 1 K1 12P0V DS4 DS5 DS6 5P0V VDD_REG R4 2P5V_LDO R5 2P5V R6 Q5 U1 R12 R11 C2 R8 R7 GND R669 U3 C8 Q6 Q4 DS3 R3 3P3V_LDO R1 1P8V R2 DDR3-1P5V DS2 Q1 Q2 Q3 12V 12V_POE 12V_PCIE R668 5P0V TP16 C36 C683 R660 TP9 U2 12_DCJACK Q9 K40 1 J2 1 DS1 Figure 1 shows the jumper locations on the SmartFusion2 Development Kit board. D19 C205 B49 Figure 1 • SmartFusion2 Development Kit Board Jumper Locations Note: • Jumpers highlighted in red are set by default. • Jumpers highlighted in green must be set manually. • The location of the jumpers in Figure 1 are searchable. Revision 1 32 Product Support Microsemi SoC Products Group backs its products with various support services, including Customer Service, Customer Technical Support Center, a website, electronic mail, and worldwide sales offices. This appendix contains information about contacting Microsemi SoC Products Group and using these support services. Customer Service ed ed Contact Customer Service for non-technical product support, such as product pricing, product upgrades, update information, order status, and authorization. From North America, call 800.262.1060 From the rest of the world, call 650.318.4460 Fax, from anywhere in the world, 408.643.6913 Customer Technical Support Center rs Microsemi SoC Products Group staffs its Customer Technical Support Center with highly skilled engineers who can help answer your hardware, software, and design questions about Microsemi SoC Products. The Customer Technical Support Center spends a great deal of time creating application notes, answers to common design cycle questions, documentation of known issues, and various FAQs. So, before you contact us, please visit our online resources. It is very likely we have already answered your questions. Technical Support pe Visit the Customer Support website (www.microsemi.com/soc/support/search/default.aspx) for more information and support. Many answers available on the searchable web resource include diagrams, illustrations, and links to other resources on the website. Website Su You can browse a variety of technical and non-technical information on the SoC home page, at www.microsemi.com/soc. Contacting the Customer Technical Support Center Highly skilled engineers staff the Technical Support Center. The Technical Support Center can be contacted by email or through the Microsemi SoC Products Group website. Email You can communicate your technical questions to our email address and receive answers back by email, fax, or phone. Also, if you have design problems, you can email your design files to receive assistance. We constantly monitor the email account throughout the day. When sending your request to us, please be sure to include your full name, company name, and your contact information for efficient processing of your request. The technical support email address is [email protected]. Revision 1 33 Product Support My Cases Microsemi SoC Products Group customers may submit and track technical cases online by going to My Cases. Outside the U.S. Customers needing assistance outside the US time zones can either contact technical support via email ([email protected]) or contact a local sales office. Sales office listings can be found at www.microsemi.com/soc/company/contact/default.aspx. ITAR Technical Support Su pe rs ed ed For technical support on RH and RT FPGAs that are regulated by International Traffic in Arms Regulations (ITAR), contact us via [email protected]. Alternatively, within My Cases, select Yes in the ITAR drop-down list. For a complete list of ITAR-regulated Microsemi FPGAs, visit the ITAR web page. 34 R e visio n 1 ed ed rs pe Su Microsemi Corporate Headquarters One Enterprise, Aliso Viejo CA 92656 USA Within the USA: +1 (800) 713-4113 Outside the USA: +1 (949) 380-6100 Sales: +1 (949) 380-6136 Fax: +1 (949) 215-4996 E-mail: [email protected] Microsemi Corporation (Nasdaq: MSCC) offers a comprehensive portfolio of semiconductor and system solutions for communications, defense and security, aerospace, and industrial markets. Products include high-performance and radiation-hardened analog mixed-signal integrated circuits, FPGAs, SoCs, and ASICs; power management products; timing and synchronization devices and precise time solutions, setting the world's standard for time; voice processing devices; RF solutions; discrete components; security technologies and scalable anti-tamper products; Power-over-Ethernet ICs and midspans; as well as custom design capabilities and services. Microsemi is headquartered in Aliso Viejo, Calif. and has approximately 3,400 employees globally. Learn more at www.microsemi.com. © 2014 Microsemi Corporation. All rights reserved. Microsemi and the Microsemi logo are trademarks of Microsemi Corporation. All other trademarks and service marks are the property of their respective owners. 50200546-1/04.14