Cypress FM4 S6E2H, FM4-120L-S6E2HG Series Manual

Page 1
Starter Kit Guide
FM4 S6E2H-Series
Doc. No. 002-11387 Rev. **
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
Phone (Intnl): +1 408.943.2600
www.cypress.com
Page 2
Copyright
© 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, non-
exclusive, 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
Page 3
Contents
1. Introduction ................................................................................................................................................................. 4
1.1 Kit Contents ........................................................................................................................................................ 5
1.2 Board Details ...................................................................................................................................................... 6
1.3 Jumper and Connector ....................................................................................................................................... 8
1.4 Getting Started ................................................................................................................................................... 9
1.5 Additional Learning Resources ........................................................................................................................... 9
1.6 Technical Support ............................................................................................................................................... 9
1.7 Acronyms.......................................................................................................................................................... 10
2. Installation and Test Operation ............................................................................................................................... 11
2.1 Install Software ................................................................................................................................................. 11
2.2 Uninstall Software ............................................................................................................................................. 14
2.3 Test Operation .................................................................................................................................................. 15
3. Hardware ................................................................................................................................................................... 22
3.1 System Block Diagram ..................................................................................................................................... 22
3.2 Hardware Features ........................................................................................................................................... 22
3.3 Hardware Details .............................................................................................................................................. 23
4. Software Development ............................................................................................................................................. 28
4.1 Tool Options ..................................................................................................................................................... 28
4.2 Example Projects .............................................................................................................................................. 33
4.3 Flash Programming .......................................................................................................................................... 43
A. Appendix ................................ ................................................................ ................................................................... 49
A.1 Schematic ......................................................................................................................................................... 49
A.2 Bill of Materials ................................................................................................................................................. 56
Revision History ................................................................................................................................................................ 59
Document Revision History ........................................................................................................................................ 59
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 3
Page 4
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® Cortex®-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 S6E2G­Series are few of the prominent series of device families. This kit uses a device from the S6E2H­Series.
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® Cortex®-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
Page 5
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
Page 6
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
Page 7
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
Page 8
Introduction
Connector
Description
CN1
Battery connector
CN2
20-pin JTAG interface
CN3
USB port of CMSIS-DAP
CN5
SD card interface
Jumper
Function
Setting
J2
VBUS detection of CMSIS-DAP Used for VBUS detection function (pin
60) of MB9AF312K on board
Open: For on-board voltage is 3.3V
Closed: For on-board voltage is 5.0V
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, J8
Power supply source select Select only one power source!
Closed J6: Powered by peripheral at J16
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
1.3 Jumper and Connector
Table 1-1: Connector Description
Table 1-2: Jumper Description
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 8
Page 9
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
Page 10
Introduction
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
1.7 Acronyms
Table 1-3. Acronyms Used in this Document
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 10
Page 11
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. 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® 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.
2. 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
Page 12
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
Page 13
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
Page 14
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\<User Name>\My Documents\Cypress\FM_PDL_2.0.1
And, the example projects will be extracted to this default directory:
C:\Users\<User Name>\My Documents\Cypress \FM4 S6E2H-Series Starter Kit_Ver01
In the rest of the document, the following directory is termed as <User_Directory>:
C:\Users\<User Name>\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 <User_Directory>.
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 14
Page 15
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.
<User_Directory>:\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
Page 16
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
Page 17
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
Page 18
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
Page 19
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
Page 20
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
Page 21
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
Page 22
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
Page 23
Hardware
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
Jumper-J21
Port
Function
Close 2~3
PE0
Drive the blue LED
Close 1~2
MD1
Serial programming mode
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® Cortex®-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 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
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 23
Page 24
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
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
Page 25
Hardware
Pin No.
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
Table 3-3 shows the signals of the SD card interface.
Table 3-3: Signals of SD Card Interface
3.3.4 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
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 25
Page 26
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
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
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 26
Page 27
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
Page 28
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® 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 tools 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
Page 29
Software Development
2. Click File > Open > Workspace and select the workspace file s6e2hg_adc.eww from
<User_Directory>:\ FM4 S6E2H-Series Starter Kit_Ver01
\Firmware\Demo Projects\s6e2hg_adc\IAR
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 29
Page 30
Software Development
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
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
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
Page 31
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:
<Keil_Install_Directory>:\ARM\flash.
If the flash loader files are not there, copy them to the above folder from:
<User_Directory>:\FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\<Project>\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
<User_Directory>:\FM4 S6E2H-Series Starter Kit_Ver01\Firmware
\Demo Projects\s6e2hg_adc\ARM.
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 31
Page 32
Software Development
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
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
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
Page 33
Software Development
#
Projects
Title/Description
1
s6e2hg_adc
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 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.
2
s6e2hg_bt_pwm
Title: Base Timer Description: This project demonstrates the base timer operation of the S6E2HG
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.
3
s6e2hg_dma
Title: Direct Memory Access (DMA) Description: This project demonstrates DMA operation of the S6E2HG device. This
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.
4
s6e2hg_ext_int
Title: External Interrupt 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.
5
s6e2hg_flash
Title: Flash Write 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. Refer to section Flash Write for the details.
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:
<User_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:
<User_Directory>:\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.
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 33
Page 34
Software Development
#
Projects
Title/Description
6
s6e2hg_gpio
Title: 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.
7
s6e2hg_mfs_uart
Title: Multi-function Serial Interface 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. Refer to section UART Communication for details.
8
s6e2hg_mft_frt
Title: Multi-function Timer Description: This project demonstrates the multi-function timer (MFT) operation of the
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.
9
s6e2hg_rtc
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 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.
10
s6e2hg_sleep_mode
Title: Sleep Mode Description: This project demonstrates the sleep mode operation of the S6E2HG
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.
11
s6e2hg_sw_wdt
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 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.
12
s6e2hg_wc
Title: Watch Timer 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
Page 35
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: <User_Directory>: \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_adc\IAR\s6e2hg_adc.eww. Keil project: <User_Directory>: \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
Page 36
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. Turn the potentiometer, the ADC values will change accordingly.
4.2.2 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: <User_Directory>: \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
Page 37
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: <User_Directory>: \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
Page 38
Software Development
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.
4.2.3 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
Page 39
Software Development
2. Open the project file in IAR Embedded Workbench from the following directory on your PC:
IAR project: <User_Directory>: \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: <User_Directory>: \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
Page 40
Software Development
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.
4.2.4 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: <User_Directory>: \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_mfs_uart\IAR\s6e2hg_mfs_uart.eww. Keil project:<User_Directory>: \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
Page 41
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
Page 42
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: <User_Directory>: \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_sleep_mode\IAR\s6e2hg_sleep_mode.eww. Keil project: <User_Directory>: \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
6. Press the SW3 key to wake up the MCU.
7. The RGB LED (LED2) will glow with green color.
4.2.6 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
Page 43
Software Development
Jumper
Position
Description
J2
Open
Sets MB9AF312K to 3.3V.
J3
Open
Enable MB9AF312K CMSIS-DAP for debugging and programming purpose.
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: <User_Directory>: \FM4 S6E2H-Series Starter Kit_Ver01\Firmware \Demo Projects\s6e2hg_st_wdt\IAR\s6e2hg_st_wdt.eww. Keil project: <User_Directory>: \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
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 43
Page 44
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
Page 45
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
Page 46
Software Development
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
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
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:
<User_Directory>: \FM4 S6E2H-Series Starter Kit_Ver01\Firmware\CMSIS-DAP
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 46
Page 47
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
Page 48
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
Page 49
A. Appendix
VCC_MCU
PIN2 PIN4
PIN3
PIN7
PIN6
PIN5
PIN10
PIN9
PIN8
PIN12
PIN11
PIN15
PIN14
PIN13
PIN17
PIN16
PIN20
PIN19
PIN18
PIN23
PIN22 LED_G
PIN21
NMIX
PIN25
PIN24
PIN28
PIN27
PIN26
PIN29
C20
4.7uF
C
J10 Jumper2
1
2
C21 220pF
C23 10uF
C22 100nF
R8 0R
VCC_MCU
AVRL
R1 1K
PIN33
PIN32
PIN36
PIN35
PIN34
PIN38 R ESET
PIN37
PIN40 X1A
PIN39 X0A
PIN43 VBAT
PIN42 VW AKEUP
PIN41
PIN44 C
PIN48 PIN50
PIN49
PIN53
PIN52
PIN51
R12 0R
PIN56
PIN55
PIN54
PIN57 MD0 PIN59 X1
PIN58 X0
LED1 RED
AVCC
PIN89 AN18
PIN83
PIN64
PIN68
PIN77
PIN85
PIN62
PIN78
PIN74
PIN63
PIN86
AVCC
PIN84
ADC
PIN82 LED_R
PIN67
PIN81
PIN80
PIN79
AVRH
PIN66
PIN65
PIN69
PIN76
PIN75
PIN93
PIN92
PIN95
PIN94
PIN98
PIN97
PIN96
PIN101
PIN100
PIN99
PIN103
PIN102
PIN105
PIN104 PIN106
PIN110
PIN109
PIN108 INT
PIN112
PIN111
PIN115
PIN114
PIN113
PIN118
PIN116 NMIX PIN117
PIN119
X1
X0
X0A
OSCILLATOR
D4 1N4148
VBAT
VCC_MCU
PIN47
J21 Jumper3
123
LED_B
MD1
PIN87
PIN87
PIN88
PIN88
PIN56
PIN86 PIN88
PIN87
C5 220pFC810uFC6100nF
VCC_MCU
AVSS
X1A
R13 0R
R14 0R
X1A
J10:
Program Module: Open User Module: Closed
Title
Size Document Number Rev
Date: Sheet of
MCU V10
FM4-120L-S6E2HG
Cypress
Author: VL
3 9Tuesday, August 25, 2015
B
VWAKEUP
R20 10K
PIN90
PIN61
AVRLPIN72
PIN68
PIN89
PIN83 PIN85
PIN62 PIN64
PIN78
PIN74
PIN77
Y1 4MHz
1
2
3
AVRHPIN73
PIN84
PIN63
PIN79
PIN82
PIN67
AVSSPIN71
PIN31
AVCCPIN70
PIN81
PIN80
PIN69
PIN76
PIN66
PIN75
PIN65
C13
0.1uF
VCC_3V3
PIN1
PIN39_EX PIN40_EX
LED2
LED-RGB
PIN58_EX PIN59_EX
MD0
J18
Jumper2
1
2
J17
Jumper2
1
2
MD1
R15 10K
MODE
R16 10K
VCC_MCU
VCC_MCU
CN1
1 2
D1 1N4148
J22 J umper2
1
2
PIN58_EX
X0
LED_G
LED_R LED_B
C9
0.1uF
C12
0.1uF
U1-4
S6E2HG6G0A
VCC
91
P0E/SCS6_1/TIOB5_2/IC 13_0/S_CLK_0/MDQM1_0
92
P0D/SCK6_1/TIOA5_2/I C12_0/S_CMD_0/MDQM0_0
93
P0C/SOT6_1/TIOA6_1/IC11_0/ S_DATA1_0/MALE_0
94
P0B/SIN6_1/TIOB6_1/I NT00_1/IC10_0/S_DATA0_0/MCSX0_0
95
P0A/SIN1_0/IN T12_2/FRCK1_0/S_DATA3_0/MCSX1_0
96
P09/TRACED0/AN19/ TIOA3_2/SOT1_0/S_DATA2_0/MCSX5_0
97
P08/TRACED1/AN20/ TIOB3_2/SCK1_0/MCSX4_0
98
P07/TRACED2/AN21/ TIOA0_2/SCK7_0/MCLKOUT_0
99
P06/TRACED3/AN22/ TIOB0_2/SOT7_0/MCSX3_0
100
P05/TRACECLK/AN23/ ADTG_0/SIN7_0/IN T01_1/MCSX2_0
101
P04/TDO/SWO
102
P03/TMS/SWDIO
103
P02/TDI/MCSX6_0
104
P01/TCK/SWCLK
105
P00/TRSTX/MCSX7_0
106
VSS
107
P68/SCK3_0/TIOB7_2/IN T00_2
108
P67/SOT3_0/TIOA7_2
109
P66/SIN3_0/ADTG_8/I NT11_2
110
P65/TIOB7_0/SCK5_1
111
P64/TIOA7_0/SOT5_1/INT10_2
112
P63/CROUT_1/I NT03_0/SIN5_1/RX0_2/S_CD_0/ MWEX_0
113
P62/INT04_1/SIN5_0/ ADTG_3/TX0_2/S_WP_0/MOEX_0
114
P61/SOT5_0/TIOB2_2/UHCON X0/RTCCO_0/SUBOUT_0
115
P60/SCK5_0/TIOA2_2/NMIX/MRDY _0/WKUP0
116
USBVCC
117
P80/UDM0
118
P81/UDP0
119
VSS
120
VCC_MCU
C3
0.1uF
U1-2
S6E2HG6G0A
VCC
31
P40/TIOA0_0/RTO10_1/INT12_1
32
P41/TIOA1_0/RTO11_1/INT13_1
33
P42/TIOA2_0/RTO12_1/MSDWEX_0
34
P43/TIOA3_0/RTO13_1/ADTG_7/MCSX8_0
35
P44/TIOA4_0/RTO14_1/DA0
36
P45/TIOB0_0/RTO15_1/DA1
37
INITX
38
P46/X0A
39
P47/X1A
40
P48/VREGCTL
41
P49/VWAKEUP
42
VBAT
43
C
44
VSS
45
VCC
46
P4B/TIOB1_0/SCS7_1/MAD03_0
47
P4C/TIOB2_0/SCK7_1/AI N1_2/MAD04_0
48
P4D/TIOB3_0/SOT7_1/INT13_2/BI N1_2/MAD05_0
49
P4E/TIOB4_0/SIN7_1/I NT11_1/ZIN1_2/F RCK1_1/MAD06_0/WKU P2
50
P70/TX0_0/TIOA4_2/AIN0_1/IC13_1
51
P71/INT15_1/RX0_0/TIOB4_2/BIN 0_1/IC12_1
52
P72/SIN2_0/IN T14_2/TIOA6_0/ZIN0_1/I C11_1
53
P73/SOT2_0/INT03_2/TIOB6_0/IC 10_1
54
P74/SCK2_0/DTTI1X_1
55
PE0/MD1
56
MD0
57
PE2/X0
58
PE3/X1
59
VSS
60
C10
0.1uF
SW1 SW-B3F
231
4
J23 J umper2
1
2
X1
U1-3
S6E2HG6G0A
VCC
61
P10/AN00/SIN1_1/ INT02_1/RX1_2/FRCK0_2/ MAD07_0
62
P11/AN01/SOT1_1/TX1_2/IC00_2/MAD08_0
63
P12/AN02/SCK1_1/R TCCO_1/SUBOUT_1/IC 01_2/MAD09_0
64
P13/AN03/SIN0_1/ INT03_1/IC02_2/MAD10_0
65
P14/AN04/SOT0_1/IC03_2/ MAD11_0
66
P15/AN05/SCK0_1/MAD12_0
67
P16/AN06/SIN2_2/ INT14_1/MAD13_0
68
P17/AN07/SOT2_2/MAD14_0/WKU P3
69
AVCC
70
AVSS
71
AVRL
72
AVRH
73
P18/AN08/SCK2_2/MAD15_0
74
P19/AN09/SIN4_1/ INT05_1/IC00_1/MAD16_0
75
P1A/AN10/SOT4_1/IC01_1/ MAD17_0
76
P1B/AN11/SCK4_1/I C02_1/MAD18_0
77
P1C/AN12/C TS4_1/IC03_1/MAD19_0
78
P1D/AN13/R TS4_1/DTTI0X_1/MAD20_0
79
P1E/AN14/ADTG_5/FR CK0_1/MAD21_0
80
P1F/TIOB6_2/ADTG_4/RTO05_1
81
P27/TIOA6_2/INT02_2/RTO04_1
82
P26/SCK2_1/RTO03_1/TIOB5_0
83
P25/TX1_0/SOT2_1/RTO02_1/TIOA5_0
84
P24/RX1_0/SIN2_1/IN T01_2/RTO01_1
85
P23/AN15/SCK0_0/TIOA7_1/ RTO00_1/MAD22_0
86
P22/AN16/SOT0_0/TIOB7_1/ZI N1_1/CROUT_0
87
P21/AN17/SIN0_0/ INT06_1/BIN1_1/MAD23_0
88
P20/AN18/INT05_0/AI N1_1/MAD24_0
89
VSS
90
PIN59_EX
VCC_MCU
J24 J umper2
1
2
PIN39_EX
X0A
PIN46
J25 J umper2
1
2
PIN40_EX
X1A
U2-2
EXPORT_120
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
SW2 SW-B3F
231
4
R2 10K
PIN45
SW3 SW-B3F
231
4
PIN107
C14 NC/12pF
C16 12pF
R3 10K
C15 NC/12pF
C1
0.1uF
C17 12pF
U1-1
S6E2HG6G0A
VCC
1
P50/INT00_0/AIN0_2/ CTS4_0/RTO10_0/MADATA00_0
2
P51/INT01_0/BIN0_2/ RTS4_0/RTO11_0/MADATA01_0
3
P52/ZIN0_2/ SCK4_0/RTO12_0/MADATA02_0
4
P53/SOT4_0/TIOA1_2/RTO13_0/MADATA03_0
5
P54/SIN4_0/IN T02_0/TIOB1_2/RTO14_0/MADATA04_0
6
P55/SIN6_0/IN T07_2/ADTG_1/RTO15_0/MADATA05_0
7
P56/SOT6_0/INT08_2/DTTI1X_0/MADATA06_0
8
P57/SCK6_0/MADATA07_0
9
P58/SIN4_2/IN T04_2/AIN1_0/MADATA08_0
10
P59/SOT4_2/RX1_1/INT07_1/BIN1_0/ MADATA09_0
11
P5A/SCK4_2/TX1_1/ZIN1_0/MADATA10_0
12
P5B/CTS4_2/MADATA11_0
13
P30/TIOB0_1/RTS4_2/INT15_2/MADATA12_0/W KUP1
14
P31/TIOB1_1/SIN3_1/I NT09_2/MADATA13_0
15
P32/TIOB2_1/SOT3_1/INT10_1/MADATA14_0
16
P33/INT04_0/TIOB3_1/SCK3_1/ ADTG_6/MADATA15_0
17
P34/FRCK0_0/ TIOB4_1/TX0_1/MNALE_0
18
P35/IC03_0/TIOB5_1/R X0_1/INT08_1/MNCLE_0
19
P36/IC02_0/SIN 5_2/INT09_1/MNWEX_0
20
P37/IC01_0/SOT5_2/IN T05_2/MNREX_0
21
P38/IC00_0/SCK5_2/ INT06_2
22
P39/DTTI0X_0/ADTG_2/RTCCO_2/SUBOU T_2/MSDCLK_0
23
P3A/AIN0_0/R TO00_0/TIOA0_1/MSDCKE_0
24
P3B/BIN0_0/R TO01_0/TIOA1_1/MRASX_0
25
P3C/ZIN 0_0/RTO02_0/TIOA2_1/MCASX_0
26
P3D/RTO03_0/TIOA3_1/MAD00_0
27
P3E/RTO04_0/TIOA4_1/MAD01_0
28
P3F/RTO05_0/TIOA5_1/MAD02_0
29
VSS
30
C7
0.1uF
PIN5
PIN4
PIN3
PIN2
PIN9
PIN8
PIN7
PIN6
PIN13
PIN12
PIN11
PIN10
PIN17
PIN16
PIN15
PIN14
PIN21
PIN20
PIN19
PIN18
U2-1
EXPORT_120
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
PIN25
PIN24
PIN23
PIN22
PIN29
PIN28
PIN27
PIN26
Battery Connect
+
C4
10uF/16V
U2-4
EXPORT_120
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
R9 10M[NC]
R4 10K
C11
0.1uF
U2-3
EXPORT_120
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
R17 100R
C18
0.1uF
C2
0.1uF
C19
0.1uF
AVSS
R10 1M
AN18
R11
10KY2
32.768KHz
NMIX
PIN3
PIN2
PIN5
PIN4
PIN8
PIN7
PIN6
PIN11
PIN10
PIN9
PIN13
PIN12
PIN16
PIN15
PIN14
PIN19
PIN18
PIN17
PIN21
PIN20
PIN24
PIN23
PIN22
PIN27
PIN26
PIN25
PIN29
PIN28
PIN32
PIN35
PIN34
PIN33
PIN37
PIN36 PIN38
INT
PIN43
PIN42
PIN41
PIN44
PIN48
PIN47
PIN51
PIN50
PIN49
R81 4R7
INT
PIN53
PIN52
PIN56
PIN55
PIN54
PIN57
PIN64
PIN63
PIN62
PIN67
PIN66
PIN65
PIN69
PIN68
PIN75
PIN74
PIN77
PIN76
PIN80
PIN79
PIN78
PIN83
PIN82
PIN81
PIN85
PIN84
PIN120
PIN91
PIN86
PIN89
PIN93
PIN92
PIN96
PIN95
PIN94
PIN34
PIN33
PIN32
PIN99
PIN98
PIN97
PIN37
PIN36
PIN35
PIN101
PIN100
PIN40
PIN39
PIN38
PIN104
PIN103
PIN102
PIN106
PIN105
PIN109
PIN108
RESET
PIN41
PIN112
PIN111
PIN110
PIN45
PIN44
PIN43
PIN42
RESET
PIN115
PIN114
PIN113
PIN49
PIN48
PIN47
PIN46
PIN116
PIN53
PIN52
PIN51
PIN50
PIN119
PIN118
PIN57
PIN56
PIN55
PIN54
VCC_MCU
PIN59
PIN58
VCC_MCU
VCC_MCU
VCC_MCU
VCC_MCU
VCC_MCU
VCC_MCU
VCC_MCU
R82 4R7
PIN30
PIN94
PIN93
PIN92
PIN98
PIN97
PIN96
PIN95
PIN102
PIN101
PIN100
PIN99
PIN106
PIN105
PIN104
PIN103
PIN110
PIN109
PIN108
PIN107
PIN114
PIN113
PIN112
PIN111
PIN116
PIN115
PIN119
PIN118
PIN117
LED
PIN60
R7 680R
R6 220R
R5 510R
R78 1K
R79 1K
R80 1K
POTENTIOMETER
A.1 Schematic
Figure A-1. MCU
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 49
Page 50
Appendix
R30 2K
LED3 RED
VCC_MCU
C27 4. 7uF
TMS
TDO
TRSTX
TCK
TDI
LED4 YELLOW
R37 1M
C29
0.1uF
U4
MB9AF311K/MB9BF321K
VCC
1
P50/SIN3_1/ INT00_0/AIN0_2
2
P51/SOT3_1/INT01_0/BI N0_2
3
P52/SOT3_1/INT02_0/Z IN0_2
4
P39/DDTTI0X_0/ADTG_2
5
P3A/TIOA0_1/RTO00_0/R TCCO_2/SUBOUT_2
6
P3B/TIOA1_1/RTO01_0
7
P3C/TIOA2_1/R TO02_0
8
P3D/TIOA3_1/R TO03_0
9
P3E/TIOA4_1/RTO04_0
10
P3F/TIOA5_1/R TO05_0
11
VSS
12
C
13
VCC
14
P46/X0A
15
P47/X1A
16
INTX
17
P49/TIOB0_0
18
P4A/TIOB1_0
19
PE0/MD1
20
MD0
21
PE2/X0
22
PE3/X1
23
VSS
24
P10/AN00
25
P11/AN01/SI N1_1/INT02_1/F RCK0_2/IC02_0/WKUP1
26
P12/AN02/SOT1_1/I C00_2
27
P13/AN03/SC K1_1/IC01_2/R TCCO_1/SUBOU T_1
28
P14/AN04/I NT03_1/IC02_2/SI N0_1
29
P15/AN05/I C03_2/SOT0_1
30
AVCC
31
AVRH
32
AVSS
33
P23/SCK0_0/TIOA7_1/ AN06
34
P22/SOT0_0/TIOB7_1/AN07
35
P21/SIN0_0/ INT06_1/WKUP2
36
P00/TRSTX
37
P01/TCK/SWC LK
38
P02/TDI
39
P03/TMS/SWDIO
40
P04/TDO/SWO
41
P0F/MMI/CR OUT_1/RTCCO_0/SUBOUT_0/WKUP0
42
P61/SOT5_0/TIOB2_2/DTTI0X_2/UHC ONX
43
P60/SIN5_0/ TIOA2_2/INT15_1/IC 00_0/WKUP3
44
USBVCC
45
P80/UDM0
46
P81/UDP0
47
VSS
48
C30 N C/12pF
R29 2K
R32 10K
C31 N C/12pF
PIN103
PIN102
PIN106
PIN105
PIN104
VCC_MCU
J20 Jum per3
1
2
3
R18 10K
VCC_MCU
R83 1M
J3:
JTAG Module: CLOSED DAP Module: OPEN
VCC_3V3
C65
0.1uF
J5
Jumper2
1
2
MD0_DAP
J4
Jumper2
1
2
MD1_DAP
R38 10K
R39 10K
VCC_MCU
VCC_MCU
R23 100R
TCK
RN1 22R
1
2 7
8
3
4
6
5
R24 22R
RESET
TDO_DAP
TDI_DAP
TRSTX_DAP
TCK_DAP
TMS_DAP
R26 NC
C24
0.1uF
CN2
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
VCC_MCU
TMS
JTAG_5V0_IN
J3 Jumper2
1
2
TDO P22
J1
Jumper2
1 2
TDI
R40 10K
J2:
VCC_MCU 5V: CLOSED VCC_MCU 3V3: OPEN
TRSTX
VCC_MCU
P22
TCK_DAP TDI_DAP
TRSTX_DAP
TDO_DAP
TMS_DAP
PIN38
RESET
R22 100R
RESET_DAP
MD0_DAP
MD1_DAP
C26 0. 1uF
C28
0.1uF
Y3
4MHz
1
2
3
X0_DAP X1_DAP
DAP_5V0_IN
DAP_5V0_IN
JTAG_5V0_IN
JTAG_5V0_IN
UHCON X_DAP
USB_VCC_D ETECT_DAP
DAP_5V0_IN
CN3
USB-Micro_B
G1G2G3
G4
1 2 3 4 5
UHCON X_DAP
R90 2K
R89 2K
R91 10K
SIN1_1
VCC_3V3
J19 Jum per2
1
2
SOT1_1
R34 22R R35 22R
UDP0
UDM0
R36 NC
UDP0 UDM0
SIN1_1
SOT1_1
R31 2K7
J2
Jumper2
1 2
R88 6K8
USB_VCC_D ETECT_DAP
R33 10K
P51
P50
Title
Size Document Number Rev
Date: Sheet of
CMSIS-DAP&JTAG V10
FM4-120L-S6E2HG
Cypress
Author: VL
4 9Tuesday, August 25, 2015
A4
P51
P50
Target
Runnin g
Debugger
Connected
Q2 MMS8550
1
3
2
SOT0_0 SIN0_0
SOT0_0
SIN0_0
PIN87 PIN88
Figure A-2. CMSIS-DAP & JTAG
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 50
Page 51
Appendix
RN14
22
1 2 7
8
3 4
6 5
RN16
22
1 2 7
8
3 4
6 5
SD_W/P SD_W/P_0
RN15 10K
1
2
7
8
3
4
6
5
RN17 10K
1
2
7
8
3
4
6
5
PIN95
SD_DAT0 SD_DAT1
PIN94
PIN92
SD_CLK
SD_DAT0_0 SD_DAT1_0
SD_CLK_0
SD_CMD
PIN93
SD_C/D
PIN113
SD_C/D _0
PIN97
SD_DAT2
PIN96
SD_DAT3 SD_DAT3_0
SD_DAT2_0
Title
Size Document Number Rev
Date: Sheet of
Micro SD card interf ace V10
FM4-120L-S6E2HG
Cypress
Author: VL
7 9Tuesday, August 25, 2015
A4
SD_CMD_0
R52 NC
C42 0.1uF
CN5
SDSN09-A0-0015
DAT2
1
DAT3
2
CMD
3
C/D
4
VSS1
5
VDD
6
CLK
7
VSS2
8
DAT0
9
DAT1
10
W/P11GND1
12
GND2
13
VIA1
14
VIA2
15
VCC_SD
FB4 180R@100M
VCC_SD
PIN114
VCC_SDVCC_3V3
Figure A-3. SD Card Interface
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 51
Page 52
Appendix
RN4
22
1 2 7
8
3 4
6 5
R41 3K3R44 22R
PIN3
PIN2
PIN5
PIN4
PIN8
PIN7
PIN6
PIN19 PIN18
PIN9
PIN21
PIN20
VCC_FLASH
PIN95
VCC_FLASH
VCC_FLASH
VCC_FLASHVCC_3V3
NOT MOUNTED
U5
S34ML01G100TFI000
NC0
1
NC1
2
NC2
3
NC3
4
NC4
5
R/B
7
RE
8
CE
9
NC5
6
VCC
37
VSS
36
NC6
10
NC7
11
CLE
16
ALE
17
WE
18
WP
19
NC8
14
NC9
15
NC10
20
NC11
21
NC12
22
NC13
23
NC14
24
NC15
26
NC16
27
D0
29
D1
30
D2
31
D3
32
NC17
28
NC18
33
NC19
35
VSS
48
VCC
34
NC20
38
NC21
40
NC22
45
D4
41
D5
42
D6
43
D7
44
NC23
46
NC24
47
VCC
12
VCC
39
VSS
13
VSS
25
Flash_D5 Flash_D4
Flash_D6
Flash_D3
Flash_D7
Flash_D0
Flash_D1
Flash_D2
R77 NC
Flash_RE
R76 NC
Flash_CLE
R75 NC
Flash_ALE Flash_WE
R74 NC
Flash_D5
Flash_D7 Flash_D6
Flash_D1
Flash_D2
Flash_D3
MADATA00_0
Flash_D4
Flash_D0
MADATA02_0 MADATA01_0
MADATA05_0 MADATA04_0
MADATA03_0
MADATA07_0 MADATA06_0
Title
Size Document Number Rev
Date: Sheet of
NAND FLASH V10
FM4-120L-S6E2HG
Cypress
Author: VL
5 9Tuesday, August 25, 2015
A4
MADATA01_0
MADATA00_0
MADATA04_0
MADATA03_0
MADATA02_0
MADATA07_0
MADATA06_0
MADATA05_0
Flash_CLE
Flash_REMNR EX_0
Flash_WE
Flash_ALE
MNCLE_0
MCSX0_0 Flash_CE
MNWEX_0
MNALE_0
Flash_CE
R47 22R
FB2 180R@100M
R48 22R R45 22R
C32
0.1uF
RN3
22
1 2 7
8
3 4
6 5
R46 22R
C33
0.1uF
R42 3K3
Figure A-4. NAND Flash (NOT MOUNTED)
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 52
Page 53
Appendix
RN7
22
1
2 7
8
3
4
6
5
C39
0.1uF
R49 22R
RN13
22
1 2 7
8
3 4
6 5
U6
HY57V281620H C
NC1
36
NC2
40
CKE
37
CLK
38
CS
19
RAS
18
CAS
17
WE
16
LDQM
15
UDQM
39
A0
23
A1
24
A2
25
A3
26
A4
29
A5
30
A6
31
A7
32
A8
33
A9
34
A10/AP
22
A11
35
BA0
20
BA1
21
DQ0
2
DQ1
4
DQ2
5
DQ3
7
DQ4
8
DQ5
10
DQ6
11
DQ7
13
DQ8
42
DQ9
44
DQ10
45
DQ11
47
DQ12
48
DQ13
50
DQ14
51
DQ15
53
VDD14VDD1VDD
27
VDDQ9VDDQ3VDDQ43VDDQ
49
VSS54VSS41VSS28VSSQ6VSSQ12VSSQ46VSSQ
52
C36
0.1uF
RN12
22
1 2 7
8
3 4
6 5
R51 10K C34
0.1uF
RN10
22
1
2 7
8
3
4
6
5
R50 22R
C62 10pF
PIN4
PIN3
PIN2
PIN7
PIN6
PIN5
PIN9
PIN8
PIN12
PIN11
PIN10
PIN15
PIN14
PIN13
PIN17
PIN16
PIN25
PIN24
PIN23
PIN28
PIN27
PIN26
PIN34
PIN29
PIN49
PIN48
PIN47
PIN63
PIN62
PIN50
PIN65
PIN64
PIN74
PIN69
PIN66
PIN35
PIN93
PIN92
VCC_SDR AM
VCC_3V3
VCC_SDR AM
VCC_SDR AM
VCC_SDR AM
SDRAM_CLK
SDRAM_UDQM MDQM1_0
SDRAM_CKE
SDRAM_CS
SDRAM_DQ0 SDRAM_DQ1 SDRAM_DQ2 SDRAM_DQ3
SDRAM_DQ5
SDRAM_DQ4 SDRAM_DQ6
SDRAM_DQ7
SDRAM_DQ9
SDRAM_DQ8
SDRAM_DQ10 SDRAM_DQ11
SDRAM_DQ13
SDRAM_DQ12 SDRAM_DQ14
SDRAM_DQ15
SDRAM_CKE SDRAM_CLK
SDRAM_CS SDRAM_RAS SDRAM_CAS SDRAM_WE SDRAM_LDQM SDRAM_UDQM
SDRAM_A0 SDRAM_A1 SDRAM_A2
SDRAM_A4
SDRAM_A3 SDRAM_A5
SDRAM_A8
SDRAM_A7
SDRAM_A6
SDRAM_A9 SDRAM_A11
SDRAM_A10/AP
SDRAM_BA0 SDRAM_BA1
SDRAM_A0
SDRAM_A3
SDRAM_A2
SDRAM_A1
SDRAM_A4
SDRAM_A7
SDRAM_A6
SDRAM_A5
SDRAM_A8
SDRAM_A11
SDRAM_A9
SDRAM_LDQM
SDRAM_RAS
SDRAM_CAS
SDRAM_WE
MADATA00_0
MADATA03_0
MADATA02_0
MADATA01_0
MADATA05_0
MADATA04_0
MADATA08_0
MADATA07_0
MADATA06_0
MADATA11_0
MADATA10_0
MADATA09_0
MADATA13_0
MADATA12_0
MADATA15_0
MADATA14_0
MCKE_0
MCLK_0
MCASX_0
MRASX_0
MAD02_0
MAD01_0
MAD00_0
MDWEX_0 MAD04_0
MAD03_0
MAD06_0
MAD05_0 MAD07_0 MAD09_0
MAD10_0 MAD11_0
MAD08_0
MAD15_0
MAD14_0 MDQM1_0
MDQM0_0 MCSX8_0
SDRAM_DQ0
SDRAM_DQ3
SDRAM_DQ2
SDRAM_DQ1
SDRAM_DQ5
SDRAM_DQ4
SDRAM_DQ8
SDRAM_DQ7
SDRAM_DQ6
SDRAM_DQ11
SDRAM_DQ10
SDRAM_DQ9
SDRAM_DQ13
SDRAM_DQ12
SDRAM_BA0
SDRAM_CS
NOT MOUNTED
SDRAM_DQ15
SDRAM_DQ14
SDRAM_A10/AP
SDRAM_BA1
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
SDRAM_CLK
MADATA13_0 MADATA14_0
SDRAM_CKE
MADATA15_0
MAD00_0 MAD01_0
Title
Size Document Number Rev
Date: Sheet of
SDRAM V10
FM4-120L-S6E2HG
Cypress
Author: VL
6 9Tuesday, August 25, 2015
A4
MAD02_0 MAD03_0
MAD04_0 MAD05_0 MAD06_0 MAD07_0
MAD08_0 MAD09_0 MAD11_0
MAD10_0
MDWEX_0
MCLK_0 MCKE_0
MRASX_0
MCASX_0
MAD14_0 MAD15_0
MCSX8_0
MDQM0_0
RN11
22
1 2 7
8
3 4
6 5
RN5
22
1
2 7
8
3
4
6
5
RN9
22
1
2 7
8
3
4
6
5
R84 10K
RN8
22
1
2 7
8
3
4
6
5
RN6
22
1
2 7
8
3
4
6
5
C38
0.1uF
C41
0.1uF
C37
0.1uF
FB3 180R@100M
C35
0.1uF
Figure A-5. SDRAM (NOT MOUNTED)
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 53
Page 54
Appendix
FUNC TION_D­FUNC TION_D+
FUNC TION_D-
MCU_USB_D-
FUNC TION_D+
MCU_USB_D+
UHCON X
MCU_USB_D+
MCU_USB_D-
UHCON X
USB_5V0_IN
INT03_2
R58 22R[N C] R59 22R[N C]
R63 2K[NC ]
R60 2K[NC]
R66 10K[NC ]
USB_5V0_IN
PIN115
PIN119
PIN118
PIN54
VCC_3V3
R53 2K7[NC]
J13[NC ]
Jumper2
1
2
J11, J12:
Function: CLOSED Host: OPEN
J13:
VCC_MCU 5V: CLOSED VCC_MCU 3V3: OPEN
USB_5V0_IN
CN4 USB-Micro_B[NC]
G1G2G3
G4
1 2 3 4 5
R92 NC
R55 6K8[NC]R54 10K
USB_VCC_D ETECT
PIN116
NMIX
USB_VCC_D ETECT
INT03_2
NMIX
J14
Jumper3
1 2 3
J14:
Program Module: Closed Pin2 to Pin3 User Module: Closed Pin2 to Pin1
Q1 MMS8550[NC]
1
3
2
R87 1M[NC]
Title
Size Document Number Rev
Date: Sheet of
USB V10
FM4-120L-S6E2HG
Cypress
Author: VL
8 9Tuesday, August 25, 2015
A4
J12[NC ]
Jumper2
1 2
J11[NC ]
Jumper2
1 2
Figure A-6: USB (NOT MOUNTED)
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 54
Page 55
Appendix
LED5 GREEN
R70 2K
1117-3.3
U7
GND
1
Vout
2
Vin
3
TAB
4
C64
0.1uF
C63 1uF
VCC_3V3
VCC_MCU
VCC_5V0
VCC_3V3
J15
Jumper3
1
2
3
5V0
T POINT
VSS
T POINT
5V Power Select:
JTAG Module: Closed J8 DAP Module: Closed J7 Peripheral 5V0 IN or OUT: Closed J6
J15:
VCC_MCU 3V3: Closed Pin2 to Pin1 VCC_MCU 5V0: Closed Pin2 to Pin3
TEST POINT
J16: Conect to Peripheral Board
For 5V Input or 5VOutput or 3V3 Output
Peripheral_5V0_IN or OUT
VCC_5V0
J16
CON2
1 2
Peripheral_5V0_IN or OUT Standalone_3V3_OUT
VCC_5V0
VCC_3V3
DAP_5V0_IN
DAP_5V0_IN
JTAG_5V0_IN
JTAG_5V0_IN
VCC_5V0
3V3
T POINT
VCC_5V0
VCC_3V3
Title
Size Document Number Rev
Date: Sheet of
POWER V10
FM4-120L-S6E2HG
Cypress
Author: VL
9 9Tuesday, August 25, 2015
A4
+
C40
100uF/16V
J8 CON2
1 2
J7 CON2
1 2
J6 CON2
1 2
Figure A-7: Power
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 55
Page 56
Appendix
Item
Qty
Reference
Value
Description
Mfg
Mfg part number
1 1 CN1
2.54mm, 2pin,Wall
2.54mm, 2pin connector
AIMO
2285-0106ANGO01
2 1 CN2
2.54mm, 10*2pin,Wall
2.54mm,10*2pin IDC connector
AIMO
2285-0110ANGO01 3 1 CN3
10118192-0001LF
Micro USB type B
FCI
10118192-0001LF
4 4 CN5
SDSN09-A0-0015
SD card interface
PROCONN
SDSN09-A0-0015
5
10
J2, J3, J5, J6, J7, J8, J16, J10, J18, J19
Pin header,1*2pin,dip
2.54mm, 2pin header
AIMO
1225-1102ANGOS11.501 6 3 J15, J20, J21
Pin header,1*3pin,dip
2.54mm, 3pin header
AVX
1225-1103ANGOS11.501
7 1 U2-1, U2-2
Pin header,30*2pin,dip
2.54mm,30*2pin header
AIMO
1225-11060ANGOS11.501
8
27
C1, C2, C3, C7, C9, C10, C11, C12, C13, C18, C19, C24, C26, C28, C29, C32, C33, C34, C35, C36, C37, C38, C39, C41, C42, C64, C65
0.1uF
Ceramic Capacitor
YAGEO
CC0603KRX5R8BB104
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
19
14
RN1, RN3, RN4, RN5, RN6, RN7, RN8, RN9, RN10, RN11, RN12, RN13, RN14, RN16
22R
Resister Array
BOURNS
652-CAT16-220J4LF 20 2 RN15, RN17
10K
Resister Array
BOURNS
652-CAT16-103J4LF
A.2 Bill of Materials
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 56
Page 57
Appendix
Item
Qty
Reference
Value
Description
Mfg
Mfg part number
21 4 R1, R78, R79, R80
1K
Resister
YAGEO
RC0603FR-071KL
22
14
R2, R4, R15, R16, R18, R20, R38, R39, R40, R33, R51, R54, R84, R91
10K
Resister
YAGEO
RC0603FR-0710KL 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
R24, R34, R35, R44, R45, R46, R47, R48, R49, R50
22R
Resister
YAGEO
RC0603FR-0722RL 30
5
R29, R30, R70, R89, R90
2K
Resister
YAGEO
RC0603FR-072KL 31 1 R31
2K7
Resister
YAGEO
RC0603FR-072K7L
32
0
R26, R36, R52, R74, R75, R76, R77, R92
NC
Resister
YAGEO
RC0603FR-070RL 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
Yellow LED,0805,SMT
OSRAM
LY R976-PS-36
39 1 LED5
LED GREEN
Green LED,0805,SMT
OSRAM
LG R971-KN-1 40 2 LED1, LED3
LED RED
Red LED,0805,SMT
OSRAM
LH R974-LP-1
41 1 LED2
CLV1A-FKB­CJ1M1F1BB7R4S3
RGB LED,SMT
Cree
CLV1A-FKB­CJ1M1F1BB7R4S3
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
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 57
Page 58
Appendix
Item
Qty
Reference
Value
Description
Mfg
Mfg part number
45 3 SW1, SW2, SW3
ELTSM-62KR-H-T/R
Push­button,6*6*5mm, SMT
Jinling
ELTSM-62KR-H-T/R 46 1 U1
S6E2HG6G0A GV20000
MCU,176LQFP,0.5m m pitch
Cypress
S6E2HG6G0A GV20000
47 1 U4
MB9BF312K
MCU,64LQFP,0.5mm pitch
Cypress
MB9BF312KPMC
48 1 U7
LM1117IMPX-
3.3/NOPB
Regulator
TI
LM1117IMPX-3.3/NOPB
49 2 Y1, Y3
CSTCR4M00G15L99­*0
Ceramic Resonator 4M,1000ppm
Murata
CSTCR4M00G15L99-*0 50 1 Y2
QRA-32768A20125B
Crystal,32.768K,206
Wisdom
QRA-32768A20125B
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 58
Page 59
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.
Document Revision History
FM4 S6E2H-Series Starter Kit Guide, Doc. No. 002-11387 Rev. ** 59
Loading...