Page 2
(“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 you shall and hereby do release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products.
Page 3
Please ensure you have copied the complete software package related to this starter kit to use and run the links and examples given on the next pages. ▪ Please contact the Cypress Support for any question. SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 4
Peripheral Manual (Timer Part) ▪ Peripheral Manual (Analog Part) KEIL µVision Peripheral Manual (Communication Part) ▪ Contacts More Flash Programming Manual Errata Please visit www.cypress.com to find latest releases of the above mentioned documents. SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 5
Features of the Microcontroller ▪ The FM4-U120-9B560 and FM4-U120-9B560-MEM ® ® are based on the Cypress Arm Cortex -M4 device MB9BF568R ▪ The MB9B560R Series includes the following features: • Up to 1 MByte Flash Memory and 32 KByte Work Flash Memory •...
Page 6
Features of the Board ▪ The FM4-U120-9B560(-MEM) is available in two versions: Feature FM4-U120-9B560 FM4-U120-9B560-MEM External Power Supply USB, DAP, JTAG or from FM4-U-PERIPHERAL On-board Voltage 3.3 V or 5 V 3.3 V User-LEDs, Reset-LED 3x User-LEDs (R,G,B) + Reset...
Page 7
Contents FM4-U120-9B560 ▪ The FM4-U120-9B560(-MEM) contents • The FM4-U120-9B560 or FM4-U120-9B560-MEM evaluation board • One USB mini cable • 1-page flyer Additional information FM4-U120-9B560(-MEM) USB cable SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 8
Please Check Jumper Setting Note: FM4-U120-9B560 supports 5 V and 3.3 V operation Please set J9 (USB) instead of J7 (CMSIS-DAP) FM4-U120-9B560-MEM supports only 3.3 V operation Please set J19 and J20:1-2 (SIN0/SOT0) USBF USBF SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 9
Test it by Terminal using USB ▪ The microcontroller on the FM4-U120-9B560(-MEM) is already preprogrammed with a test application (<drive:>\sw-examples\testsoftware) • Install the USB driver first <drive:>\drivers\driverinstaller.exe • Connect the starter kit to CN4 (USB) with your PC ✓ Ensure jumper J9 (USB) is set for correct power supply ✓...
Page 10
Test it by a GUI ▪ The microcontroller on the FM4-U120-9B560(-MEM) is already preprogrammed with a test application (<drive:>\sw-examples\testsoftware) • Install the USB driver first <drive:>\drivers\driverinstaller.exe • Connect the starter kit to CN4 (USB) with your PC • Open the PC software <drive:>\sw-examples\testsoftware\SK-FM4-U120-9B560_demo.exe...
Page 11
Test it ▪ You finished successfully the first test. ▪ Next section covers: • The onboard features • How to program the Flash ✓ Serial ROM Boot loader USB Direct UART0 ✓ On-board CMSIS-DAP ✓ JTAG with optional emulator • How to start with IAR-Embedded-Workbench and KEIL µVision SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 12
Hardware SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 13
The Hardware (Top Side) – Jumper Overview CMSIS- Expansion Header Pin 1-60 Virt. COM VBat 3V/5V USB- Device- Expansion Header Pin 61-120 Port SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 14
The Hardware (Top Side) – Jumper Function Overview CMSIS- Expansion Header Pin 1-60 Virt. COM VBat MD1/LED Variable Resistor AN18 JTAG JTAG 3V/5V USBF USBF USB- Device- Expansion Header Pin 61-120 Prog/Run Port SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 15
The Hardware (Bottom Side) 2.54mm x 30 Expansion Header Pin 1-60 SD-Card interface (only FM4-U120-9B560) Expansion Header Pin 61-120 2.54mm x 29 SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 22
J1 (2 pin) (Do not change!) Closed: 48MHz Open: 3V3 J2 (2 pin) VBUS detection of CMSIS-DAP Closed: 5V (only for FM4-U120-9B560) Open: CMSIS-DAP normal operation J3 (2 pin) CMSIS-DAP reset Closed: CMSIS-DAP reset assert Open: Run-Mode J4 (2 pin)
Page 23
See also J10 1-2: MCU is powered from 3V3 MCU voltage selection J15 (3 pin) 2-3: MCU is powered from 5V (not FM4-U120-9B560-MEM) FM4-U120-9B560-MEM can be used with 3V3 only Open: Run-Mode and Programming-Mode Operation of MD1 J17 (2 pin)
Page 24
Jumper – Default (Run mode, CMSIS-DAP) FM4-U120-9B560 supports 5V and 3.3V operation FM4-U120-9B560-MEM supports only 3.3V operation USBF USBF SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 25
Jumper – Programming Mode (USB Direct Mode) (U5V) 3V/5V USBF USBF (U5V) Prog SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 26
USB-host (CN4): Close jumper J9 ▪ 3.3V or 5V • Jumper J15 selects the target voltage ✓ FM4-U120-9B560 can operate 3.3V or 5V ✓ FM4-U120-9B560-MEM can operate 3.3V only • Default: J15: 1-2 (3.3V) SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 27
Software SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 28
Software Examples (1/2) Simple Software ▪ Simple example that demonstrates the usage of some peripherals • Available for IAR EWARM or KEIL µVision: <drive:>\sw-examples\ www.cypress.com • mb9bf56xr_template ✓ ‚Empty‘ project as base for user applications • mb9bf56xr_adc_dvm ✓ Digital Voltage Meter based on the A/D-Converter and UART •...
Page 29
: Example for serial communication (UART) mb9bf56xr_pdl_template : Project frame for user applications based on PDL ▪ Functional test • tp_sk-fm4-u120-9b560 ✓ Program for Please check the jumper setting the board features (LEDs, buttons, ADC, USB, ...) SLIDE OWNER...
Page 30
USB Virtual-COM port ✓ Allows UART communication via the PC’s USB connection ✓ Onboard UART-2-USB converter (via CN3, CMSIS-DAP) ✓ Install the latest version from here: http://www.cypress.com/documentation/software-and-drivers/cmsis-dap- spansion-cypress-fm-link • FLASH USB DIRECT Programmer ✓ Microcontroller Flash programming (via CN4, USB-Device-Port) ✓...
Page 31
Flash Programming SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 32
▪ • FLASH USB DIRECT Programmer via CN4 (USB) ✓ Install the latest version from here: http://www.cypress.com/documentation/software-and-drivers/flash-usb-direct- programmer-1 ✓ USB driver is located in subdirectory of FLASH USB DIRECT Programmer • FLASH MCU Programmer via CN3 (Serial by use of virtual COM-port) ✓...
Page 33
Connect the board via USB-Device (CN4) to the USB-Port of the PC ✓ If connected for first time Windows OS may ask for a driver See subfolder ‚driver‘ of USBdirect installation path <drive:>\tools\USBDIRECT\driver • Start the FLASH USB DIRECT Programmer ✓ Install from here: http://www.cypress.com/documentation/software-and- drivers/flash-usb-direct-programmer-1 SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 34
Flash Programming via CN4 (USB Direct) Jumper setting PRG-mode using USB direct (U5V) 3V/5V USBF USBF Connect (U5V) Prog SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 35
Flash Programming via CN4 (USB Direct) ▪ Choose the right target MCU MB9BF568M/N/R ▪ Browse for the programming file (*.srec or *.hex) • IAR: see subfolder <project>\example\IAR\output\release\exe • ARM/KEIL: see subfolder <project>\example\ARM\output\release ▪ Adjust the corresponding virtual COM-port Select MCU: MB9BF568M/N/R Select file (*.srec;...
Page 36
Flash Programming via CN4 (USB Direct) Jumper setting RUN-mode using USB direct (U5V) 3V/5V USBF USBF Connect (U5V) SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 37
When connected for first time Windows OS may ask for ‚spansionusbvcomm.inf‘ <drive:>\drivers\cmsis-dap • Use the FLASH MCU Programmer for FM3/FM4 ✓ Install the latest version from here: http://www.cypress.com/documentation/software-and-drivers/flash-mcu- programmer-1 Note: Do not connect CN4 to PC/USB while using serial programming SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 38
Flash Programming via CN3 (Serial) Jumper setting PRG-mode using CMSIS-DAP (serial communication) Connect (U5V) 3V/5V USBF USBF (U5V) Prog SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 39
Flash Programming via CN3 (Serial) ▪ Choose the right target MCU MB9BF568M/N/R ▪ Select 4MHz Crystal Frequency ▪ Browse for the programming file (*.srec or *.hex) • IAR: see subfolder <project>\example\IAR\output\release\exe • ARM/KEIL: see subfolder <project>\example\ARM\output\release ▪ Adjust the corresponding virtual COM-port Select MCU: MB9BF568M/N/R Select 4MHz Crystal Frequency Select file (*.srec / *.hex)
Page 40
Flash Programming via CN3 (Serial) Jumper setting RUN-mode using CMSIS-DAP (serial communication) Connect (U5V) 3V/5V USBF USBF (U5V) SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 41
JTAG Debugger SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 42
Select used JTAG-adapter within IDE tool chain (No jumper setting is required) ▪ Additional virtual COM port is provided by CN3 ✓ Install the latest version from here: http://www.cypress.com/documentation/software-and-drivers/cmsis-dap- spansion-cypress-fm-link ✓ Please set jumper J19 and J20 accordingly SIN0/SOT0 CN3 (USB)
Page 43
CMSIS-DAP Firmware Update Please see instructions coming with Firmware update package! Install latest version from here: http://www.cypress.com/documentation/software-and-drivers/cmsis-dap- spansion-cypress-fm-link CMSIS- Virt. COM (U5V) 3V/5V USBF USBF (U5V) Prog/Run Prog/Run SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 44
Test it by Terminal using CMSIS - DAP ▪ The microcontroller on the FM4-U120-9B560(-MEM) is already preprogrammed with a test application (<drive:>\sw-examples\testsoftware) • Install latest version from here: Install latest version from here: http://www.cypress.com/documentation/software-and-drivers/cmsis-dap- spansion-cypress-fm-link • Connect the starter kit to CN3 (CMSIS-DAP) with your PC ✓...
Page 45
JTAG Adapter CMSIS-DAP – Using IAR Setup in IAR EWARM (1) Navigate to project options: Via Files-List Right-click at the project Select [Options...] Or via menu tab [Project] Select [Options...] SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 46
JTAG Adapter CMSIS-DAP – Using IAR Setup in IAR EWARM (2) Setup Project Debbuger Options (1) Navigate to [Debugger] (2) Select tab [Setup] (3) Select driver [CMSIS-DAP] (4) Select in [CMSIS-DAP] (5) Select tab [JTAG/SWD] (6) Select [SWD] SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 47
JTAG Adapter CMSIS-DAP – Using Keil Setup in Keil µVision (1) Navigate to project options: Via Project Right-click at the project Select [Options...] Or via menu tab [Project] Select [Options...] SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 48
JTAG Adapter CMSIS-DAP – Using Keil Setup in Keil µVision (2) Setup Debug & Utilities (1) Select tab [Debug] (2) Select [CMSIS-DAP Debugger] (3) Select tab [Utilities] (4) Select [CMSIS-DAP Debugger] SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 49
IAR Embedded Workbench Installation Getting Started Open Project Build Project Debug Project SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 50
IAR Workbench Getting Started ▪ Install EWARM from IAR-CD or download latest version from IAR Website • EWARM size-limited (32k) or time-limited (full) Evaluation Version ✓ http://supp.iar.com/Download/SW/?item=EWARM-EVAL ▪ Start EWARM Workbench ▪ Choose File → Open → Workspace • e.g.: <drive:>\sw-examples\mb9bf56xr_gpio-v11\example\IAR\mb9bf56xr_io.eww SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 51
IAR Workbench – Main Window ▪ IAR Workbench • Workspace on left side of Workbench window ✓ If hidden then View→Workspace • Source files on right side of Workbench window as tabbed windows • Project open File → Open → Workspace → *.eww •...
Page 52
IAR Workbench – Menu Bar ▪ IAR Menu Bar File Control Configuration Build Control (new, open, (compile, make, Control save, etc.) stop build) (e.g. RAM or ROM debugging) Navigation Control Debug Control Edit Control (Find, Bookmarks, File (Breakpoint, start (cut, copy, Navigation, etc.) Debug w/ and w/o paste, undo,...
Page 53
IAR Workbench – Workspace ▪ IAR Workspace Window Project Name Sub Folder Modules Main Modules Module Includes Project Description Project Built Output SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 54
IAR Workbench – Making Project ▪ Making the Project • Use Make-Icon ( ), <F7> or Menu: Project→Make • Check for no errors in Output window below • Build errors are indicated by In Output window and Source view SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 55
IAR Workbench – Download to Target ▪ Download to Target and Start Debugging • Icon, <Ctrl>-D, or Project→Download and Debug • A new menu bar will occur on sucessful connection to target Step Run to Reset Step Debugging Cursor Target Over Stop Step...
Page 56
IAR Workbench – Debug (1) ▪ Source Window • The Source windows do not change contents but get additional information ✓ Current line (PC): ✓ Halted on Breakpoint: ✓ Halted on Data break (example): ▪ Disassembly Window • Shows ‘pure‘ disassebly view •...
Page 57
IAR Workbench – Debug (2) ▪ Watch Window • Watch ✓ Expressions/Variables have to be added by user and are updated by Halt/Breakpoint • Quick Watch ✓ The Quick watch allows the user to calculate and recalculate expressions even with variables ✓...
Page 58
IAR Workbench – Simulator ▪ Simulator • Mark Project File in Workspace • Choose Project→Options • Choose Simulator in Debugger Setup • Start Simulator with usual Icon SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 59
KEIL µVision Installation Getting Started Open Project Build Project Debug Project SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 60
KEIL µVision IDE and Debugger Getting Started ▪ Install µVision from KEIL-CD or download latest version from KEIL Website • Evaluation Version ✓ https://www.keil.com/demo/eval/arm.htm ✓ Registration required ▪ Install ULINK-ME • Special installation is not needed, because ULINK-ME acts as a USB Human Interface Device (HID) and thus needs no extra USB driver ▪...
Page 61
KEIL µVision – Getting Started ▪ Choose Menu: Project→Open Project... • Browse to: <drive:>\sw-examples\mb9bf56xr_gpio-v11\example\ARM\ • Choose mb9bf56xr_gpio.uvproj SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 62
KEIL µVision – Main Window ▪ KEIL µVision • Project window on left side of IDE window ✓ Choose: View→Project Window if hidden • Source files on right side of IDE window as tabbed windows • Output window on bottom side of IDE window SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 63
KEIL µVision – Menu Bars (1) ▪ Menu Bar 1 • Can be moved in bar window area or set floating File Control Navigation Control Project (new, open, (Bookmarks + search, etc.) Window View save, etc.) (Text search, search in files, etc.) Edit Control Debug Control (cut, copy, paste, etc.)
Page 64
KEIL µVision – Menu Bars (2) ▪ Menu Bar 2 • Can be moved in bar window area or set floating Configuration Build Control Manage Books, Control (Compile [Translate], File Extensions, (e.g. RAM or ROM Build, Rebuild, etc.) Environment debugging) MB9BF51x Release Download Target...
Page 65
KEIL µVision – Project Window ▪ µVision Project Window Project Name Startup Code Subfolder Startup Code Source and Header Files Main Project Code Subfolder Main Project Code Source and Header Files Project Description Subfolder and Abstract File SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 66
KEIL µVision – Making Project ▪ Making the Project • Use Rebuild Icon ) or Project→Rebuild all target files • Check for no errors in Output window below • Build errors are shown in Output window. ✓ Can be double-clicked by showing the source line with a blue arrow SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 67
KEIL µVision – Debug (1) ▪ Start Debugging • Download to target first, when MCU Flash does not contain the current application openend and built in the IDE ✓ Use Download Icon ( ) or Menu: Flash→Download • Start Debug Session ✓...
Page 68
KEIL µVision – Debug (2) ▪ Debugging Icon Bar • During a Debug Session there will be visible a new icon bar Reset Step Control Show Windows Tool Box (Command, (Step in, out, etc.) Disassembly, Symbols, (can be Target Registers, Call Stack) customized) Debug Start/...
Page 69
KEIL µVision – Debug (3) ▪ Source View • The Source windows do not change contents but get additional information Active Breakpoint Disabled Breakpoint Current Program Counter Current Cursor Line of Source Code Code Lines with compiled Instructions (dark grey SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 70
KEIL µVision – Debug (4) ▪ Disassembly View • Mixed mode is selectable and deselectable Active Breakpoint Disabled Breakpoint Current Program Counter Current Cursor Line of Code highlighted in yellow background ( ) SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 71
KEIL µVision – Debug (5) ▪ Memory Window • Up to 4 Memory windows can be displayed in tabs • Memory is updated during runtime • Memory window tabs are shared with Watch windows ▪ Register View • Register view is a tab of the Project window •...
Page 72
KEIL µVision – Debug (6) ▪ Variable Windows • Watch Windows ✓ Up to 2 Watch windows are sharing their tabs with e.g. Memory and Local views ✓ Updated during runtime ✓ Any changes are highlighted in dark blue text backround color ✓...
Page 73
KEIL µVision – Trace (ULINK ME) ▪ Trace via ITM • Simple Trace views via Instrumentation Trace Macro is supported by µLINK ME ✓ Records ✓ Exceptions ✓ Counters SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 74
KEIL µVision – Trace (ULINK Pro) (1) ▪ Trace via ETM • Check settings in menu: Flash→Configure Flash Tools... Tab:Debug enables ETM pins SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 75
KEIL µVision – Trace (ULINK Pro) (2) ▪ Instruction Trace • Real Time Trace recording • Output can be filtered by several ETM and ITM events • Trace buffer is held in PC memory and transfered to µVision on break SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 76
KEIL µVision – Simulator ▪ Simulator • The Core Simulator can be selected by the menu: [Flash] → [Configure Flash Tools...] → [Debug] and then choosing [Use Simulator] • Look & feel is like using ULINK debugger • Controlable also with *.ini files SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 77
Finally SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 78
Cypress Support ▪ Please check the following website, for any available updates www.cypress.com SLIDE OWNER SHOW TITLE MM/DD/YY...
Page 79
According to the European WEEE-Directive and its implementation into national laws we take this device back. • For disposal please send the device to the following address: Cypress Semiconductor 198 Champion Court San Jose, CA 95134 USA Tel: +1-408-943-2600 ▪...
Need help?
Do you have a question about the FM4-U120-9B560 and is the answer not in the manual?
Questions and answers