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

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
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
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
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
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
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
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
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
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
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\<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
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
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
Loading...
+ 41 hidden pages