FM4 S6E2H-Series Starter Kit Guide Doc. No. 002-11387 Rev. ** Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone (USA): 800.858.1810 Phone (Intnl): +1 408.943.2600 www.cypress.com Copyright (c) Cypress Semiconductor Corporation, 2016. This document is the property of Cypress Semiconductor Corporation and its subsidiaries, including Spansion LLC ("Cypress"). This document, including any software or firmware included or referenced in this document ("Software"), is owned by Cypress under the intellectual property laws and treaties of the United States and other countries worldwide. Cypress reserves all rights under such laws and treaties and does not, except as specifically stated in this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property rights. If the Software is not accompanied by a license agreement and you do not otherwise have a written agreement with Cypress governing the use of the Software, then Cypress hereby grants you under its copyright rights in the Software, a personal, non-exclusive, nontransferable license (without the right to sublicense) (a) for Software provided in source code form, to modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organization, and (b) to distribute the Software in binary code form externally to end users (either directly or indirectly through resellers and distributors), solely for use on Cypress hardware product units. Cypress also grants you a personal, nonexclusive, nontransferable, license (without the right to sublicense) under those claims of Cypress's patents that are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely to the minimum extent that is necessary for you to exercise your rights under the copyright license granted in the previous sentence. Any other use, reproduction, modification, translation, or compilation of the Software is prohibited. CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes to this document without further notice. Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document. Any information provided in this document, including any sample design information or programming code, is provided only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the functionality and safety of any application made of this information and any resulting product. Cypress products are not designed, intended, or authorized for use as critical components in systems designed or intended for the operation of weapons, weapons systems, nuclear installations, life-support devices or systems, other medical devices or systems (including resuscitation equipment and surgical implants), pollution control or hazardous substances management, or other uses where the failure of the device or system could cause personal injury, death, or property damage ("Unintended Uses"). A critical component is any component of a device or system whose failure to perform can be reasonably expected to cause the failure of the device or system, or to affect its safety or effectiveness. Cypress is not liable, in whole or in part, and Company shall and hereby does release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products. Company shall indemnify and hold Cypress harmless from and against all claims, costs, damages, and other liabilities, including claims for personal injury or death, arising from or related to any Unintended Uses of Cypress products. Cypress, the Cypress logo, Spansion, the Spansion logo, and combinations thereof, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or registered trademarks of Cypress in the United States and other countries. For a more complete list of Cypress trademarks, visit cypress.com. Other names and brands may be claimed as property of their respective owners. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 2 Contents 1. Introduction................................................................................................................................................................. 4 1.1 1.2 1.3 1.4 1.5 1.6 1.7 2. Installation and Test Operation ............................................................................................................................... 11 2.1 2.2 2.3 3. System Block Diagram ..................................................................................................................................... 22 Hardware Features ........................................................................................................................................... 22 Hardware Details .............................................................................................................................................. 23 Software Development ............................................................................................................................................. 28 4.1 4.2 4.3 A. Install Software ................................................................................................................................................. 11 Uninstall Software............................................................................................................................................. 14 Test Operation .................................................................................................................................................. 15 Hardware ................................................................................................................................................................... 22 3.1 3.2 3.3 4. Kit Contents ........................................................................................................................................................ 5 Board Details ...................................................................................................................................................... 6 Jumper and Connector ....................................................................................................................................... 8 Getting Started ................................................................................................................................................... 9 Additional Learning Resources ........................................................................................................................... 9 Technical Support............................................................................................................................................... 9 Acronyms.......................................................................................................................................................... 10 Tool Options ..................................................................................................................................................... 28 Example Projects.............................................................................................................................................. 33 Flash Programming .......................................................................................................................................... 43 Appendix ................................................................................................................................................................... 49 A.1 A.2 Schematic ......................................................................................................................................................... 49 Bill of Materials ................................................................................................................................................. 56 Revision History ................................................................................................................................................................ 59 Document Revision History ........................................................................................................................................ 59 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 3 1. Introduction Thank you for your interest in the FM4-120L-S6E2HG FM4 S6E2H-Series Starter Kit. The FM4 S6E2H-Series Starter Kit enables customers to evaluate and develop projects using the FM4 device family. Flexible MCU 4 (FM4) is a portfolio of high-performance ARM(R) Cortex(R)-M4 MCUs that includes hardware support for digital signal processing and floating-point operations, designed for safety-critical, industrial systems and home appliance applications. There are multiple series of device families in this portfolio. The S6E2C-Series, S6E2H-Series and S6E2GSeries are few of the prominent series of device families. This kit uses a device from the S6E2HSeries. Devices in the S6E2H-Series are highly integrated 32-bit microcontrollers with high performance at a competitive cost. This series is based on the ARM(R) Cortex(R)-M4 processor, including floating point instructions, with on-chip flash memory and SRAM. The series has peripherals such as motor control timers, A/D converters, and communications interfaces like CAN, UART, CSIO, I2C and LIN. The S6E2H-Series of FM4 devices offers up to a 160-MHz CPU, 512 Kbytes Main Flash, 32 Kbytes Work Flash, 64KB SRAM, 100 GPIOs, 24 digital peripherals and 2 analog peripherals. The FM4 S6E2H-Series Starter Kit routes all pins out, which provides limitless options for application development. It is intended to aid the customer to evaluate the featured peripherals of the S6E2H-Series. In order to properly enable our customers, the FM4 S6E2H-Series Starter Kit is aligned to our low cost development systems, aligning this kit with our successful line of Starter Kits in form, price and flexibility. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 4 Introduction 1.1 Kit Contents The FM4 S6E2H-Series Starter Kit contains the following, as shown in Figure 1-1. FM4 S6E2H-Series Starter board USB Standard-A to Micro-B cable Quick Start Guide Figure 1-1: Kit Contents Inspect the contents of the kit; if you find any part missing, contact your nearest Cypress sales office for help: www.cypress.com/support. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 5 Introduction 1.2 Board Details Figure 1-2: FM4 S6E2H-Series Starter Kit Markup FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 6 Introduction 1. Cypress FM4 MCU S6E2HG6A0J 2. Non-Maskable Interrupt pin (NMIX) switch (SW3) 3. User button (SW2) 4. Reset LED 5. Reset button 6. MB9AF312K Programmer and Debugger (CMSIS-DAP) 7. 20-pin JTAG interface (CN2) 8. VBUS selection jumper for CMSIS-DAP (J2) 9. Programmer and debugger enable jumper (J3) 10. Programming mode jumper of MB9AF312K (J5) 11. Jumper to connect SW3 to NMIX (J10) 12. On-board voltage select (J15) 13. Select power from CMSIS-DAP (J7) 14. Select power from peripheral (J6) 15. Power supply LED 16. RGB LED 17. Potentiometer (R11) 18. Jumper for Pin56 multifunction select (J21) 19. Jumper to connect S6E2HG SIN0 to CMSIS-DAP (J19) 20. Programming mode (MD0) jumper of S6E2HG (J18) 21. Battery connector (CN1) 22. Jumper to connect S6E2HG SOT0 to CMSIS-DAP (J20) FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 7 Introduction 1.3 Jumper and Connector Table 1-1: Connector Description Connector Description CN1 Battery connector CN2 20-pin JTAG interface CN3 USB port of CMSIS-DAP CN5 SD card interface Table 1-2: Jumper Description Jumper J2 Function Setting VBUS detection of CMSIS-DAP Open: For on-board voltage is 3.3V Used for VBUS detection function (pin Closed: For on-board voltage is 5.0V 60) of MB9AF312K on board J3 Programmer and Debugger select Open: Enable CMSIS-DAP unit Closed: Disable CMSIS-DAP unit J5 Pull down the MD0 of MB9AF312K Open: Run mode Closed: Serial programming mode J6, J7, Power supply source select Closed J6: Powered by peripheral at J16 J8 Select only one power source! Closed J7: Powered by CN3 (USB port of CMSIS-DAP) Closed J8: Powered by CN2 (20-pin JTAG interface) J10 SW3 connect Open: SW3 is disconnected from the S6E2HG Closed: SW3 is connected to the S6E2HG J15 On-board voltage select Pin1 to Pin2: Sets MCU voltage at 3.3V Pin 2 to Pin3: Sets MCU voltage at 5V J18 Pull down the MD0 of S6E2HG Open: Run mode Closed: Serial programming mode J19 CMSIS-DAP virtual COM connect Open: SIN0_0 is disconnected from CMSIS-DAP Closed: SIN0_0 is connected with CMSIS-DAP J20 CMSIS-DAP virtual COM connect Pin1 to Pin2: SOT0_0 is connected with CMSIS-DAP Pin2 to Pin3: Pull down the P22 of MB9AF312K J21 MD1/PE0 function select Pin1 to Pin2: Pull down MD1 (Programming-Mode) Pin2 to Pin3: PE0 drives the blue LED FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 8 Introduction 1.4 Getting Started This guide will help you get started with the FM4 S6E2H-Series Starter Kit: The Installation and Test Operation chapter describes the kit installation and test operation. This includes the CMSIS-DAP driver to enable the CMSIS-DAP debugger, Serial Port Viewer Tool to view the serial port communication, Flash MCU programmer and Flash USB Direct programmer to program the hex files on the device. The Hardware chapter describes the major features of the FM4 S6E2H-Series Starter Kit and functionalities such as CMSIS-DAP debugger, RGB LED, and buttons. The Software Development chapter describes the available software resources and tools, and how to create a project based on the Peripheral Driver Library (PDL). The Appendix provides the kit schematics, and the bill of materials (BOM). 1.5 Additional Learning Resources Cypress provides a wealth of data at www.cypress.com to help you to select the right MCU device for your design, and quickly and effectively integrate the device into your design. The following is an abbreviated list for FM4 family resources: Overview: S6E2H-Series fact sheet Device Selector : Microcontroller Select Guide Datasheets: S6E2H-Series datasheet and Handling precautions. FM4 Peripheral Manual: Main Section, Communication Macro Section, Analog Macro Section, Timer Section. The documents listed above can be accessed from the kit's webpage at www.cypress.com/FM4-120L-S6E2HG. 1.6 Technical Support For assistance, visit Cypress Support or contact customer support at +1(800) 541-4736 Ext. 2 (in the USA) or +1(408) 943-2600 Ext. 2 (International). FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 9 Introduction 1.7 Acronyms Table 1-3. Acronyms Used in this Document Acronym Description ADC Analog-to-Digital Converter CMSIS-DAP Debug Access Port GPIO General Purpose Input/Output I2C Inter-Integrated Circuit IDE Integrated Development Environment LDO Low Drop Out (voltage regulator) LED Light-Emitting Diode INT Interuppt RGB Red Green Blue JTAG Joint Test Action Group MFS Multi Function Serial PDL Peripheral Driver Library SWD Serial Wire Debug UART Universal Asynchronous Receiver Transmitter USB Universal Serial Bus FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 10 2. Installation and Test Operation This chapter describes the steps to install the software tools on a PC for using the FM4 S6E2H-Series Starter Kit. After successful installation, the user can run pre-programmed test code on the device. 2.1 Install Software Follow the steps below to install the FM4 S6E2H-Series Starter Kit software: 1. 2. Download the FM4 S6E2H-Series Starter Kit installer from the webpage www.cypress.com/FM4-120L-S6E2HG. The Kit software is available for download in three formats. FM4 S6E2H-Series Starter Kit Complete Setup: This installation package contains the files related to the kit, including the Documentation, Hardware, Firmware, Software tools and drivers. However, it does not include the Windows Installer or Microsoft .NET framework packages. If these packages are not installed on your computer, the installer directs you to download and install them from the Internet. FM4 S6E2H-Series Starter Kit Only: This executable file installs only the kit contents, which include kit code examples, hardware files, and user documents. This package can be used if all the software prerequisites (listed in step 7) are already installed on your PC. FM4 S6E2H-Series Starter Kit DVD ISO: This file is a complete package, stored in a DVD-ROM image format, which you can use to create a DVD or extract using an ISO extraction program such as WinZip(R) or WinRAR. The file can also be mounted like a virtual CD/DVD using virtual drive programs such as Virtual CloneDrive and MagicISO. This file includes all the required software, utilities, drivers, hardware files, and user documents. If you have downloaded the ISO file, mount it as a virtual drive. Extract the ISO contents if you do not have a virtual drive to mount the ISO file. Double-click cyautorun.exe in the root directory of the extracted content or the mounted ISO if "Autorun from CD/DVD" is not enabled on the PC. The installation window will appear automatically. Note: If you are using the "Kit Complete Setup" or "Kit Only" package, then go to step 4 for installation. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 11 Installation and Test Operation 3. Click Install FM4-120L-S6E2HG to start the kit installation, shown as Figure 2-1. Figure 2-1: Kit Installation Window 4. Select the folder in which you want to install this package or use the default folder and click Next. 5. Choose the Typical, Custom, or Complete installation type (select 'Typical' if you do not know which one to select) in the Product Installation Overview window, as shown in Figure 2-2. Click Next after you select the installation type. Figure 2-2: Product Installation Overview 6. Read the License agreement and select I accept the terms in the license agreement to continue with installation. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 12 Installation and Test Operation 7. When you click Next, the FM4 S6E2H-Series Starter Kit installer automatically installs the required software, if it is not present on your PC. Following are the required software and driver: FM Universal Peripheral Driver Library (PDL) Serial Port Viewer FLASH USB DIRECT Programmer FLASH MCU Programmer CMSIS-DAP driver 8. When the installation begins, a list of packages appears on the installation page. A green check mark appears next to each package after successful installation. 9. If you are an un-registered user either enter your contact information or select the check box Continue without Contact Information. If you are a registered user, then the installation procedure will not request you to enter the contact information. Click Finish to complete the kit installation. Note: Ensure that the check boxes Extract Example Projects and Extract FM PDL 2.0 are selected. Figure 2-3: Launch the Contents FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 13 Installation and Test Operation 10. View the documents and select the folder in which you want to extract the FM Peripheral Driver Library (PDL) and example projects or leave it as default. Click Install. Figure 2-4: Extract the Example Projects 11. Click Close to finish the extraction. After the installation is complete, the documents and hardware files are available at the following default location: Windows OS (64-bit): C:\Program Files (x86)\Cypress \FM4 S6E2H-Series Starter Kit Windows OS (32-bit): C:\Program Files\Cypress\FM4 S6E2H-Series Starter Kit The Peripheral Driver Library (PDL) will be extracted to this default directory: C:\Users\\My Documents\Cypress\FM_PDL_2.0.1 And, the example projects will be extracted to this default directory: C:\Users\\My Documents\Cypress \FM4 S6E2H-Series Starter Kit_Ver01 In the rest of the document, the following directory is termed as : C:\Users\\My Documents\Cypress 2.2 Uninstall Software The software can be uninstalled using one of the following methods: Go to Start > All Programs > Cypress > Cypress Update Manager and select the Uninstall button that corresponds to the kit software. Go to Start > Control Panel > Programs and Features for Windows 7 or Add/Remove Programs for Windows XP; select the Uninstall button. Note: Uninstalling the Kit software will not remove the FM PDL 2.0 and FM4 S6E2H Series Starter Kit Example Projects from . FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 14 Installation and Test Operation 2.3 Test Operation The FM4 S6E2H-Series Starter Kit has been pre-programmed with a test demo code, which helps you to test all on-board features. The Motorola s-record file, tp_fm4-120l-s6e2hg.srec, is provided in the following directory and can be programmed on the MCU by using the FLASH MCU Programmer. :\FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\Test_Demo_Code 2.3.1 Run the Test Demo Follow the instructions to run the test demo code. 1. Ensure the jumpers J7, J10 and J19 are closed. Close Pin 1 and Pin 2 of J15 and J20. Close Pin2 and Pin3 of J21 and connect CN3 to a PC using the USB cable provided. Figure 2-5: Power the Board from CN3 2. Ensure the power LED (LED5) is on and the LED3 blinks with a breathing effect. The RGB LED (LED2) will alternately flash red, green, and blue. 3. If not already launched, then launch the Serial Port Viewer from the start menu under All Programs > Cypress > Serial Port Viewer. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 15 Installation and Test Operation 5. Click on the Serial Port Viewer icon in the task bar and select the FM-Link/CMSIS-DAP Cypress FM Communications Port. Figure 2-6: FM-Link/CMSIS-DAP Cypress FM Communications Port 6. Select the baud rate 115200, and click the Disconnect button to connect the board. Figure 2-7: Select the Baud Rate 7. Press the Enter key on your keyboard to run the test procedure. Key in the option number to run the test and press the Enter key to complete the test. Figure 2-8: Test Procedure FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 16 Installation and Test Operation 8. For example, key in 1 to test the Red LED. Figure 2-9: Red LED Test-1 9. Press the Enter key to complete the Red LED test. The terminal window will display TESTED. Figure 2-10: Red LED Test-2 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 17 Installation and Test Operation 2.3.2 Test Procedure Explanation This section explains the test procedure. This test procedure is based on the Serial Port Viewer. The user has to key-in the test procedure number displayed on the menu to run the test procedures and then press the Enter key on the PC to complete the test. The firmware on the board will run the test procedure and display the results. There are eight test procedures. A short description of each test procedure is given below: Red LED (RGB LED) Test: This procedure will test whether red LED works normally. Key in 1 to run the test procedure and the red LED will blink. Then press the Enter key on the PC to complete the test and TESTED will be displayed next to the test. Figure 2-11: Red LED Test Green LED (RGB LED) Test: This procedure will test whether green LED works normally. Key in 2 to run the test procedure and the green LED will blink. Then press the Enter key on the PC to complete the test and TESTED will be displayed in the console. Figure 2-12: Green LED Test FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 18 Installation and Test Operation Blue LED (RGB LED) Test: This procedure will test whether blue LED works normally. Key in 3 to run the test procedure and the blue LED will blink. Then press the Enter key on the PC to complete the test. TESTED will be displayed as shown in Figure 2-13. Figure 2-13: Blue LED Test SW2 User Key Test: This procedure is to test switch SW2. Key in 4, and then press SW2 on the starter board. The RGB LED (LED2) will glow green while SW2 is held down. Release SW2 and press the Enter key to complete the test. It will display OK. Figure 2-14: SW2 User Key Test FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 19 Installation and Test Operation SW3 User Key Test: This procedure is to test switch SW3. Key in 5, and then press SW3 on the starter board. The RGB LED (LED2) will glow green while SW3 is held down. Release SW3 and press Enter to complete the test. It will display OK. Figure 2-15: SW3 User Key Test Potentiometer Test: This procedure tests the potentiometer. Key in 6 and "Turn Pot clockwise/anti-clockwise" appear in the serial port viewer window depending on the potentiometer's (R11) current position. When the potentiometer is turned clockwise from the min to the max position, RGB LED (LED2) color changes from red to green to blue. When turned anticlockwise, LED color varies from blue to green to red. Figure 2-16: Potentiometer Test FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 20 Installation and Test Operation SD Card Test: This procedure tests the SD Card. Key in 7 and press the Enter key. If an SD Card is found in the SD card slot (CN5) and read successfully, the console will display OK. If an SD Card is not found in the slot, the console will display Fail. Figure 2-17: SD Card Test Sub Clock Test: This procedure will test whether the sub clock is at 32.768 KHz or not. Key in 8 and press the Enter key, the main routine will shift the system clock to the sub clock, and then shift back to main clock after the sub clock is confirmed to be running at 32.768 KHz. It displays OK if the sub clock is running at 32.768 KHz otherwise it will display Fail. Figure 2-18: Sub Clock Test FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 21 3. Hardware This chapter describes the features and hardware details of the FM4 S6E2H-Series Starter Kit. 3.1 System Block Diagram Figure 3-1 shows the block diagram of the FM4 S6E2H-Series Starter Kit. Figure 3-1: System Block Diagram 3.2 Hardware Features Cypress FM4 S6E2HG MCU On-board ICE (CMSIS-DAP compatible) SD card interface All pins interface Reset LED Potentiometer RGB LED User buttons to generate interrupt (INT) and Non-Maskable interrupt (NMIX) FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 22 Hardware Reset button 20-pin JTAG interface Selectable on-board voltage (3.3 V or 5.0 V) 3.3 Hardware Details 3.3.1 FM4 Series MCU The FM4 S6E2HG MCU is a family of highly integrated 32-bit microcontrollers dedicated for high performance embedded controllers at competitive price. This series is based on the ARM(R) Cortex(R)-M4 processor with on-chip flash memory and SRAM, and has peripherals such as motor control timers, A/D converters, and communication interfaces like CAN, UART, CSIO, I2C, and LIN. 3.3.2 User Button and LED The FM4 S6E2H-Series Starter Kit features two user buttons and a 3-color LED. The LED and switches are connected to the S6E2HG MCU device via pins listed in Table 3-1. Table 3-1: Button and LED Pin Number Port Peripherals External Device 108 P68 SCK3_0,TIOB7_2, INT00_2 SW2 116 P60 SCK5_0,TIOA2_2,NMIX,MRDY_0,WKUP0 SW3 82 P27 TIOA6_2, INT02_2, RTO05_1 LED2 - Red 22 P38 INITX LED2 - Green 56 PE0 MD1 LED2 - Blue Pin 56 is used to drive the blue LED; it is also connected to MD1 pin which is used for the serial programming mode setting. Jumper J21 can be used to switch the functions. Table 3-2 shows the configuration. Table 3-2: J21 Configuration Jumper-J21 Port Function Close 2~3 PE0 Drive the blue LED Close 1~2 MD1 Serial programming mode FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 23 Hardware 3.3.3 SD Card Interface CN5 is an SD card interface connected with the SDIO macro of the S6E2HG device. This SD card interface supports full function of the SDIO including data transmission, card detection and write protection. Figure 3-2: SD Card Circuit SD Card The pin arrangement of the SD card is shown in Figure 3-3. Figure 3-3: Pin Arrangement of SD Card Interface FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 24 Hardware Table 3-3 shows the signals of the SD card interface. Table 3-3: Signals of SD Card Interface Pin No. 3.3.4 Pin Name Type Description 1 DAT2 I/O Data 2 DAT3 I/O Data 3 CMD I/O Data 4 C/D I/O Card detect 5 VSS1 power Power supply ground 6 VDD power Power supply 7 CLK I Clock 8 VSS2 power Power supply ground 9 DAT0 I/O Data 10 DAT1 I/O Data 11 W/P O Write protect detect CMSIS-DAP The FM4 S6E2H-Series Starter Kit features an on-board CMSIS-DAP module to enable programming and debugging of the FM4 S6E2HG MCU. The CMSIS-DAP firmware solution supports full JTAG configuration and a two-wire Serial Wire Debug (SWD) interface. The CMSIS-DAP module can also power the FM4 S6E2H-Series Starter kit via the CN3 connector. Figure 3-4: CMSIS-DAP Circuit CMSIS-DAP FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 25 Hardware 3.3.5 JTAG The FM4 S6E2H-Series Starter Kit provides an interface, CN2, to connect an external programmer for programming the FM4 S6E2HG MCU or for connecting a third-party debugging tool. CN2 is a standard ARM 0.1'' 10*2-pin Cortex debug connector. Figure 3-5: 10-pin JTAG I/F JTAG 3.3.6 Potentiometer The FM4 S6E2H-Series Starter Kit has a potentiometer with resistance value ranging from 0 to 10 k. The middle terminal is connected to the ADC channel AN18. Figure 3-6: Potentiometer Potentiometer FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 26 Hardware 3.3.7 Expansion Port The FM4 S6E2H-Series Starter Kit provides two sets of expansion ports which route all the MCU pins. The user can access all pins of the S6E2HG device from these ports. Figure 3-7 shows the details. Figure 3-7: Expansion Port FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 27 4. Software Development This chapter provides information about the available software resources supporting the S6E2HG device and FM4 S6E2H-Series Starter kit. 4.1 Tool Options The FM4 S6E2H-Series is supported by several third party tools/IDEs, and the user can choose their preferred tool for development. Any one of below listed IDEs can used for opening and building the example projects packaged with this kit: IAR Embedded Workbench for ARM Keil ARM RealView(R) Microcontroller Development System Download evaluation versions of these tools from the vendor's website. A full license may be required to build or debug some of the example projects. For detailed information on using the tools, see the documentation in the Help section of the tool chain or the website of the tool's supplier. 4.1.1 Build an Example Project with IAR IDE The following steps describe how to open, build, and run an example project in the IAR IDE. The s6e2hg_adc is one example project that is available after a successful installation. 1. Launch IAR Embedded Workbench IDE V7.40.5.9739 (or later). FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 28 Software Development 2. Click File > Open > Workspace and select the workspace file s6e2hg_adc.eww from :\ FM4 S6E2H-Series Starter Kit_Ver01 \Firmware\Demo Projects\s6e2hg_adc\IAR FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 29 Software Development 3. Click Project > Rebuild All to build the project. 4. Make sure the jumpers on the FM4 S6E2H-Series Starter board are placed according to Table 4-1. Table 4-1: Debugging Jumper Settings Jumper Position Description J2 Open Sets MB9AF312K to 3.3V. J3 Open Sets MB9AF312K (CMSIS-DAP) in run mode. Power from CMSIS-DAP (CN3) J7 Closed Sets S6E2HG (CMSIS-DAP) in run mode. J10 Closed Sets SW3 user button connected. J15 Pin1 to Pin2 Sets S6E2HG to 3.3V. J19 Close CMSIS-DAP virtual COM connection J20 Pin1 to Pin2 CMSIS-DAP virtual COM connection J21 Pin2 to Pin3 PE0 drives blue LED 5. Connect the USB cable to the CN3 port. 6. Observe that Power LED (LED5) is glowing green. 7. Click the Download and Debug icon in the tool bar, use Shortcut Crtl+D, or choose Project > Download and Debug to start downloading and debugging. Note: When downloading the code example into the board, if you get a following warning: "Skipping flash loading pass because there is no data in the designated range: 0x200C0000-0x200C7FFF", you can safely ignore it. The S6E2HG processor includes two banks of flash, the main flash and a smaller work flash at address 0x200C0000. The code examples do not use the work flash. However, the debugger memory map includes the work flash, as it should. In effect, the IAR IDE tells you the code example doesn't use the work flash. That's correct, and not a problem. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 30 Software Development 8. Click the Run icon to run the program once it is downloaded successfully. Refer to the Example Projects section for more details on example projects. 9. Click the Stop icon to stop the program. For more information about the IAR Embedded Workbench IDE, please click Help from within the tool. 4.1.2 Build an Example Project with Keil Vision IDE The following steps describe how to open, build and run an example project in Keil Vision IDE. Before doing this, please check the availability of the flash loader file of the S6E2HG device (S6E2HG4X0A.FLM & S6E2HG6X0A.FLM) in this directory: :\ARM\flash. If the flash loader files are not there, copy them to the above folder from: :\FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\\ARM\flashloader\ The s6e2hg_adc is one example project that is available after a successful installation. 1. Launch Keil Vision IDE v5.16a (or later). 2. Click Project > Open Project and select the workspace file s6e2hg_dac.uvprojx from :\FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_adc\ARM. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 31 Software Development 3. Click the Build icon to build this project. 4. Make sure the jumpers on the FM4 S6E2HG-Series Starter board are placed according to Table 4-2. Table 4-2: Debugging Jumper Settings Jumper Position Description J2 Open Sets MB9AF312K to 3.3V. J3 Open Sets MB9AF312K (CMSIS-DAP) in run mode. Power from CMSIS-DAP (CN2) J7 Closed Sets S6E2HG in run mode. J10 Closed Sets S6E2HG user module J15 Pin1 to Pin2 Sets S6E2HG to 3.3V. J19 Closed CMSIS-DAP virtual COM connection J20 Pin1 to Pin2 CMSIS-DAP virtual COM connection J21 Pin2 to Pin3 PE0 drives blue LED 5. Connect the USB cable to the CN3 port. 6. Observe that Power LED (LED5) is glowing green. 7. Click the Debug icon, use shortcut Crtl+F5, or choose Debug > Start/Stop Debug Session to start downloading and debugging. 8. Click Run to run the program once it is downloaded successfully. 9. Click Stop to stop the program when you want. For more information about the Keil Vision IDE, please click Help from within the tool. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 32 Software Development 4.2 Example Projects The FM4 S6E2H-Series Starter Kit includes twelve example projects to help the user get a quick start with the S6E2HG device. The example projects are located in this directory: :\FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects These examples listed in the Table 4-3 are based on the Peripheral Driver Library (PDL). The PDL provides APIs for initializing and operating on-chip peripherals. PDL documentation is available at: :\FM_PDL_2.0.1\doc Use either IAR Embedded Workbench v7.40.5.9739 (or later) or Keil Vision IDE v5.16a (or later) to open these example projects. Table 4-3: Example Projects # Projects Title/Description Title: Analog-to-Digital Converter Description: This project demonstrates the analog to digital conversion of the S6E2HG device. This example sets the ADC to channel 18 in single conversion mode with 1 s6e2hg_adc interrupt enabled. ADC channel 18 is connected to a potentiometer. The conversion is started using a software trigger. When an ADC conversion is completed, the interrupt callback function is called, it reads the result data and prints it to UART0. Refer to section AD Converter for details. Title: Base Timer Description: This project demonstrates the base timer operation of the S6E2HG 2 s6e2hg_bt_pwm device. This project configures a base timer in PWM mode to generate a PWM sequence. The PWM outputs from TIOA6_2 which drives the red LED of LED2. The PWM duty cycle is updated every 1ms by another base timer to produce a breathing LED effect. Title: Direct Memory Access (DMA) Description: This project demonstrates DMA operation of the S6E2HG device. This 3 s6e2hg_dma example shows how to use DMA for software block transfer. In this example DMA channel 0 is used to transfer the contents of an array to another array using software block transfer. After the transfer a callback function is executed, which sets a DMA operation finished flag. Refer to section Direct Memory Access (DMA) for details. Title: External Interrupt 4 s6e2hg_ext_int Description: This project demonstrates the external interrupt operation of the S6E2HG device. SW2 key press is detected by the external interrupt. Pressing the SW2 key on the board will change the color of RGB LED (LED2) from red to green to blue. Title: Flash Write Description: This project demonstrates the flash writing operation of the S6E2HG 5 s6e2hg_flash device. A specific set of four values each of four bytes in size will be written into a specific address location in the flash memory. Refer to section Flash Write for the details. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 33 Software Development # Projects Title/Description Title: GPIO 6 s6e2hg_gpio Description: This project demonstrates the GPIO operations of the S6E2HG device by driving an LED. Pin P38 sinks current from the green LED of the RGB LED (LED2). Pin P38 will output a pulse sequence to blink the LED continuously. Title: Multi-function Serial Interface Description: This project demonstrates the UART communication of the S6E2HG 7 s6e2hg_mfs_uart device. This program enables the MFS0 as a UART to communicate with the CMSISDAP. The CMSIS-DAP serves as the bridge between the MCU and the PC. Refer to section UART Communication for details. Title: Multi-function Timer Description: This project demonstrates the multi-function timer (MFT) operation of the 8 s6e2hg_mft_frt S6E2HG device. This example demonstrates the access of FRT (Free Run Timer) in Up/Down-count mode with peak/zero match interrupt. The blue LED (RGB LED2) will turn on/off when peak/zero match interrupt occurs. Title: Real Time Clock Description: This project demonstrates the RTC operation of the S6E2HG device. The program enables the RTC in calendar mode, and sends out the current calendar data 9 s6e2hg_rtc through UART0. The calendar starts from 2015/9/30 23:59:01 Wednesday. The calendar data will be displayed in the Serial Port Viewer window. When time reaches "2015-10-01 00:00:00", the Serial Port Viewer window displays `alarm occurs' message, and at the same time, RGB LED2 starts blinking. A new time "2015-10-01 09:30:00" is set. Title: Sleep Mode Description: This project demonstrates the sleep mode operation of the S6E2HG 10 s6e2hg_sleep_mode device. The MCU will enter sleep mode after blinking the green LED five times. It can be woken up by pressing SW3. After wakeup, the green LED will turn on. Refer to section Sleep Mode for the details. Title: Software Watchdog Description: This project demonstrates the operation of the S6E2HG watchdog by considering two different situations when the watchdog is enabled: a) when the 11 s6e2hg_sw_wdt watchdog is fed and b) when the watchdog is not fed. If the watchdog is enabled and is fed in time, the program will run normally, and the RGB LED will blink green. If the watchdog is enabled and not fed in time, the device will reset, and the green LED will remain ON continuously. Refer to section Software Watchdog for the details. Title: Watch Timer 12 s6e2hg_wc Description: This project demonstrates the Watch Timer function of the S6E2HG device. The Watch Timer generates an interrupt every second. In the interrupt service routine, pin P38 will drive the RGB LED (LED2) to blink green. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 34 Software Development 4.2.1 AD Converter 4.2.1.1 Project Description This project demonstrates the Analog-to-Digital conversion of the S6E2HG device. This example sets the ADC channel 18 in single conversion mode with interrupt enabled. ADC channel 18 is connected to a potentiometer. The conversion is started using a software trigger. When ADC conversion is completed, the interrupt callback function is called, it reads the result data and prints it to UART0. 4.2.1.2 Hardware Connection No specific hardware connections are required for this project. All connections are hardwired on the board. 4.2.1.3 Verify Output 1. Power the FM4 S6E2HG-Series Starter board from CN3 using a USB cable, refer to Figure 2-5. 2. Open the project file in IAR Embedded Workbench or Keil Vision IDE from the following directory on your PC: IAR project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_adc\IAR\s6e2hg_adc.eww. Keil project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_adc\ARM\s6e2hg_adc.uvprojx. 3. Build the project and download the code into the S6E2HG device. 4. Run the Serial Port Viewer, set the baud rate as 115200, and click the Disconnected button to connect the board with PC, as described in section Run the Test Demo. Figure 4-1: Select the Baud Rate FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 35 Software Development 5. Run the program and the ADC value will be displayed in the Serial Port Viewer window. Figure 4-2: ADC value 6. 4.2.2 Turn the potentiometer, the ADC values will change accordingly. Direct Memory Access (DMA) 4.2.2.1 Project Description This project demonstrates DMA operation of the S6E2HG device. The program configures DMA to move the data from au32SourceData (source array) to au32DestinationData (destination array), and then compares the content of the arrays to verify the data. 4.2.2.2 Hardware Connection No specific hardware connections are required for this project. All connections are hardwired on the board. 4.2.2.3 Verify Output 4.2.2.3.1 Instructions for IAR Embedded Workbench 1. Power the FM4 S6E2H-Series Starter board from CN3 using a USB cable, refer to Figure 2-5. 2. Open the project file in IAR Embedded Workbench from the following directory on your PC: IAR project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_dma\IAR\s6e2hg_dma.eww. 3. Build the project and download the code into the S6E2HG device. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 36 Software Development 4. Open Watch1 window from View-> Watch. 5. Add the arrays au32SourceData and au32DestinationData in Watch1 window. 6. Run the program for a while (>10 seconds). 7. Stop the program and check the arrays mentioned above. The Program Counter (PC) will stop at the routine as shown below which means the content of the arrays are the same. You can also verify the content of the arrays in the watch window. 4.2.2.3.2 Instructions for Keil Vision IDE 1. Power the FM4 S6E2H-Series Starter board from CN3 using a USB cable, refer to Figure 2-5. 2. Open the project s6e2hg_dma in Keil Vision IDE from the following directory on your PC: Keil project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_dma\ARM\s6e2hg_dma.uvprojx. 3. Build the project and download the code into the S6E2HG device. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 37 Software Development 4.2.3 4. Open Watch1 window from View->Watch Windows. 5. Add the arrays au32SourceData and au32DestinationData in Watch1 window. 6. Run the program for a while (>10 seconds). 7. Stop the program and check the arrays mentioned above. The Program Counter (PC) will stop at the routine as shown below which means the content of the arrays are the same. You can also verify the content of the arrays in the watch window. Flash Write 4.2.3.1 Project Description This project demonstrates the flash writing operation of the S6E2HG device. A specific set of four values each of four bytes in size will be written into a specific address location in the flash memory. 4.2.3.2 Hardware Connection No specific hardware connections are required for this project. All connections are hardwired on the board. 4.2.3.3 Verify Output 4.2.3.3.1 Instructions for IAR Embedded Workbench 1. Power the FM4 S6E2H-Series Starter board from CN3 using a USB cable, refer to Figure 2-5. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 38 Software Development 2. Open the project file in IAR Embedded Workbench from the following directory on your PC: IAR project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_flash\IAR\s6e2hg_flash.eww. 3. Build the project and download the code into the S6E2HG device. 4. Open the memory window from the View > Memory. Enter 0x00070000 in the Go to table and press the Enter Key on your PC. 5. Run the program for a while (>10 seconds). 6. Stop the program and check the content of 0x00070000 in flash. 4.2.3.3.2 Instructions for Keil Vision IDE 1. Power the FM4 S6E2H-Series Starter board from CN3 using a USB cable, refer to Figure 2-5. 2. Open the project s6e2hg_flash in Keil Vision IDE from the following directory on your PC: Keil project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_flash\ARM\s6e2hg_flash.uvprojx. 3. Build the project and download the code into the S6E2HG device. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 39 Software Development 4.2.4 4. Open the Memory1 window from the View > Memory Windows. Enter 0x00070000 in the Address table and press the Enter Key on your PC. 5. Run the program for a while (>10 seconds). 6. Stop the program and check the content of 0x00070000 in the flash. UART Communication 4.2.4.1 Project Description This project demonstrates the UART communication of the S6E2HG device. This program enables the MFS0 as a UART to communicate with the CMSIS-DAP. The CMSIS-DAP serves as the bridge between the MCU and the PC. 4.2.4.2 Hardware Connection No specific hardware connections are required for this project. All connections are hardwired on the board. 4.2.4.3 Verify Output 1. Power the FM4 S6E2H-Series Starter board from CN3 using a USB cable, refer to Figure 2-5. 2. Open the project file in IAR Embedded Workbench or Keil Vision IDE from the following directory on your PC: IAR project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_mfs_uart\IAR\s6e2hg_mfs_uart.eww. Keil project:: \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_mfs_uart\ARM\s6e2hg_mfs_uart.uvprojx. 3. Build the project and download the code into the S6E2HG device. 4. Run the program. 5. Run the Serial Port Viewer, set the baud rate as 115200, and click the Disconnected button to connect the board with the PC, as described in section Run the Test Demo. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 40 Software Development Figure 4-3: Select the Baud Rate 6. Click the Toggle Outgoing Data Window button. Figure 4-4: Toggle the Outgoing Data Window 7. Key in any characters in the Outgoing Data Window, the same characters will be echoed in the Input Data Window. Figure 4-5: Echo Test FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 41 Software Development 4.2.5 Sleep Mode 4.2.5.1 Project Description This project demonstrates the sleep mode operation of the S6E2HG device. The MCU will enter sleep mode after blinking the green LED 5 times. It can be woken up by pressing the SW3 key. After wakeup, the green LED will turn on. 4.2.5.2 Hardware Connection No specific hardware connections are required for this project. All connections are hardwired on the board. 4.2.5.3 Verify Output 1. Power the FM4 S6E2G-Series Starter board from CN3 using a USB cable, refer to Figure 2-5. 2. Open the project file in IAR Embedded Workbench or Keil Vision IDE from the following directory on your PC: IAR project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_sleep_mode\IAR\s6e2hg_sleep_mode.eww. Keil project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_sleep_mode\ARM\s6e2hg_sleep_mode.uvprojx. 3. Build the project and download the code into the S6E2HG device. 4. Run the program. 5. The RGB LED (LED2) will blink 5 times (green color), and then the MCU enters sleep mode. Figure 4-6: MCU in sleep mode 4.2.6 6. Press the SW3 key to wake up the MCU. 7. The RGB LED (LED2) will glow with green color. Software Watchdog 4.2.6.1 Project Description This project is to demonstrate the operation of the S6E2HG watchdog. The project demonstrates two different situations: when the watchdog is fed and when the watchdog is not fed. If the watchdog is enabled and the watchdog is fed in time, the program will run properly, and the RGB LED (LED2) will blink green. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 42 Software Development If the watchdog is enabled, but not fed in time, the chip will reset, and the green LED will remain glowing. 4.2.6.2 Hardware Connection No specific hardware connections are required for this project. All connections are hardwired on the board. 4.2.6.3 Verify Output 1. Power the FM4 S6E2H-Series Starter board from CN3 using a USB cable, refer to Figure 2-5. 2. Open the project file in IAR Embedded Workbench or Keil Vision IDE from the following directory on your PC: IAR project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_st_wdt\IAR\s6e2hg_st_wdt.eww. Keil project: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_st_wdt\ARM\s6e2hg_st_wdt.uvprojx. 3. Build the project and download the code into the S6E2HG device. 4. Run the program. 5. The RGB LED (LED2) will blink green. 6. Stop the program, comment out the line of Swwdg_Feed(); in main.c, and click File > Save 7. Repeat steps 3 to 4. 8. The RGB LED (LED2) will glow green but will not blink. 4.3 Flash Programming This section describes how to program the S6E2HG MCU using the FLASH MCU Programmer and how to program the CMSIS-DAP device using the FLASH USB DIRECT Programmer. 4.3.1 Programming the S6E2HG using the FLASH MCU Programmer 1. The FLASH MCU Programmer gets installed on your PC as part the Kit installer. Follow Install Software to install the kit. 2. Make sure the jumpers on the FM4 S6E2H-Series Starter board are placed according to Table 4-4. Table 4-4: Jumper Settings for S6E2HG programming using FLASH MCU Programmer Jumper Position Description J2 Open Sets MB9AF312K to 3.3V. J3 Open Enable MB9AF312K CMSIS-DAP for debugging and programming purpose. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 43 Software Development Jumper Position Description J5 Open Sets MB9AF312K (CMSIS-DAP) in run mode. J7 Closed Selects CMSIS-DAP as power source. J10 Open Sets S6E2HG in programming mode J15 Pin1 to Pin2 Sets S6E2HG to 3.3V. J18 Closed Sets S6E2HG in programming mode J19 Closed CMSIS-DAP virtual COM connection (SIN0 to pin 21 of MB9AF312K) J20 Pin1 to Pin2 CMSIS-DAP virtual COM connection (SOT0 to pin 20 of MB9AF312K) J21 Pin1 to Pin2 Sets the PE0 pin to MD1 mode 3. Connect the USB cable to the CN3 port. 4. Observe that the Power LED (LED5) is glowing green. 5. Launch the FLASH MCU Programmer from Windows Start Menu > All Programs > Cypress > FLASH MCU Programmer > FM0+ FM3 FM4 6. Select Target MCU as S6E2HG6G/E/F. 7. Set Crystal Frequency to 4MHz. 8. Select the Motorola-S format file or Intel-HEX format file to be programmed to FLASH memory in the MCU. Note: The HEX file selected in this example is the Test Demo firmware. 9. Check the COM Port number in the Windows Device Manager. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 44 Software Development 10. Enter the Virtual COM Port listed in the Ports of Windows Device Manager in COM box in the Customize setting window (This window appears when the Set Environment button is clicked). 11. Click on the Full Operation (D+E+B+P) button to start programming. 12. Reset the S6E2HG device by pressing the reset button (SW1) on the board, and click OK. Note: Please click on Help for any issues or errors encountered during programming. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 45 Software Development 4.3.2 Programming the CMSIS-DAP (MB9AF312K) Device Using the FLASH USB DIRECT Programmer By default, the latest CMSIS-DAP firmware is programmed on the MB9AF312K. It is not required for the user to re-program firmware again before running the CMSIS-DAP debugger. Follow the steps below to update the firmware, if needed. 1. The FLASH USB DIRECT Programmer gets installed on your PC as part the kit installer. 2. Make sure the jumpers on the FM4 S6E2H-Series Starter board are placed according to Table 4-5. Table 4-5: Programming Jumper Settings for CMSIS-DAP programming Jumper Position Description J2 Open Sets MB9AF312K to 3.3V. J3 Open Enable MB9AF312K CMSIS-DAP for programming and debugging purpose. J5 Closed Sets MB9AF312K (CMSIS-DAP) in programmer mode. J7 Closed Selects CMSIS-DAP as power source. J10 Closed Sets S6E2HG in programming mode J15 Pin1 to Pin2 Sets S6E2HG to 3.3V. J18 Open Sets S6E2HG in run mode J19 Closed CMSIS-DAP virtual COM connection (SIN0 to pin 21 of MB9AF312K) J20 Pin1 to Pin2 CMSIS-DAP virtual COM connection (SOT0 to pin 20 of MB9AF312K) J21 Pin2 to Pin3 Sets pin PE0 to drive the LED 3. Connect the USB cable to the CN3 port. 4. Observe that the Power LED (LED5) is glowing green. 5. Launch the FLASH USB DIRECT Programmer from Windows Start Menu > All Programs > Cypress > FLASH USB DIRECT Programmer > USBDirect 6. Select the Target MCU as MB9AF312K. 7. Select the Motorola-S format file or Intel-HEX format file to be programmed on MB9AF312K. The hex file is included in the following directory: : \FM4 S6E2H-Series Starter Kit_Ver01\Firmware\CMSIS-DAP FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 46 Software Development 8. Check the COM Port number in the Windows Device Manager. 9. Enter the Virtual COM Port listed in the Ports of Device Manager in the COM box. 10. Click the Full Operation (D+E+B+P) button to start programming. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 47 Software Development 11. Reset the CMSIS-DAP microcontroller by removing and reconnecting the USB cable, and click OK. 12. Click OK button in Erase and Program Complete window. Note: Please click on Help for any issues or errors encountered during programming. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 48 A. Appendix A.1 Schematic Figure A-1. MCU VCC_MCU U2-3 VCC_MCU 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 PIN62 PIN63 PIN64 PIN65 PIN66 PIN67 PIN68 PIN69 1K LED1 RED R2 10K R78 PIN74 PIN75 PIN76 PIN77 PIN78 PIN79 PIN80 PIN81 PIN82 PIN83 PIN84 PIN85 PIN86 PIN87 PIN88 PIN89 LED_R AN18 RESET VCC_MCU R3 10K R79 SW2 SW-B3F C10 C11 C12 0.1uF 0.1uF 0.1uF 0.1uF 0.1uF 0.1uF C X1A X0 X1 X0A R9 10M[NC] R13 0R J23 Jumper2 PIN58_EX R20 10K J24 Jumper2 C15 NC/12pF NC/12pF 12pF 2 PIN46 X1 C16 32.768KHz C17 12pF J25 Jumper2 2 1 2 1 VCC_MCU J10: Program Module: Open User Module: Closed R4 10K R80 C6 R81 C8 220pF 100nF 10uF R8 PIN108 PIN109 PIN110 PIN111 PIN112 PIN113 PIN114 PIN115 PIN116 VCC_MCU PIN118 PIN119 NMIX EXPORT_120 J10 J17 1 R16 10K VCC_MCU 2 1 0R R11 J21 Jumper3 MD1 Jumper2 J18 MD0 Jumper2 R6 220R LED_B R7 680R LED_G Jumper2 VCC_MCU 2 510R LED_R R5 VCC_MCU 1 2 SW3 SW-B3F 0.1uF AVCC 4R7 NMIX 1K C3 NM I X INT LED2 C5 1 2 PIN108 PIN109 PIN110 PIN111 PIN112 PIN113 PIN114 PIN115 PIN116 PIN117 PIN118 PIN119 PIN92 PIN93 PIN94 PIN95 PIN96 PIN97 PIN98 PIN99 PIN100 PIN101 PIN102 PIN103 PIN104 PIN105 PIN106 VCC_MCU X0 R15 10K M O DE LED LED-RGB PIN59_EX Y2 1 C14 4.7uF 2 1 4MHz VWAKEUP C20 S6E2HG6G0A AVCC 2 1 R14 0R Y1 PIN45 PIN107 EXPORT_120 1M PIN92 PIN93 PIN94 PIN95 PIN96 PIN97 PIN98 PIN99 PIN100 PIN101 PIN102 PIN103 PIN104 PIN105 PIN106 C13 3 VCC_MCU PIN47 PIN48 PIN49 PIN50 PIN51 PIN52 PIN53 PIN54 PIN55 PIN56 PIN57 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 MD1 C9 PIN47 PIN48 PIN49 PIN50 PIN51 PIN52 PIN53 PIN54 PIN55 PIN56 PIN57 MD0 PIN58 X0 PIN59 X1 PIN41 PIN42 PIN43 PIN44 PIN91 PIN92 PIN93 PIN94 PIN95 PIN96 PIN97 PIN98 PIN99 PIN100 PIN101 PIN102 PIN103 PIN104 PIN105 PIN106 PIN107 PIN108 PIN109 PIN110 PIN111 PIN112 PIN113 PIN114 PIN115 PIN116 PIN117 PIN118 PIN119 PIN120 LED_B 10uF/16V C7 VWAKEUP VBAT C J22 Jumper2 R10 C4 RESET X0A X1A 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 PIN56 VCC_3V3 VCC P0E/SCS6_1/TIOB5_2/IC13_0/S_CLK_0/MDQM1_0 P0D/SCK6_1/TIOA5_2/IC12_0/S_CMD_0/MDQM0_0 P0C/SOT6_1/TIOA6_1/IC11_0/S_DATA1_0/MALE_0 P0B/SIN6_1/TIOB6_1/INT00_1/IC10_0/S_DATA0_0/MCSX0_0 P0A/SIN1_0/INT12_2/FRCK1_0/S_DATA3_0/MCSX1_0 P09/TRACED0/AN19/TIOA3_2/SOT1_0/S_DATA2_0/MCSX5_0 P08/TRACED1/AN20/TIOB3_2/SCK1_0/MCSX4_0 P07/TRACED2/AN21/TIOA0_2/SCK7_0/MCLKOUT_0 P06/TRACED3/AN22/TIOB0_2/SOT7_0/MCSX3_0 P05/TRACECLK/AN23/ADTG_0/SIN7_0/INT01_1/MCSX2_0 P04/TDO/SWO P03/TMS/SWDIO P02/TDI/MCSX6_0 P01/TCK/SWCLK P00/TRSTX/MCSX7_0 VSS P68/SCK3_0/TIOB7_2/INT00_2 P67/SOT3_0/TIOA7_2 P66/SIN3_0/ADTG_8/INT11_2 P65/TIOB7_0/SCK5_1 P64/TIOA7_0/SOT5_1/INT10_2 P63/CROUT_1/INT03_0/SIN5_1/RX0_2/S_CD_0/MWEX_0 P62/INT04_1/SIN5_0/ADTG_3/TX0_2/S_WP_0/MOEX_0 P61/SOT5_0/TIOB2_2/UHCONX0/RTCCO_0/SUBOUT_0 P60/SCK5_0/TIOA2_2/NMIX/MRDY _0/WKUP0 USBVCC P80/UDM0 P81/UDP0 VSS PIN32 PIN33 PIN34 PIN35 PIN36 PIN37 PIN38 3 S6E2HG6G0A VCC_MCU PIN32 PIN33 PIN34 PIN35 PIN36 PIN37 PIN38 PIN39 PIN40 PIN41 PIN42 PIN43 PIN44 3 31 32 33 34 35 36 37 38 PIN39_EX39 PIN40_EX40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 PIN58_EX58 PIN59_EX59 60 PIN31 PIN32 PIN33 PIN34 PIN35 PIN36 PIN37 PIN38 PIN39 PIN40 PIN41 PIN42 PIN43 PIN44 PIN45 PIN46 PIN47 PIN48 PIN49 PIN50 PIN51 PIN52 PIN53 PIN54 PIN55 PIN56 PIN57 PIN58 PIN59 PIN60 I NT 4 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 EXPORT_120 VCC_MCU U2-4 2 VCC P40/TIOA0_0/RTO10_1/INT12_1 P41/TIOA1_0/RTO11_1/INT13_1 P42/TIOA2_0/RTO12_1/MSDWEX_0 P43/TIOA3_0/RTO13_1/ADTG_7/MCSX8_0 P44/TIOA4_0/RTO14_1/DA0 P45/TIOB0_0/RTO15_1/DA1 INITX P46/X0A P47/X1A P48/VREGCTL P49/VWAKEUP VBAT C VSS VCC P4B/TIOB1_0/SCS7_1/MAD03_0 P4C/TIOB2_0/SCK7_1/AIN1_2/MAD04_0 P4D/TIOB3_0/SOT7_1/INT13_2/BIN1_2/MAD05_0 P4E/TIOB4_0/SIN7_1/INT11_1/ZIN1_2/FRCK1_1/MAD06_0/WKUP2 P70/TX0_0/TIOA4_2/AIN0_1/IC13_1 P71/INT15_1/RX0_0/TIOB4_2/BIN0_1/IC12_1 P72/SIN2_0/INT14_2/TIOA6_0/ZIN0_1/IC11_1 P73/SOT2_0/INT03_2/TIOB6_0/IC10_1 P74/SCK2_0/DTTI1X_1 PE0/MD1 MD0 PE2/X0 PE3/X1 VSS + S6E2HG6G0A U1-4 1 EXPORT_120 VCC_MCU U2-2 INT 1K C2 0.1uF S6E2HG6G0A U1-2 RESET SW1 SW-B3F 0.1uF PIN74 PIN75 PIN76 PIN77 PIN78 PIN79 PIN80 PIN81 PIN82 PIN83 PIN84 PIN85 PIN86 PIN87 PIN88 PIN89 1K C1 2 AVCC AVSS AVRL AVRH R1 PIN62 PIN63 PIN64 PIN65 PIN66 PIN67 PIN68 PIN69 3 PIN61 PIN62 PIN63 PIN64 PIN65 PIN66 PIN67 PIN68 PIN69 PIN70 PIN71 PIN72 PIN73 PIN74 PIN75 PIN76 PIN77 PIN78 PIN79 PIN80 PIN81 PIN82 PIN83 PIN84 PIN85 PIN86 PIN87 PIN88 PIN89 PIN90 1 LED_G 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 4 VCC P10/AN00/SIN1_1/INT02_1/RX1_2/FRCK0_2/MAD07_0 P11/AN01/SOT1_1/TX1_2/IC00_2/MAD08_0 P12/AN02/SCK1_1/RTCCO_1/SUBOUT_1/IC01_2/MAD09_0 P13/AN03/SIN0_1/INT03_1/IC02_2/MAD10_0 P14/AN04/SOT0_1/IC03_2/MAD11_0 P15/AN05/SCK0_1/MAD12_0 P16/AN06/SIN2_2/INT14_1/MAD13_0 P17/AN07/SOT2_2/MAD14_0/WKUP3 AVCC AVSS AVRL AVRH P18/AN08/SCK2_2/MAD15_0 P19/AN09/SIN4_1/INT05_1/IC00_1/MAD16_0 P1A/AN10/SOT4_1/IC01_1/MAD17_0 P1B/AN11/SCK4_1/IC02_1/MAD18_0 P1C/AN12/CTS4_1/IC03_1/MAD19_0 P1D/AN13/RTS4_1/DTTI0X_1/MAD20_0 P1E/AN14/ADTG_5/FRCK0_1/MAD21_0 P1F/TIOB6_2/ADTG_4/RTO05_1 P27/TIOA6_2/INT02_2/RTO04_1 P26/SCK2_1/RTO03_1/TIOB5_0 P25/TX1_0/SOT2_1/RTO02_1/TIOA5_0 P24/RX1_0/SIN2_1/INT01_2/RTO01_1 P23/AN15/SCK0_0/TIOA7_1/RTO00_1/MAD22_0 P22/AN16/SOT0_0/TIOB7_1/ZIN1_1/CROUT_0 P21/AN17/SIN0_0/INT06_1/BIN1_1/MAD23_0 P20/AN18/INT05_0/AIN1_1/MAD24_0 VSS PIN2 PIN3 PIN4 PIN5 PIN6 PIN7 PIN8 PIN9 PIN10 PIN11 PIN12 PIN13 PIN14 PIN15 PIN16 PIN17 PIN18 PIN19 PIN20 PIN21 PIN22 PIN23 PIN24 PIN25 PIN26 PIN27 PIN28 PIN29 1 U1-3 PIN2 PIN3 PIN4 PIN5 PIN6 PIN7 PIN8 PIN9 PIN10 PIN11 PIN12 PIN13 PIN14 PIN15 PIN16 PIN17 PIN18 PIN19 PIN20 PIN21 PIN22 PIN23 PIN24 PIN25 PIN26 PIN27 PIN28 PIN29 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 PIN1 PIN2 PIN3 PIN4 PIN5 PIN6 PIN7 PIN8 PIN9 PIN10 PIN11 PIN12 PIN13 PIN14 PIN15 PIN16 PIN17 PIN18 PIN19 PIN20 PIN21 PIN22 PIN23 PIN24 PIN25 PIN26 PIN27 PIN28 PIN29 PIN30 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 VCC P50/INT00_0/AIN0_2/CTS4_0/RTO10_0/MADATA00_0 P51/INT01_0/BIN0_2/RTS4_0/RTO11_0/MADATA01_0 P52/ZIN0_2/SCK4_0/RTO12_0/MADATA02_0 P53/SOT4_0/TIOA1_2/RTO13_0/MADATA03_0 P54/SIN4_0/INT02_0/TIOB1_2/RTO14_0/MADATA04_0 P55/SIN6_0/INT07_2/ADTG_1/RTO15_0/MADATA05_0 P56/SOT6_0/INT08_2/DTTI1X_0/MADATA06_0 P57/SCK6_0/MADATA07_0 P58/SIN4_2/INT04_2/AIN1_0/MADATA08_0 P59/SOT4_2/RX1_1/INT07_1/BIN1_0/MADATA09_0 P5A/SCK4_2/TX1_1/ZIN1_0/MADATA10_0 P5B/CTS4_2/MADATA11_0 P30/TIOB0_1/RTS4_2/INT15_2/MADATA12_0/WKUP1 P31/TIOB1_1/SIN3_1/INT09_2/MADATA13_0 P32/TIOB2_1/SOT3_1/INT10_1/MADATA14_0 P33/INT04_0/TIOB3_1/SCK3_1/ADTG_6/MADATA15_0 P34/FRCK0_0/TIOB4_1/TX0_1/MNALE_0 P35/IC03_0/TIOB5_1/RX0_1/INT08_1/MNCLE_0 P36/IC02_0/SIN5_2/INT09_1/MNWEX_0 P37/IC01_0/SOT5_2/INT05_2/MNREX_0 P38/IC00_0/SCK5_2/INT06_2 P39/DTTI0X_0/ADTG_2/RTCCO_2/SUBOUT_2/MSDCLK_0 P3A/AIN0_0/RTO00_0/TIOA0_1/MSDCKE_0 P3B/BIN0_0/RTO01_0/TIOA1_1/MRASX_0 P3C/ZIN0_0/RTO02_0/TIOA2_1/MCASX_0 P3D/RTO03_0/TIOA3_1/MAD00_0 P3E/RTO04_0/TIOA4_1/MAD01_0 P3F/RTO05_0/TIOA5_1/MAD02_0 VSS 4 VCC_MCU U2-1 U1-1 AN18 AVSS AVRH VCC_MCU X0A C21 C22 R82 C23 4R7 R17 C19 0.1uF 100R C18 10K Cypress 0.1uF D4 1N4148 D1 1N4148 1 2 PIN39_EX 220pF 100nF 10uF R12 AVSS VBAT 0R X1A PIN40_EX VCC_MCU Author: VL Tit le FM4-120L-S6E2HG CN1 AVRL Size ADC PO TENTI O M ETER Docum ent Num ber B MCU Dat e: V10 Sheet Tuesday , August 25, 2015 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** Rev Bat t er y Connect O SCI LLATO R of 3 9 49 Appendix Figure A-2. CMSIS-DAP & JTAG U4 TDO TMS TDI TCK TRSTX SOT0_0 SIN0_0 PIN102 PIN103 PIN104 PIN105 PIN106 PIN87 PIN88 C26 R22 J3 Jumper2 DAP_5V0_IN DAP_5V0_IN 100R VCC_MCU JTAG_5V0_IN JTAG_5V0_IN VCC_MCU 1 2 3 4 5 TRSTX_DAP 6 TCK_DAP 7 TDI_DAP 8 TMS_DAP 9 TDO_DAP 10 RESET_DAP 11 12 13 C27 4.7uF 14 15 16 17 18 19 20 MD1_DAP 21 MD0_DAP 22 X0_DAP 23 X1_DAP 24 VCC VSS P50/SIN3_1/INT00_0/AIN0_2 P81/UDP0 P51/SOT3_1/INT01_0/BIN0_2 P80/UDM0 P52/SOT3_1/INT02_0/ZIN0_2 USBVCC P39/DDTTI0X_0/ADTG_2 P60/SIN5_0/TIOA2_2/INT15_1/IC00_0/WKUP3 P3A/TIOA0_1/RTO00_0/RTCCO_2/SUBOUT_2P61/SOT5_0/TIOB2_2/DTTI0X_2/UHCONX P3B/TIOA1_1/RTO01_0 P0F/MMI/CROUT_1/RTCCO_0/SUBOUT_0/WKUP0 P3C/TIOA2_1/RTO02_0 P04/TDO/SWO P3D/TIOA3_1/RTO03_0 P03/TMS/SWDIO P3E/TIOA4_1/RTO04_0 P02/TDI P3F/TIOA5_1/RTO05_0 P01/TCK/SWCLK VSS P00/TRSTX C P21/SIN0_0/INT06_1/WKUP2 VCC P22/SOT0_0/TIOB7_1/AN07 P46/X0A P23/SCK0_0/TIOA7_1/AN06 P47/X1A AVSS INTX AVRH P49/TIOB0_0 AVCC P4A/TIOB1_0 P15/AN05/IC03_2/SOT0_1 PE0/MD1 P14/AN04/INT03_1/IC02_2/SIN0_1 MD0 P13/AN03/SCK1_1/IC01_2/RTCCO_1/SUBOUT_1 PE2/X0 P12/AN02/SOT1_1/IC00_2 PE3/X1 P11/AN01/SIN1_1/INT02_1/FRCK0_2/IC02_0/WKUP1 VSS P10/AN00 P50 P51 RESET PIN38 0.1uF C28 2 JTAG Module: CLOSED DAP Module: OPEN 1 J3: R32 10K 0.1uF C29 0.1uF 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 VCC_3V3 UDP0 UDM0 USB_VCC_DETECT_DAP UHCONX_DAP C65 0.1uF P22 VCC_MCU SOT1_1 SIN1_1 MB9AF311K/MB9BF321K NC/12pF 3 C30 VCC_MCU R37 1M 1 2 C31 Y3 4MHz RN1 22R TRSTX_DAP 4 TDI_DAP 3 6 TMS_DAP 2 7 TCK_DAP 1 8 NC/12pF TDO_DAP RESET 5 TRSTX TDI TMS TCK TDO R24 R23 22R 100R JTAG_5V0_IN 1 3 5 7 9 11 13 15 17 19 CN2 C24 0.1uF 2 4 6 8 10 12 14 16 18 20 VCC_MCU J1 1 2 Jumper2 R26 VCC_MCU 2 R29 2K R30 2K R33 R34 R35 CN3 DAP_5V0_IN 6K8 10K 22R 22R R36 J2: VCC_MCU 5V: CLOSED VCC_MCU 3V3: OPEN NC R89 2K J19 2 SOT1_1 1 Jumper2 1 2 3 4 5 USB-Micro_B J20 Tar get Running SIN0_0 1 R39 10K MD1_DAP Jumper2 3 R18 2 SOT0_0 2 1 SIN1_1 1 10K VCC_MCU J5 Jumper3 R38 10K MD0_DAP Jumper2 Q2 1 MMS8550 R83 1M UHCONX_DAP R90 Cypress Author: VL Tit le 2K FM4-120L-S6E2HG 2 Connected R88 3 Debugger LED4 Y ELLOW 2 2K7 USB_VCC_DETECT_DAP Jumper2 UDM0 UDP0 LED3 RED R31 G1 G3 1 J4 G2 G4 P51 P50 NC J2 R40 10K P22 Size R91 10K VCC_3V3 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** Docum ent Num ber A4 Rev CMSIS-DAP&JTAG Dat e: V10 Sheet Tuesday , August 25, 2015 of 4 9 50 Appendix Figure A-3. SD Card Interface 5 6 7 8 5 6 7 8 VCC_SD R52 PIN97 PIN96 PIN93 PIN113 RN14 VCC_SD 4 3 2 NC 1 4 3 2 RN17 10K 1 RN15 10K C42 SD_DAT2 1 8 SD_DAT2_0 SD_DAT3 2 7 SD_DAT3_0 SD_CMD 3 6 SD_CMD_0 SD_C/D 4 5 SD_C/D_0 0.1uF 1 2 3 4 5 6 7 8 9 10 11 22 PIN92 PIN95 PIN94 PIN114 RN16 SD_CLK 1 8 SD_CLK_0 SD_DAT0 2 7 SD_DAT0_0 SD_DAT1 3 6 SD_DAT1_0 SD_W/P 4 5 SD_W/P_0 CN5 DAT2 DAT3 CMD C/D VSS1 VDD CLK VSS2 DAT0 DAT1 W/P VIA2 VIA1 GND2 GND1 15 14 13 12 SDSN09-A0-0015 22 VCC_3V3 FB4 VCC_SD 180R@100M Cypress Author: VL Tit le FM4-120L-S6E2HG Size Docum ent Num ber A4 V10 Sheet Tuesday , August 25, 2015 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** Rev Micro SD card interf ace Dat e: of 7 9 51 Appendix Figure A-4. NAND Flash (NOT MOUNTED) VCC_FLASH PIN21 PIN95 PIN19 PIN18 PIN20 MNREX_0 MCSX0_0 MNCLE_0 MNALE_0 MNWEX_0 PIN2 PIN3 PIN4 PIN5 PIN6 PIN7 PIN8 PIN9 R44 R47 R48 R45 R46 22R 22R 22R 22R 22R Flash_RE Flash_CE Flash_CLE Flash_ALE Flash_WE R41 R74 R75 R76 R42 R77 3K3 NC NC NC 3K3 NC MADATA00_0 MADATA01_0 MADATA02_0 MADATA03_0 MADATA04_0 MADATA05_0 MADATA06_0 MADATA07_0 RN3 MADATA07_0 1 MADATA06_0 2 7 Flash_D6 MADATA05_0 3 6 Flash_D5 MADATA04_0 4 VCC_FLASH U5 7 8 9 16 17 18 19 Flash_RE Flash_CE Flash_CLE Flash_ALE Flash_WE 1 2 3 4 5 6 10 11 14 15 20 21 22 23 24 26 27 28 8 Flash_D7 R/B RE CE CLE ALE WE WP VCC VCC VCC VCC D7 D6 D5 D4 D3 D2 D1 D0 NC0 NC1 NC2 NC3 NC4 NC5 NC6 NC7 NC8 NC9 NC10 NC11 NC12 NC13 NC14 NC15 NC16 NC17 VSS VSS VSS VSS NC24 NC23 NC22 NC21 NC20 NC19 NC18 39 37 34 12 44 43 42 41 32 31 30 29 Flash_D7 Flash_D6 Flash_D5 Flash_D4 Flash_D3 Flash_D2 Flash_D1 Flash_D0 48 36 25 13 47 46 45 40 38 35 33 5 Flash_D4 S34ML01G100TFI000 22 RN4 NOTM OUNTED MADATA03_0 1 8 Flash_D3 MADATA02_0 2 7 Flash_D2 MADATA01_0 3 6 Flash_D1 MADATA00_0 4 5 Flash_D0 22 VCC_FLASH VCC_3V3 FB2 VCC_FLASH 180R@100M C32 0.1uF C33 0.1uF Cypress Author: VL Tit le FM4-120L-S6E2HG Size Docum ent Num ber A4 V10 Sheet Tuesday , August 25, 2015 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** Rev NAND FLASH Dat e: of 5 9 52 Appendix Figure A-5. SDRAM (NOT MOUNTED) SDRAM_CS SDRAM_RAS SDRAM_CAS SDRAM_WE SDRAM_LDQM SDRAM_UDQM SDRAM_A0 SDRAM_A1 SDRAM_A2 SDRAM_A3 SDRAM_A4 SDRAM_A5 SDRAM_A6 SDRAM_A7 SDRAM_A8 SDRAM_A9 SDRAM_A10/AP SDRAM_A11 SDRAM_BA0 SDRAM_BA1 37 38 19 18 17 16 15 39 23 24 25 26 29 30 31 32 33 34 22 35 20 21 3 9 43 49 VDDQ VDDQ VDDQ VDDQ MADATA00_0 4 MADATA01_0 3 MADATA02_0 2 MADATA03_0 1 MADATA04_0 4 MADATA05_0 RN5 5 SDRAM_DQ0 SDRAM_CLK 6 SDRAM_DQ1 SDRAM_CKE MCLK_0 R49 22R R50 22R MCKE_0 7 SDRAM_DQ2 8 SDRAM_DQ3 5 SDRAM_DQ4 SDRAM_A4 4 5 MAD04_0 3 6 SDRAM_DQ5 SDRAM_A5 3 6 MAD05_0 MADATA06_0 2 7 SDRAM_DQ6 SDRAM_A6 2 7 MAD06_0 MADATA07_0 1 8 SDRAM_DQ7 SDRAM_A7 1 8 MAD07_0 22 CKE CLK DQ0 DQ1 DQ2 DQ3 DQ4 DQ5 DQ6 DQ7 CS RAS CAS WE LDQM UDQM HY 57V281620HC A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10/AP A11 DQ8 DQ9 DQ10 DQ11 DQ12 DQ13 DQ14 DQ15 2 4 5 7 8 10 11 13 SDRAM_DQ0 SDRAM_DQ1 SDRAM_DQ2 SDRAM_DQ3 SDRAM_DQ4 SDRAM_DQ5 SDRAM_DQ6 SDRAM_DQ7 42 44 45 47 48 50 51 53 SDRAM_DQ8 SDRAM_DQ9 SDRAM_DQ10 SDRAM_DQ11 SDRAM_DQ12 SDRAM_DQ13 SDRAM_DQ14 SDRAM_DQ15 RN7 RN8 22 RN9 MADATA08_0 4 5 SDRAM_DQ8 SDRAM_A8 4 5 MAD08_0 MADATA09_0 3 6 SDRAM_DQ9 SDRAM_A9 3 6 MAD09_0 MADATA10_0 2 7 SDRAM_DQ10 SDRAM_A11 2 7 MAD11_0 MADATA11_0 1 8 SDRAM_DQ11 SDRAM_UDQM1 8 MDQM1_0 8 MDQM0_0 22 BA0 BA1 28 41 54 RN6 22 MADATA12_0 4 MADATA13_0 RN10 22 RN11 5 SDRAM_DQ12 SDRAM_LDQM 1 3 6 SDRAM_DQ13 SDRAM_WE 2 7 MDWEX_0 MADATA14_0 2 7 SDRAM_DQ14 SDRAM_CAS 3 6 MCASX_0 MADATA15_0 1 8 SDRAM_DQ15 SDRAM_RAS 4 5 MRASX_0 VSSQ VSSQ VSSQ VSSQ SDRAM_CKE SDRAM_CLK NC1 NC2 22 6 12 46 52 36 40 VDD VDD VDD U6 VSS VSS VSS MADATA00_0 MADATA01_0 MADATA02_0 MADATA03_0 MADATA04_0 MADATA05_0 MADATA06_0 MADATA07_0 MADATA08_0 MADATA09_0 MADATA10_0 MADATA11_0 MADATA12_0 MADATA13_0 MADATA14_0 MADATA15_0 MCLK_0 MCKE_0 MRASX_0 MCASX_0 MAD00_0 MAD01_0 MAD02_0 MDWEX_0 MAD03_0 MAD04_0 MAD05_0 MAD06_0 MAD07_0 MAD08_0 MAD09_0 MAD10_0 MAD11_0 MAD14_0 MAD15_0 MDQM1_0 MDQM0_0 MCSX8_0 PIN2 PIN3 PIN4 PIN5 PIN6 PIN7 PIN8 PIN9 PIN10 PIN11 PIN12 PIN13 PIN14 PIN15 PIN16 PIN17 PIN23 PIN24 PIN25 PIN26 PIN27 PIN28 PIN29 PIN34 PIN47 PIN48 PIN49 PIN50 PIN62 PIN63 PIN64 PIN65 PIN66 PIN69 PIN74 PIN92 PIN93 PIN35 1 14 27 VCC_SDRAM RN12 22 RN13 SDRAM_A0 1 8 MAD00_0 SDRAM_CS 1 8 MCSX8_0 SDRAM_A1 2 7 MAD01_0 SDRAM_BA0 2 7 MAD14_0 SDRAM_A2 3 6 MAD02_0 SDRAM_BA1 3 6 MAD15_0 SDRAM_A3 4 5 MAD03_0 SDRAM_A10/AP4 5 MAD10_0 NOTM OUNTED 22 VCC_3V3 22 VCC_SDRAM FB3 180R@100M VCC_SDRAM VCC_SDRAM R84 10K SDRAM_CS R51 10K SDRAM_CKE C62 10pF SDRAM_CLK C34 C35 C36 C37 C38 C39 C41 0.1uF 0.1uF 0.1uF 0.1uF 0.1uF 0.1uF 0.1uF Cypress Author: VL Tit le FM4-120L-S6E2HG Size Docum ent Num ber A4 V10 Sheet Tuesday , August 25, 2015 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** Rev SDRAM Dat e: of 6 9 53 Appendix Figure A-6: USB (NOT MOUNTED) J13: VCC_MCU 5V: CLOSED VCC_MCU 3V3: OPEN PIN118 PIN119 PIN54 PIN116 UHCONX 2 MCU_USB_DMCU_USB_D+ 1 Jumper2 FUNCTION_DFUNCTION_D+ INT03_2 R53 2K7[NC] CN4 USB_VCC_DETECT R54 10K R58 R59 22R[NC] 22R[NC] R55 6K8[NC] USB_5V0_IN NMIX R92 NC USB_5V0_IN 3 1 2 3 4 5 G2 G4 R60 2K[NC] USB_5V0_IN USB-Micro_B[NC] G1 G3 J13[NC] PIN115 Q1 1 MMS8550[NC] R63 R87 1M[NC] 2 UHCONX 2K[NC] R66 10K[NC] VCC_3V3 INT03_2 USB_VCC_DETECT NMIX 1 J14 MCU_USB_D- 1 FUNCTION_D- 2 J12[NC] MCU_USB_D+ 1 FUNCTION_D+ 2 J11[NC] 2 3 Jumper3 Jumper2 Jumper2 J14: Program Module: Closed Pin2 to Pin3 User Module: Closed Pin2 to Pin1 J11, J12: Function: CLOSED Host: OPEN Cypress Author: VL Tit le FM4-120L-S6E2HG Size Docum ent Num ber A4 V10 Sheet Tuesday , August 25, 2015 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** Rev USB Dat e: of 8 9 54 Appendix Figure A-7: Power VCC_5V0 VCC_5V0 VCC_3V3 J8 CON2 Vin C63 1 1 2 JTAG_5V0_IN JTAG_5V0_IN U7 GND 3 2 Vout 4 TAB + DAP_5V0_IN DAP_5V0_IN Peripheral_5V0_IN or OUT 1 2 J7 CON2 1 2 J6 CON2 C40 C64 1117-3.3 1uF 100uF/16V 0.1uF 5V Power Select : JTAG Module: Closed J8 DAP Module: Closed J7 Peripheral 5V0 IN or OUT: Closed J6 Peripheral_5V0_IN or OUT Standalone_3V3_OUT VCC_3V3 1 2 J16 CON2 J16: Conect t o Per ipher al Boar d For 5V Input or 5VOutput or 3V3 Output VCC_5V0 3 J15 2 VCC_5V0 T POINT 1 5V0 VCC_3V3 R70 2K 3V3 VSS VCC_MCU VCC_3V3 Jumper3 VCC_MCU 3V3: Closed Pin2 to Pin1 VCC_MCU 5V0: Closed Pin2 to Pin3 T POINT T POINT J15: VCC_5V0 LED5 GREEN TEST PO I NT Cypress Author: VL Tit le FM4-120L-S6E2HG Size Docum ent Num ber A4 V10 Sheet Tuesday , August 25, 2015 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** Rev POWER Dat e: of 9 9 55 Appendix A.2 Bill of Materials Item Qty Reference Value 1 1 CN1 2.54mm, 2pin,Wall 2 1 CN2 2.54mm, 10*2pin,Wall 3 1 CN3 10118192-0001LF 4 4 CN5 5 10 6 3 7 1 Description 2.54mm, 2pin Mfg Mfg part number AIMO 2285-0106ANGO01 AIMO 2285-0110ANGO01 Micro USB type B FCI 10118192-0001LF SDSN09-A0-0015 SD card interface PROCONN SDSN09-A0-0015 Pin header,1*2pin,dip 2.54mm, 2pin header AIMO 1225-1102ANGOS11.501 J15, J20, J21 Pin header,1*3pin,dip 2.54mm, 3pin header AVX 1225-1103ANGOS11.501 U2-1, U2-2 Pin header,30*2pin,dip AIMO 1225-11060ANGOS11.501 J2, J3, J5, J6, J7, J8, J16, J10, J18, J19 connector 2.54mm,10*2pin IDC connector 2.54mm,30*2pin header C1, C2, C3, C7, C9, C10, C11, C12, C13, C18, C19, C24, C26, 8 27 C28, C29, C32, C33, 0.1uF Ceramic Capacitor YAGEO CC0603KRX5R8BB104 C34, C35, C36, C37, C38, C39, C41, C42, C64, C65 9 4 C5, C21 220pF Ceramic Capacitor YAGEO CC0603JRNPO9BN221 10 2 C6, C22 100nF Ceramic Capacitor YAGEO CC0603KRX5R8BB104 11 0 C14, C15, C30, C31 NC/12pF Ceramic Capacitor YAGEO CC0603KKX5R8BB120 12 2 C16, C17 12pF Ceramic Capacitor YAGEO CC0603JRNPO9BN120 13 1 C62 10pF Ceramic Capacitor YAGEO CC0805KKX5R8BB100 14 1 C63 1uF Ceramic Capacitor YAGEO CC0603KKX5R8BB105 15 2 C20, C27 4.7uF Ceramic Capacitor YAGEO CC0603KKX5R8BB475 16 2 C8, C23 10uF Ceramic Capacitor YAGEO CC0603KKX5R8BB106 17 1 C4 10uF/16V Electrolytic Capacitor Panasonic EEE-FK1C100R 18 1 C40 100uF/16V Electrolytic Capacitor Panasonic EEE-1CA101WP 22R Resister Array BOURNS 652-CAT16-220J4LF 10K Resister Array BOURNS 652-CAT16-103J4LF RN1, RN3, RN4, RN5, 19 14 RN6, RN7, RN8, RN9, RN10, RN11, RN12, RN13, RN14, RN16 20 2 RN15, RN17 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 56 Appendix Item Qty 21 4 Reference R1, R78, R79, R80 Value Description Mfg Mfg part number 1K Resister YAGEO RC0603FR-071KL 10K Resister YAGEO RC0603FR-0710KL R2, R4, R15, R16, 22 14 R18, R20, R38, R39, R40, R33, R51, R54, R84, R91 23 1 R5 510R Resister YAGEO RC0603FR-07510RL 24 1 R6 680R Resister YAGEO RC0603FR-07680RL 25 1 R7 220R Resister YAGEO RC0603FR-07220RL 26 4 R8, R12, R13, R14 0R Resister YAGEO RC0603FR-070RL 27 3 R10, R37, R83 1M Resister YAGEO RC0603FR-070RL 28 3 R17, R22, R23 100R Resister YAGEO RC0603FR-071ML 29 10 22R Resister YAGEO RC0603FR-0722RL 2K Resister YAGEO RC0603FR-072KL 2K7 Resister YAGEO RC0603FR-072K7L NC Resister YAGEO RC0603FR-070RL R24, R34, R35, R44, R45, R46, R47, R48, R49, R50 R29, R30, R70, R89, 30 5 31 1 32 0 33 2 R41, R42 3K3 Resister YAGEO RC0603FR-073K3L 34 1 R55, R88 6K8 Resister YAGEO RC0603FR-076K8L 35 2 R81, R82 4R7 Resister YAGEO RC0603FR-074R7L 36 2 R3, R32 10K Resister YAGEO RC0603FR-0710KL 37 1 R11 3386P-1-103T Potentiometer BOURNS 3386P-1-103T 38 1 LED4 LED YELLOW OSRAM LY R976-PS-36 39 1 LED5 LED GREEN OSRAM LG R971-KN-1 40 2 LED1, LED3 LED RED Red LED,0805,SMT OSRAM LH R974-LP-1 41 1 LED2 RGB LED,SMT Cree 42 2 D1, D4 DL4148 Rectifier Diode MMC DL4148 43 3 FB2, FB3, FB4 MPZ1608S101AT Ferrite Bead TDK MPZ1608S101AT 44 1 Q2 MMS8550-H-TP NPN transistor MMC MMS8550-H-TP R90 R31 R26, R36, R52, R74, R75, R76, R77, R92 CLV1A-FKBCJ1M1F1BB7R4S3 Yellow LED,0805,SMT Green LED,0805,SMT FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** CLV1A-FKBCJ1M1F1BB7R4S3 57 Appendix Item Qty 45 3 Reference Value Description Mfg Mfg part number PushSW1, SW2, SW3 ELTSM-62KR-H-T/R button,6*6*5mm, Jinling ELTSM-62KR-H-T/R Cypress S6E2HG6G0A GV20000 Cypress MB9BF312KPMC TI LM1117IMPX-3.3/NOPB Murata CSTCR4M00G15L99-*0 Wisdom QRA-32768A20125B SMT 46 1 U1 47 1 U4 48 1 U7 49 2 Y1, Y3 50 1 Y2 S6E2HG6G0A MCU,176LQFP,0.5m GV20000 m pitch MB9BF312K LM1117IMPX3.3/NOPB MCU,64LQFP,0.5mm pitch Regulator CSTCR4M00G15L99- Ceramic Resonator *0 4M1000ppm QRA-32768A20125B Crystal,32.768K,206 FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 58 Revision History Document Revision History Document Title: FM4 S6E2H-Series Starter Kit Guide Document Number: 002-11387 Revision ECN Number Issue Date Origin of Change Description of Change ** 5179566 03/24/2016 CCTA Initial revision. FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 59