Quick Start Guide

SK-FM3-176PMC-FA V1.1
User Guide V1.0
1
© 2013 Spansion Inc.
Warranty and Disclaimer
The use of the deliverables (deliverables shall include, but not limited to, software, application examples, hardware, target boards, evaluation boards, starter kits, schematics, engineering samples of IC’s etc.)
is subject to the terms and conditions of Spansion LLC and its affiliates (“SPANSION”) as set out below and in (i) the terms and conditions of the License Agreement and/or the Sale and Purchase Agreement
and/or any other agreement under which deliverables have been delivered, (ii) the technical descriptions and (iii) all accompanying written materials.
1. Please note that the deliverables are intended for and must only be used for test applications in an evaluation laboratory environment.
2. The software deliverables are provided on an as-is basis without charge and are subject to alterations. It is the user’s obligation to fully test the software in its environment and to ensure proper
functionality, qualification and compliance with component specifications.
3. Regarding hardware deliverables, the following limited warranty shall apply:
Except as otherwise provided in the following paragraphs, for a period of one (1) year from date of shipment to customer (“Warranty Period”), SPANSION warrants the hardware deliverables (i) are free of
defects in material and workmanship, and (ii) conform to SPANSION applicable data sheet specifications (available at www.spansion.com or upon request).
This warranty does not extend beyond the first purchaser of the deliverables. The liability of SPANSION under this warranty is limited, at SPANSION’s option, solely to repair the deliverable, to send
replacement deliverable, or to make an appropriate credit adjustment or refund in an amount not to exceed the original purchase price actually paid for the deliverable returned to SPANSION. SPANSION’S
warranty obligations are conditioned upon the following: (a) SPANSION is promptly notified in writing by customer during the applicable warranty period of any defect or nonconformance in the deliverable,
(b) customer obtains authorization from SPANSION to return the defective deliverable, (c) the defective deliverable is returned to SPANSION in accordance with SPANSION’S shipping instructions set forth
below, and (d) SPANSION’S examination of such deliverable discloses to its satisfaction that any defect or nonconformance actually existed and was not caused by improper use or operation outside of the
data sheet specifications for the deliverable, abuse, negligence, improper installation, accident, loss or damage in transit, or unauthorized repair or alteration by a person other than SPANSION. Customer
shall ship such defective deliverable to SPANSION via SPANSION’S carrier, collect. Risk of loss will transfer to SPANSION when the defective deliverable is provided to SPANSION’S carrier. If customer fails
to adhere to these warranty returns guidelines, customer shall assume all risk of loss and shall pay for all freight to SPANSION’S specified location. This warranty shall not apply to any deliverables that have
been repaired or altered, except those which have been repaired or altered by SPANSION. The aforementioned provisions do not extend the original warranty period of any deliverable that has either been
repaired or replaced by Seller.
THESE WARRANTIES ARE IN LIEU OF ALL OTHER WARRANTIES, EXPRESSED, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, AND ANY WARRANTY OTHERWISE ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE. SPANSION NEITHER ASSUMES NOR
AUTHORIZES ANY OTHER PERSON TO ASSUME FOR IT ANY OTHER LIABILITIES. THE FOREGOING CONSTITUTES CUSTOMER’S SOLE AND EXCLUSIVE REMEDY FOR THE FURNISHING OF DEFECTIVE OR
NONCONFORMING DELIVERABLES.
4. The following limitation of liability shall apply for all deliverables
EXCEPT FOR DAMAGES FOR BODILY INJURY OR DEATH, SPANSION SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, RELIANCE, OR CONSEQUENTIAL DAMAGES, RELIANCE
DAMAGES, AND/OR PUNITIVE, OR EXEMPLARY DAMAGES, WHETHER ANY SUCH DAMAGES ARE BASED ON CONTRACT, TORT OR ANY OTHER LEGAL THEORY, AND WHETHER OR NOT SPANSION HAS
BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES, AND NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.
REGARDLESS OF THE BASIS ON WHICH CUSTOMER IS ENTITLED TO CLAIM DAMAGES FROM SPANSION (INCLUDING FUNDAMENTAL BREACH, NEGLIGENCE, MISREPRESENTATION, OR OTHER
CONTRACT OR TORT CLAIM), SPANSION ENTIRE LIABILITY IN ANY CALENDAR YEAR, REGARDLESS OF THE NUMBER OF CLAIMS, SHALL NOT EXCEED FIFTY PERCENT (50%) OF THE TOTAL AMOUNT
PAID BY CUSTOMER TO SPANSION FOR THE DELIVERABLES SOLD IN SUCH CALENDAR YEAR.
5. Should one of the above stipulations be or become invalid and/or unenforceable, the remaining stipulations shall stay in full effect.
6. The contents of this document are subject to change by SPANSION without a prior notice, thus contact SPANSION about the latest one.
This board and its deliverables must only be used for test applications in an evaluation laboratory environment.
2
© 2013 Spansion Inc.
Index
Contents
 Hardware
− Features
 Debugging Keil
− Pin-List
 Support/Contact
− Jumper Settings
 Examples
− Test Routine
− MODBUS TCP
− EtherCAT
 Serial Programming
 USB Programming
3
 Debugging IAR (EWARM)
© 2013 Spansion Inc.
 Appendix
Introduction
Thank you for purchasing SK-FM3-176PMC-FA!
 SK-FM3-176PMC-FA is a
versatile evaluation board to
develop industrial automation
applications based on
Spansion‘s FM3 microcontroller
MB9BD10T Series
 It was conceived especially as a
reference platform to explore
and develop Industrial Ethernet
solutions.
4
© 2013 Spansion Inc.
SK-FM3-176PMC-FA box content
 The SK-FM3-176PMC-FA kit contains
− SK-FM3-176PMC-FA evaluation board with MB9BFD18T
− USB cable
− CD: Documentation, software examples and development utilities
CD
Additional information
B
A
ESD-foam
ESD-box
SK-FM3-176PMC-FA
USB cable
 The SK-FM3-176PMC-FA kit may be used for test applications in an
evaluation laboratory environment only!
5
© 2013 Spansion Inc.
Hardware
6
© 2013 Spansion Inc.
Hardware
Structure of SK-FM3-176PMC-FA
I²C/SPI/UART header
MFS6
Eth 0
MII
Flash
SRAM
Bus
RJ45 with RJ45 with
magnetics magnetics
EtherCAT LEDs
PHY
PHY
EtherCAT
Controller
(ET1100)
SPI
MFS5
MB9BFD18T
DC/DC
MFS1
JTAG
Trace
Trace
Debug
FT2232D
UART
MFS0
Device
USB
Host
USB
PHY
SPI
PPG
RGB LED
RST
Reset button
FRAM
LCD
MFS4
I²C
FRAM
JTAG
Switch
Micrel KSZ8893
GPIO
5 pushbuttons
ADC
Variable resistor
QPRC
ADC
MFT
Motor I/F
Power LED
8-12V
(power)
PHY
RJ45 with
magnetics
CAN x 2
RJ45 with
magnetics
CAN 0 CAN 1
SK-FM3-176PMC-FA is a versatile evaluation board to develop
industrial automation applications based on Spansion‘s FM3
microcontroller MB9BD10T Series
7
© 2013 Spansion Inc.
Hardware
Features of SK-FM3-176PMC-FA
 FM3 Microcontroller MB9BFD18T
 LCD Display and
 2x Ethernet via industrial switch
 RGB-LED
 2x EtherCAT via ASIC
 2x High-speed CAN-Transceiver
 2x USB-Host (Type-A connector)
 1x USB-Device (Type-B connector)
 1x USB-to-serial converter (Type-B
connector)
 UART and OpenOCD JTAG
simultaneously
8
 5x pushbutton (User buttons)
 Variable resistor
 Reset-button and Reset-LED
 16MByte NOR flash memory
 2MByte SRAM memory
 JTAG and Trace Interface
 On-board 5V and 3V voltage regulators
to supply MCU and on-board
components
 Motor-Control-Interface
 RoHS compliant
 Multicon (I²C, SPI, LIN, UART)
 CE conform
© 2013 Spansion Inc.
Hardware
SK-FM3-176PMC-FA components
ETH1
ETH0
Device
Host 0/1
CAN1
CAN0
Trace
VCOM
Vin: 8..20V
Power
switch S2
Run/Prog
switch S1
Variable
Resistor
Ethernet
switch
FRAM
2x16 LCD Module
EtherCAT
ASIC
MB9BFD18T
Reset
button
EtherCAT
FRAM
SRAM
Flash
Five user
buttons
ECAT1
ECAT OUT
9
© 2013 Spansion Inc.
ECAT 0
ECAT IN
MultiCon
JTAG
Motion Control I/F
Hardware
Pin-List SK-FM3-176PMC-TFT (1/8)
Pin
10
Function
1 VCC
Description
MCUVCC
2 PA0/RTO20_0/TIOA08_0/FRCK1_0
pushbutton UP
3 PA1/RTO21_0/TIOA09_0/IC10_0
pushbutton RIGHT
4 PA2/RTO22_0/TIOA10_0/IC11_0
pushbutton DOWN
5 PA3/RTO23_0/TIOA11_0/IC12_0
pushbutton LEFT
6 PA4/RTO24_0/TIOA12_0/IC13_0/RX0_2/INT03_0
pushbutton CENTER
7 PA5/RTO25_0/TIOA13_0/TX0_2/INT10_2
FREE (GPIO HEADER J1, pin 1)
8 P05/TRACED0/TIOA05_2/SIN4_2/INT00_1
TRACE
9 P06/TRACED1/TIOB05_2/SOT4_2/INT01_1
TRACE/LCD/FRAM (SDA)
10 P07/TRACED2/ADTG_0/SCK4_2
TRACE/LCD/FRAM (SCL)
11 P08/TRACED3/TIOA00_2/CTS4_2
TRACE/LCD (LED brightness)
12 P09/TRACECLK/TIOB00_2/RTS4_2/DTTI2X_0
TRACE/LCD (RST)
13 P50/INT00_0/AIN0_2/SIN3_1/RTO10_0/IC20_0/MOEX_0
Flash / SRAM Output Enable
14 P51/INT01_0/BIN0_2/SOT3_1/RTO11_0/IC21_0/MWEX_0
15 P52/INT02_0/ZIN0_2/SCK3_1/RTO12_0/IC22_0/MDQM0_0
Flash / SRAM Write Enable
SRAM byte access
16 P53/SIN6_0/TIOA01_2/INT07_2/RTO13_0/IC23_0/MDQM1_0
SRAM byte access
17 P54/SOT6_0/TIOB01_2/RTO14_0/MALE_0
USB Host/Device switch
18 P55/SCK6_0/ADTG_1/RTO15_0/MRDY_0
Flash memory
19 P56/SIN1_0/INT08_2/TIOA09_2/DTTI1X_0/MNALE_0
MFS1 (SPI to Ethernet switch)
20 P57/SOT1_0/TIOB09_2/INT16_1/MNCLE_0
MFS1 (SPI to Ethernet switch)
21 P58/SCK1_0/TIOA11_2/INT17_1/MNWEX_0
MFS1 (SPI to Ethernet switch)
22 P59/SIN7_0/RX1_1/TIOB11_2/INT09_2/MNREX_0
MFS1 CS (SPI to Ethernet witch)
© 2013 Spansion Inc.
Hardware
Pin-List SK-FM3-176PMC-TFT (2/8)
Pin
11
Function
Description
23 P5A/SOT7_0/TX1_1/TIOA13_1/INT18_1/MCSX0_0
SRAM Chip Enable (CS 0)
24 P5B/SCK7_0/TIOB13_1/INT19_1/MCSX1_0
25 P5C/TIOA06_2/INT28_0/IC20_1
Flash Chip Enable (CS 1)
Multicon (GINT)
26 P5D/TIOB06_2/INT29_0/DTTI2X_1
ET1100 (SPI_SEL)
27 VSS
GND
28 P30/AIN0_0/TIOB00_1/INT03_2
Multicon (TINT)
29 P31/BIN0_0/TIOB01_1/SCK6_1/INT04_2
Multicon
30 P32/ZIN0_0/TIOB02_1/SOT6_1/INT05_2
Multicon
31 P33/INT04_0/TIOB03_1/SIN6_1/ADTG_6
Multicon
32 P34/FRCK0_0/TIOB04_1/TX0_1
CAN0 Connector (CANL)
33 P35/IC03_0/TIOB05_1/RX0_1/INT08_1
CAN0 Connector (CANH)
34 P36/IC02_0/SIN5_2/INT09_1/TIOA12_2/MCSX2_0
ET1100 (SPI_DI)
35 P37/IC01_0/SOT5_2/INT10_1/TIOB12_2/MCSX3_0
ET1100 (SPI_DO)
36 P38/IC00_0/SCK5_2/INT11_1/MCLKOUT_0
ET1100 (SPI_CLK)
37 P39/DTTI0X_0/ADTG_2
Motion Control I/F
38 P3A/RTO00_0/TIOA00_1
Motion Control I/F
39 P3B/RTO01_0/TIOA01_1
Motion Control I/F
40 P3C/RTO02_0/TIOA02_1
Motion Control I/F
41 P3D/RTO03_0/TIOA03_1
Motion Control I/F
42 P3E/RTO04_0/TIOA04_1
Motion Control I/F
43 P3F/RTO05_0/TIOA05_1
Motion Control I/F
44 VSS
GND
© 2013 Spansion Inc.
Hardware
Pin-List SK-FM3-176PMC-TFT (3/8)
Pin
12
Function
45 VCC
Description
MCUVCC
46 P40/TIOA00_0/RTO10_1/INT12_1
ET1100 (SPI_IRQ)
47 P41/TIOA01_0/RTO11_1/INT13_1
ET1100 (EEPROM_LOADED)
48 P42/TIOA02_0/RTO12_1
ET1100 (RESET ET1100 & PHYs)
49 P43/TIOA03_0/RTO13_1/ADTG_7
RGB LED
50 P44/TIOA04_0/RTO14_1
RGB LED
51 P45/TIOA05_0/RTO15_1
RGB LED
52 C
C-pin
53 VSS
GND
54 VCC
MCUVCC
55 P46/X0A
Subclock (optional)
56 P47/X1A
Subclock (optional)
57 INITX
RESET button, JTAG (x3), Flash
58 P48/DTTI1X_1/INT14_1/SIN3_2
Multicon (RESET)
59 P49/TIOB00_0/IC10_1/AIN0_1/SOT3_2
FREE (GPIO HEADER J1, pin 2)
60 P4A/TIOB01_0/IC11_1/BIN0_1/SCK3_2/MADATA00_0
External Bus Address Line 0
61 P4B/TIOB02_0/IC12_1/ZIN0_1/MADATA01_0
External Bus Address Line 1
62 P4C/TIOB03_0/IC13_1/SCK7_1/AIN1_2/MADATA02_0
External Bus Address Line 2
63 P4D/TIOB04_0/FRCK1_1/SOT7_1/BIN1_2/MADATA03_0
External Bus Address Line 3
64 P4E/TIOB05_0/INT06_2/SIN7_1/ZIN1_2/MADATA04_0
External Bus Address Line 4
65 P70/TX0_0/TIOA04_2/MADATA05_0
External Bus Address Line 5
66 P71/RX0_0/INT13_2/TIOB04_2/MADATA06_0
External Bus Address Line 6
© 2013 Spansion Inc.
Hardware
Pin-List SK-FM3-176PMC-TFT (4/8)
Pin
13
Function
Description
67 P72/SIN2_0/INT14_2/AIN2_0/MADATA07_0
External Bus Address Line 7
68 P73/SOT2_0/INT15_2/BIN2_0/MADATA08_0
External Bus Address Line 8
69 P74/SCK2_0/ZIN2_0/MADATA09_0
External Bus Address Line 9
70 P75/SIN3_0/ADTG_8/INT07_1/MADATA10_0
External Bus Address Line 10
71 P76/SOT3_0/TIOA07_2/INT11_2/MADATA11_0
External Bus Address Line 11
72 P77/SCK3_0/TIOB07_2/INT12_2/MADATA12_0
External Bus Address Line 12
73 P78/AIN1_0/TIOA15_0/MADATA13_0
External Bus Address Line 13
74 P79/BIN1_0/TIOB15_0/INT23_1/MADATA14_0
External Bus Address Line 14
75 P7A/ZIN1_0/INT24_1/MADATA15_0
76 P7B/TIOB07_0/INT10_0
External Bus Address Line 15
FREE (GPIO HEADER J1, pin 4)
77 P7C/TIOA07_0/INT11_0
Pushbutton IRQ
78 P7D/TIOA14_1/FRCK2_1/INT12_0
FREE (GPIO HEADER J1, pin 5)
79 P7E/TIOB14_1/IC21_1/INT24_0
Motion Control I/F
80 P7F/TIOA15_1/IC22_1/INT25_0
Motion Control I/F
81 PF0/TIOB15_1/SIN1_2/INT13_0/IC23_1
Motion Control I/F
82 PF1/TIOA08_1/SOT1_2/INT14_0
USB Host-Overcurrent
83 PF2/TIOB08_1/SCK1_2/INT15_0
FREE (GPIO HEADER J1, pin 6)
84 PE0/MD1
MD1 = VSS
85 MD0
86 PE2/X0
MD0 (Low = RUN, High = PROG.)
4MHz Crystal
87 PE3/X1
4MHz Crystal
88 VSS
GND
© 2013 Spansion Inc.
Hardware
Pin-List SK-FM3-176PMC-TFT (5/8)
Pin
14
Function
Description
89 VCC
VCC
90 P10/AN00/MCSX7_0
91 P11/AN01/SIN1_1/INT02_1/RX1_2/FRCK0_2/MCSX6_0
Motion Control I/F
CAN1 Connector (CANH)
92 P12/AN02/SOT1_1/TX1_2/IC00_2/MCSX5_0
CAN1 Connector (CANL)
93 P13/AN03/SCK1_1/IC01_2/MCSX4_0
Variable Resistor (RP1)
94 P14/AN04/SIN0_1/INT03_1/IC02_2/MAD00_0
FREE (GPIO HEADER J1, pin 3)
95 P15/AN05/SOT0_1/IC03_2/MAD01_0
External Bus Address Line 1
96 P16/AN06/SCK0_1/INT20_1/MAD02_0
External Bus Address Line 2
97 P17/AN07/SIN2_2/INT04_1/MAD03_0
External Bus Address Line 3
98 P18/AN08/SOT2_2/INT21_1/MAD04_0
External Bus Address Line 4
99 P19/AN09/SCK2_2/INT22_1/MAD05_0
External Bus Address Line 5
100 P1A/AN10/SIN4_1/INT05_1/TIOA13_2/IC00_1/MAD06_0
External Bus Address Line 6
101 P1B/AN11/SOT4_1/INT25_1/TIOB13_2/IC01_1/MAD07_0
External Bus Address Line 7
102 P1C/AN12/SCK4_1/INT26_1/TIOA14_2/IC02_1/MAD08_0
External Bus Address Line 8
103 P1D/AN13/CTS4_1/INT27_1/TIOB14_2/IC03_1/MAD09_0
External Bus Address Line 9
104 P1E/AN14/RTS4_1/INT28_1/TIOA15_2/DTTI0X_1/MAD10_0
External Bus Address Line 10
105 P1F/AN15/ADTG_5/INT29_1/TIOB15_2/FRCK0_1/MAD11_0
106 AVCC
External Bus Address Line 11
AVCC
107 AVRH
AVRH
108 AVSS
GND
109 VSS
GND
110 PB0/AN16/TIOA09_1/SIN7_2/INT16_0
Motion Control I/F
© 2013 Spansion Inc.
Hardware
Pin-List SK-FM3-176PMC-TFT (6/8)
Pin
Function
117 PB7/AN23/TIOB12_1/INT23_0/ZIN2_2
Motion Control
Motion Control
Motion Control
Motion Control
Motion Control
Motion Control
Motion Control
118 P29/AN24/MAD12_0
External Bus Address Line 12
119 P28/AN25/ADTG_4/INT09_0/RTO05_1/MAD13_0
External Bus Address Line 13
120 P27/AN26/INT02_2/RTO04_1/MAD14_0
External Bus Address Line 14
121 P26/AN27/SCK2_1/RTO03_1/MAD15_0
External Bus Address Line 15
122 P25/AN28/SOT2_1/TX1_0/RTO02_1/MAD16_0
External Bus Address Line 16
123 P24/AN29/SIN2_1/INT01_2/RX1_0/RTO01_1/MAD17_0
External Bus Address Line 17
124 P23/AN30/SCK0_0/TIOA07_1/RTO00_1
Motion Control I/F
125 P22/AN31/SOT0_0/TIOB07_1/ZIN1_1
VCOM UART0 TX
126 P21/SIN0_0/INT06_1/BIN1_1
VCOM UART0 RX
127 P20/INT05_0/CROUT_0/UHCONX1/AIN1_1/MAD18_0
External Bus Address Line 18
128 PF6/FRCK2_0/NMIX
FREE (GPIO HEADER J1, pin 7)
129 USBVCC1
USBVCC1 = VCC
130 P82/UMP1
USB1 (D+)
131 P82/UDP1
USB1 (D-)
132 VSS
VSS
111 PB1/AN17/TIOB09_1/SOT7_2/INT17_0
112 PB2/AN18/TIOA10_1/SCK7_2/INT18_0
113 PB3/AN19/TIOB10_1/INT19_0
114 PB4/AN20/TIOA11_1/SIN0_2/INT20_0
115 PB5/AN21/TIOB11_1/SOT0_2/INT21_0/AIN2_2
116 PB6/AN22/TIOA12_1/SCK0_2/INT22_0/BIN2_2
15
Description
© 2013 Spansion Inc.
I/F
I/F
I/F
I/F
I/F
I/F
I/F
Hardware
Pin-List SK-FM3-176PMC-TFT (7/8)
Pin
16
Function
Description
133 VCC
MCUVCC
134 P00/TRSTX
JTAG
135 P01/TCK
JTAG / SWD
136 P02/TDI
JTAG
137 P03/TMS
JTAG / SWD
138 P04/TDO
JTAG / SWD
139 P90/TIOB08_0/RTO20_1/INT30_0/MAD19_0
External Bus Address Line 19
140 P91/TIOB09_0/RTO21_1/INT31_0/MAD20_0
External Bus Address Line 20
141 P92/TIOB10_0/RTO22_1/SIN5_1/MAD21_0
External Bus Address Line 21
142 P93/TIOB11_0/RTO23_1/SOT5_1/MAD22_0
External Bus Address Line 22
143 P94/TIOB12_0/RTO24_1/SCK5_1/INT26_0/MAD23_0
144 P95/TIOB13_0/RTO25_1/INT27_0/MAD24_0
External Bus Address Line 23
Address Line 23 (unused for
S29GL128S but allows for larger
memory option S29GL256S)
145 PC0/E_RXER0_RXDV1
Ethernet
146 PC1/E_RX03_RX11
Ethernet
147 PC2/E_RX02_RX10
Ethernet
148 PC3/E_RX01/TIOA06_1
Ethernet
149 PC4/E_RX00/TIOA08_2
Ethernet
150 PC5/E_RXDV0/TIOA10_2
Ethernet
151 PC6/E_MDIO0/TIOA14_0
Ethernet
152 PC7/E_MDC0/CROUT_1
Ethernet
153 PC8/E_RXCK0_REFCK
Ethernet
154 PC9/E_COL0
Ethernet
© 2013 Spansion Inc.
Hardware
Pin-List SK-FM3-176PMC-TFT (8/8)
Pin
17
Function
Description
155 PCA/E_CRS0
Ethernet
156 ETHVCC
ETHVCC = VCC
157 VSS
158 PCB/E_COUT
GND
Activate SPI slave mode at Ethernet
switch Micrel KSZ8463MLI
159 PCC/E_MDIO1
Reset Ethernet switch
160 PCD/E_TCK0_MDC1
Ethernet
161 PCE/E_TXER0_TXEN1/RTS4_0/TIOB06_1
Ethernet
162 PCF/E_TX03_TX11/CTS4_0/TIOB08_2
Ethernet
163 PD0/E_TX02_TX10/SCK4_0/TIOB10_2/INT30_1
Ethernet
164 PD1/E_TX01/SOT4_0/TIOB14_0/INT31_1
Ethernet
165 PD2/E_TX00/SIN4_0/TIOA03_2/INT00_2
Ethernet
166 PD3/E_TXEN0/TIOB03_2
Ethernet
167 P62/E_PPS0_PPS1/SCK5_0/ADTG_3
USB VBUS Enable
168 P61/SOT5_0/TIOB02_2/UHCONX0
USB0 (D+ 1,5k pullup)
169 P60/SIN5_0/TIOA02_2/INT15_1
Programming switch S1
170 PF3/TIOA06_0/SIN6_2/INT06_0/AIN2_1
Motion Control I/F
171 PF4/TIOB06_0/SOT6_2/INT07_0/BIN2_1
Motion Control I/F
172 PF5/SCK6_2/INT08_0/ZIN2_1
Motion Control I/F
173 USBVCC0
USBVCC0 = VCC
174 P80/UDM0
USB0 (D-)
175 P81/UDP0
USB0 (D+)
176 VSS
VSS
© 2013 Spansion Inc.
Hardware
Jumper Settings
JP43
JP31
JP5
JP30
JP33
JP20
JP21
JP22
JP23
18
© 2013 Spansion Inc.
Hardware
Jumper Settings
Number Description
JP5
JP6
JP9
JP11
JP12
JP13
JP14
JP15
JP16
JP17
JP18
JP19
JP20
JP21
JP22
JP23
JP24
JP25
JP26
JP27
19
USB/UART programming
AVRH
MD1 pull-down
AGND
CAN0GND4
CAN0GND6
CAN0pwr
CAN0term
Disconnect FRAM
CAN1pwr
CAN1GND6
CAN1GND4
LCD RST/TRACE
LCD brightness/TRACE
I²C/TRACE
I²C/TRACE
CAN1term
FRAM Write Protect
FRAM slave address A2
FRAM slave address A1
© 2013 Spansion Inc.
Function
FM3 can be programmed via USB in two ways:
Open: USB via X5, Closed: MFS0 via USB/UART bridge and X6
Can be used to test ADC features
Can be used to test ADC features
Option to supply CAN devices with board power supply (GND)
Option to supply CAN devices with board power supply (GND)
Option to supply CAN devices with board power supply (Vin)
Close to enable 120 Ohms CAN end termination
Open to isolate FRAM SDA, e.g. to test separately
Option to supply CAN devices with board power supply (Vin)
Option to supply CAN devices with board power supply (GND)
Option to supply CAN devices with board power supply (GND)
Open to access TRACE signals
Open to access TRACE signals
Open to access TRACE signals
Open to access TRACE signals
Close to enable 120 Ohms CAN end termination
Close to enable FRAM write protection
Close to change FRAM I²C address
Close to change FRAM I²C address
Special Type
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Solder Jumper
Default
closed
closed
closed
closed
open
open
open
open
closed
open
open
open
closed
closed
closed
closed
open
open
open
open
Hardware
Jumper Settings
Number
JP28
JP29
JP30
JP31
JP32
JP33
JP34
JP35
JP36
JP37
JP38
JP39
JP40
JP41
JP42
JP43
JP44
JP45
JP46
20
Description
FRAM slave address A0
Disconnect FRAM
VBUS USBH0
USB UHCONX
Disconnect RP1
VBUS USBH1
Enable pull-up
Enable pull-up
Disconnect OpenOCD JTAG
Disconnect OpenOCD JTAG
Disconnect OpenOCD JTAG
Disconnect OpenOCD JTAG
Disconnect MFS0
Disconnect MFS0
Disconnect Flash Reset
Ethernet powerdown
Disconnect EtherCAT FRAM
Disconnect EtherCAT FRAM
motor driver board VCCin
© 2013 Spansion Inc.
Function
Close to change FRAM I²C address
Open to isolate FRAM SCL, e.g. to test separately
Useful for I²C function on Multicon (SCL)
Useful for I²C function on Multicon (SDA)
Close to disable Ethernet switch
Useful to evaluate another I²C configuration memory (SCL)
Useful to evaluate another I²C configuration memory (SDA)
Special Type
Default
Solder Jumper
open
Solder Jumper
closed
2-3
closed
Solder Jumper
closed
1-2
Solder Jumper
open
Solder Jumper
open
Solder Jumper
closed
Solder Jumper
closed
Solder Jumper
closed
Solder Jumper
closed
Solder Jumper
closed
Solder Jumper
closed
Solder Jumper
closed
open
Solder Jumper
closed
Solder Jumper
closed
Solder Jumper
closed
Hardware
Jumper Settings for Solder Type
Schematic Symbol
PCB Layout
Cut
to open
Schematic Symbol
PCB Layout
Solder
to close
21
© 2013 Spansion Inc.
Examples
22
© 2013 Spansion Inc.
Examples
Test Routine
 SK-FM3-176PMC-FA is preprogrammed with this demonstration
software
 It allows to test board components
 You can find the binary on this CDROM at
\software_examples\ SK-FM3-176PMC-FA-TestProcedure.srec
 You can find the source code project at
\software_examples\sk-fm3-176pmc-fa-testprocedure-v1.0.zip
(Due to codesize being too large, it cannot be compiled with size-limited evaluation versions of commercial toolchains)
23
© 2013 Spansion Inc.
Examples
Test Routine
 Ethernet
− Connect your computer to ETH0 or ETH1
− Configure your computer‘s IP address to 192.168.1.1
− Point your webbrowser to http://192.168.1.20
 EtherCAT
− Connect your computer to ECAT0
− Start an EtherCAT master software (e.g. Beckhoff TwinCAT)
− Perform an automatic slave search
 Serial interface
− Connect your computer to VCOM with a USB cable
− Open a serial terminal emulator program like Teraterm
− Connect to the new virtual COM port with Baud rate 11520 and 8N1
− After pressing the reset button, a text menu should appear
24
© 2013 Spansion Inc.
Examples
Test Routine
 HMI
− After powerup, the LCD should be illuminated and show text
− The LED should change colors
− You should be able to use the menu with the user buttons
− By entering ‘p’ into the terminal, you can test all user buttons
 Variable Resistor
− Enter ‘a’ into the terminal emulator and observe the readings
− Exit ADC test mode by entering ‘q’
 CAN
− Connect CAN0 and CAN1 with a CAN bus cable with correct termination
− Enter ‘c’ into the terminal emulator (and again to start transfer)
− Both CAN interfaces work correctly if output looks like that:
Sending message from CAN0 to CAN1... OK, message received by CAN1
Sending message from CAN1 to CAN0... OK, message received by CAN0
25
© 2013 Spansion Inc.
Examples
Test Routine
 External memory devices
− After entering ‘x’ the three external memory ICs are tested automatically:
 FRAM MB85RC256V (Fujitsu)
 Flash S29GL128S (Spansion)
 SRAM IS61WV102416BLL (ISSI)
 USB
− Enter ‘u’ into the terminal emulator
− Connect Device with the bottom-most Host connector. If “Device OK” and “Host 1
OK” are returned, both USB units work correctly
− End USB test mode by entering ‘q’
 Motor Interface pins
− This test needs is only needs special test equipment and is used for internal
Quality Assurance. Please do not use it as the board will lock-up until a hardware
reset is performed.
26
© 2013 Spansion Inc.
Examples
 Available Industrial Ethernet protocol example implementations:
− Modbus TCP
− EtherCAT
 The following protocols are under development or under planning and
will be available soon. Please visit our webpage for updates.
www.spansion.com
− POWERLINK
− Ethernet/IP
− Profinet RT
27
© 2013 Spansion Inc.
Examples
MODBUS TCP
 This CD includes a software example and an application note to
demonstrate MODBUS TCP on SK-FM3-176PMC-FA
− \software_examples\mb9bfxxx_ethernet_lwip_modbustcp-v10.zip
− \documentation\MB9BFx10_AN706-00074.pdf
 It can be compiled and tested with size-limited evaluation version of IAR
EWARM, but not with size-limited evaluation version of Keil Microvision
28
© 2013 Spansion Inc.
Examples
EtherCAT
 This CD includes a software example and an application note to
demonstrate EtherCAT on SK-FM3-176PMC-FA
− \software_examples\mb9bfxxx_mfs_ethercat_ssc-v10.zip
− \documentation\MB9BFx10_AN706-00075.pdf
 It can be compiled and tested with size-limited evaluation versions of
IAR EWARM as well as Keil Microvision
 Before the example can be built, the necessary source code for the
EtherCAT part must be retrieved from ethercat.org website first.
The following two pages describe how to download it for free-of-charge
and include it into the software example.
29
© 2013 Spansion Inc.
Examples
Integrate EtherCAT source code part into software example (1/2)
 Download and install “Slave Stack Code Tool” (SSC Tool) from
http://www.ethercat.org/memberarea/stack_code.aspx
 Start SSC Tool
 In the menu, select File -> New
 Click on “Import” button
 Select file SSC_Configuration_Spansion_SK-FM3-176PMC-FA.xml
in folder \example\source\EtherCAT (You have to do this step only once)
30
© 2013 Spansion Inc.
Examples
Integrate EtherCAT source code part into software example (2/2)
 In SSC Tool, New Project dialog,
select Custom,
SK-FM3-176PMC-FA <Spansion
Inc.>, and OK
 Acknowledge the license dialog by
clicking Yes
 In the menu, select
Project->Create new slave file
 Save the project file in folder
\example\source\EtherCAT
 folder \example\source\EtherCAT
 Click Start.
 Now you can compile the software
example.
31
© 2013 Spansion Inc.
Utilities
32
© 2013 Spansion Inc.
Software Development Utilities
 The SK-FM3-176PMC-FA CD includes the following software:
− MCU Flash programming tools

FUJITSU FLASH MCU Programmer for FM3

FLASH USB DIRECT Programmer
− The FUJITSU USB Wizard
− The FUJITSU OpenOCD Starter GUI
(including USB driver for on-board USB-to-RS232 converter)
− The terminal emulator SerialPortViewerAndTerminal
− Software examples for the SK-FM3-176PMC-FA
 Please check our dedicated microcontroller website:
http://www.spansion.com/products/microcontrollers/
− for updates of the Flash programmer tool, utilities and examples
− for data sheets, hardware manuals, application notes, etc.
33
© 2013 Spansion Inc.
Serial Programming
34
© 2013 Spansion Inc.
Serial Programming
How to use Fujitsu Flash MCU Programmer for FM3 (1/2)
 Start the FUJITSU FLASH MCU Programmer
 (1) Select the target microcontroller
− MB9BD18S/T (SK-FM3-176PMC-TFT)
 (2) Select the crystal frequency (4 MHz)
 (3) Via 'Open' button:
Choose the binary file (*.hex, *.srec or *.mhx)
in subfolder 'release' or 'exe'.
35
© 2013 Spansion Inc.
1: Example project for ARM µVision including startup file, linker
and compiler settings
2: Firmware output directory, contains firmware as *.hex file
3: Example project for Atollic TrueStudio including startup file,
linker and compiler settings
4: Example project for IAR Embedded Workbench including
startup file, linker and compiler settings
5: Firmware output directory, contains firmware as Motorola SRecord *.srec file
6: Source files directory
Serial Programming
How to use Fujitsu Flash MCU Programmer for FM3 (2/2)
 Ensure, Board is powered with 12V power via X1 and power Switch S2
set to ON (directed toward power LED LD1)
 Close JP5 and switch S1 to PROG
 Connect X6 with the PC
 Ensure COM port is not occupied by another application such as a
terminal emulator like Tera Term.
 Start Fujitsu Flash MCU Programmer for FM3
 Ensure Target MCU to be “MB9BFD18S/T,
select the hex file to be flashed (you can drag&drop a file on the text field)
and click “Full Operation (D+E+B+P)”
 Press Reset button (SW1) on the board and click OK
 Wait for the dialog saying “It ended normally completely” and click OK
 Set S1 to RUN position and press Reset (SW1) on the board again.
36
© 2013 Spansion Inc.
USB Programming
37
© 2013 Spansion Inc.
USB Programming
How to use Fujitsu USB Direct Programmer for FM3 / FM4 (1/2)
 Start the FUJITSU FLASH MCU Programmer
 (1) Select the target microcontroller
− MB9BD18S/T (SK-FM3-176PMC-TFT)
− MB9B568R (SK-FM4-120PMC-TFT)
 (2) Select the Com Port, the evaluation
board was detected
 (3) Via 'Open' button:
Choose the binary file (*.hex, *.srec or *.mhx)
in subfolder 'release' or 'exe'.
38
© 2013 Spansion Inc.
1: Example project for ARM µVision including startup file, linker
and compiler settings
2: Firmware output directory, contains firmware as *.hex file
3: Example project for Atollic TrueStudio including startup file,
linker and compiler settings
4: Example project for IAR Embedded Workbench including
startup file, linker and compiler settings
5: Firmware output directory, contains firmware as Motorola SRecord *.srec file
6: Source files directory
USB Programming
How to use Fujitsu USB Direct Programmer for FM3 / FM4 (2/2)
 Be sure JP5 at the evaluation board is open
 Switch S1 to position "Prog." at the evaluation board
 Connect evaluation board via USB (Device)
 Press Reset. The MCU is now in programming mode.
 Start the FUJITSU USB DIRECT Programmer
 Press 'Full Operation (D+E+B+P)' in the FUJITSU FLASH MCU
Programmer
 Wait the flash process had finished.
 Close the FLASH Programmer
 Set switch S1 to position RUN
 Press Reset
39
© 2013 Spansion Inc.
Debugging (IAR EWARM)
40
© 2013 Spansion Inc.
Debugging (IAR EWARM)
IAR Development Tools (Software)
 EWARM-KS (Kickstart)
Free download
− 32K C/C++ Compiler, Assembler, IAR Embedded Workbench,
Debugger/Simulator, no library support
 EWARM-EV (Evaluation)
Free download
− 30 day full verison of C/C++ Compiler, Assembler, IAR Embedded Workbench,
Debugger/Simulator
 EWARM-BS (Base Line)
− 256K C/C++ Compiler, Assembler, IAR Embedded Workbench,
Debugger/Simulator
 EWARM (Full Version)
− C/C++ Compiler, Assembler, IAR Embedded Workbench, Debugger/Simulator
 EWARM-CM (Cortex M Series)
− C/C++ Compiler, Assembler, IAR Embedded Workbench, Debugger/Simulator
41
© 2013 Spansion Inc.
Debugging (IAR EWARM)
IAR Development Tools (Hardware)
 J-LINK ARM Lite
− 20-Pin JTAG to USB adapter (only 3.3 Volt support)
 J-LINK (JTAG adapter for ARM)
− 20-Pin JTAG to USB adapter
 J-TRACE for ARM Cortex M3 (JTAG trace adapter for ARM)
− 20-Pin JTAG to USB adapter
− 20-Pin JTAG ETM to USB adapter
42
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Installation
 Download latest version of EWARM from IAR Website
− EWARM 30-day Evaluation Version
 http://supp.iar.com/Download/SW/?item=EWARM-EVAL
− EWARM 32K Kickstart Version
 http://supp.iar.com/Download/SW/?item=EWARM-KS32
 Install EWARM
 Install J-LINK Debugger
− Connect J-LINK to USB Port and follow installation advices
 Drivers:
<Installation_Path>\IAR Systems\Embedded Workbench
x.y\arm\drivers\Jlink\ x64 or x86
 Start EWARM Workbench
43
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Getting Started
 IAR Information Center
− Getting Started
− User Guides
− Example Projects
− Tutorials
− Support
− Release Notes
− Can always be displayed
by: Help → Information
Center
44
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Choose Example Project
 Choose Manufacturer
− Use Fujitsu
− Use MB9BF500
− Use
IAR KSK-MB9BF506
− Open a project
 Browse to folder,
if necessary
45
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Main Window
 IAR Workbench
− Workspace on left side
of Workbench window
 Choose:
View→Workspace,
if hidden
− Source files on right
side of Workbench
window as tabbed
windows
− Project can
alternatively be
opened by:
File→Open→
Workspace→*.eww
46
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Menu Bar
47
File Control
Configuration
Control
(new, open,
save, etc.)
Build Control
(e.g. RAM or ROM
debugging)
(compile, make,
stop build)
Edit Control
Navigation Control
Debug Control
(cut, copy, paste,
undo, redo)
(Find, Bookmarks, File
Navigation, etc.)
(Breakpoint, start
Debug w/ and w/o
download)
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Workspace Window
Project Name
Sub Folder Modules
Main Modules
Module Includes
Project Description
Project Built Output
48
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Making Project
 Use Make-Icon (
), <F7> or
Menu: Project→Make
 Check for no errors in Output window
below
 Build errors are indicated by
or
in Output window and Source view
49
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Download to Target and Start Debugging
 Use
Icon, <Ctrl>-D, or Project→Download and Debug
 A new menu bar will occur on sucessful connection to target
Reset
Target
Step
Over
Stop
50
© 2013 Spansion Inc.
Step
Out
Step
Into
Run to
Cursor
Next
Statement
Run
End
Debugging
Trace
Control
Debugging (IAR EWARM)
Debug Windows
 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
− Shows mixed mode view
51
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Debug Windows
 Memory Window
− The Memory window is a tabbed part of the Output window
 Register View
− Some Registers are grouped and can be unfolded
52
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Debug Windows
 Breakpoint Window
− The Breakpoint window is a tabbed part of the Output window
− Breakpoints can be enabled and disabled in
 Source window
53
(
enabled,
disabled)
 Breakpoint window (
enabled,
disabled)
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Watch Windows
 Watch Windows
− Watch
 Expressions/Variables have to
be added by user and are
updated by Halt/Breakpoint
− Locals
 Functional local Expressions/Variables are added by Workbench itself, if PC is in function
context
− Statics
 Functional local Expressions/Variables are added by Workbench itself, if PC is in function
context
− Live Watch
 Expressions/Variables have to be added by user and are updated during runtime (with
performance impact)
− Auto
 Expressions/Variables are added by Workbench itself near the current PC in
Halt/Breakpoint
54
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Debug Windows
 Watch Windows
− Quick Watch
 The Quick watch allows the user to calculate and recalculate expressions
even with variables
 The drop down menu memorizes the last typed contents
55
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Debug Windows
 Symbolic Memory
− References the project Symbols to a memory view
 Call Stack
− Can be displayed with or without called arguments
− Last called function (current) is marked with green arrow, callers are below
56
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Debug Windows
 Stack
− Show current Stack context with local variables (if existing), including graphical stack usage
(if enabled)
 Terminal I/O
− Allows debug information printed-out via printf() function
− Log can be output to a file
 Code Coverage
− Shows the percentage of code covered by application run
 Needs ETM connection to Debugger (J-Trace)
 Profiling
− Shows the number of calls of each project function by application run
 Activated by „Show details“ and/or „Autorefresh“
 Symbols
− Shows the project‘s symbols in a list with their address references
57
© 2013 Spansion Inc.
Debugging (IAR EWARM)
JTAG Connection
 JTAG Connection Type (J-LINK)
− JTAG
− Serial Wire Debugging (SWD)
 Chose:
Options → General Options
→ Library Configuration
→ Library Low-Level
Interface Implementation
 Check:
- Via semihosting
for JTAG and SWD
- Via SWD
for only SWD
58
© 2013 Spansion Inc.
Debugging (IAR EWARM)
JTAG Connection
 JTAG Connection Type (J-LINK)
− JTAG
− Serial Wire Debugging (SWD)
 Chose:
Options → J-Link/J-Trace
→ Connection
→ Interface
 Check:
- JTAG
- SWD
when semihosting
was chosen
- Only SWD (greyed)
when SWD only was
chosen
59
© 2013 Spansion Inc.
Debugging (IAR EWARM)
Simulator
 Mark Project File in Workspace
 Choose Project→Options
 Choose Simulator in Debugger Setup
 Start Simulator with usual
60
© 2013 Spansion Inc.
Icon
Debugging (Keil µVision)
61
© 2013 Spansion Inc.
Debugging (Keil µVision)
Keil Development Tools (Software)
 MDK-ARM-EVALUATION
Free download
− 32K C/C++ Compiler, Assembler, µVision IDE/Debugger/Simulator
 MDK-ARM-B (Basic Edition)
− 256K C/C++ Compiler, Assembler, µVision IDE/Debugger/Simulator
 MDK-ARM (Standard Edition)
− C/C++ Compiler, Assembler, µVision IDE/Debugger/Sim., RTX Kernel
 ULINK-ME
− USB-JTAG adapter (only 3.3 Volt support)
 ULINK2
− USB-JTAG adapter
 ULINKpro
− High-Speed debug and trace unit
62
© 2013 Spansion Inc.
Debugging (Keil µVision)
Installation
 Download latest version of µVision from KEIL Website
− Evaluation Version
 https://www.keil.com/demo/eval/arm.htm
Free download
 Registration required
 Install µVision
 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
 Install ULINK Pro (optional)
− ULINK Pro needs an own dedicated USB driver located in:
<Installation Path>\Keil\ARM\ULINK
 Start µVision
63
© 2013 Spansion Inc.
Debugging (Keil µVision)
Getting started
 Choose Menu: Project→Open Project...
− Browse to: <Installation Path>\Keil\ARM\Boards\Keil\MCB9BF500\Blinky
− Choose Blinky.uvproj
64
© 2013 Spansion Inc.
Debugging (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
65
© 2013 Spansion Inc.
Debugging (Keil µVision)
Menu Bars
 Menu Bar 1
− Can be moved in bar window area or set floating
66
File Control
Navigation Control
(new, open,
save, etc.)
(Bookmarks + search, etc.)
(Text search, search in files, etc.)
© 2013 Spansion Inc.
Edit Control
Debug Control
(cut, copy, paste, etc)
(indention, commenting)
(Start/Stop Debug Session,
set/remove/disable
breakpoints, remove/disable
all breakpoints)
Project
Window View
IDE
Configuration
Debugging (Keil µVision)
Menu Bars
 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)
Download
to Target
67
© 2013 Spansion Inc.
Target
Options
Manage
MultiProject
Workspace
Debugging (Keil µVision)
µ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
68
© 2013 Spansion Inc.
Debugging (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
69
© 2013 Spansion Inc.
Debugging (Keil µVision)
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
− Use Start/Stop Debug Icon (
Session
) or Menu: Debug→Start/Stop Debug
 Ending Debug Session
− Use same way as for starting debug session
70
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debugging Icon Bar
 During a Debug Session there will be visible a new icon bar
Reset
Target
Step Control
Show Windows (Command,
Tool Box
(Step in, out, etc.)
Disassembly, Symbols,
Registers, Call Stack)
(can be
customized)
Start/
Stop
Application
71
© 2013 Spansion Inc.
Show
Source/Code
Line of current
PC
Show (multiple) Windows
(Watch, Memory, Serial, Analysis,
Trace, System Viewer)
Debug
Restore
Views
Debugging (Keil µVision)
Debug Windows
 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 )
72
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 Disassembly View
− Mixed mode is selectable and deselectable
Active Breakpoint
Disabled Breakpoint
Current Program
Counter
Current Cursor Line of
Code highlighted in
yellow background ( )
73
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 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
− Changes are highlighted in dark blue text
background
− Register tree knots can be expanded
74
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 Breakpoints
− Not a Workspace window, but a Dialog window
− Can opened by menu: Debug→Breakpoints... or <Ctrl>-B
− Any changes can only be seen in Workspace after "Close"
− Conditional expressions can be entered here
75
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 Variable Windows (1)
− 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
 Displayed values can be changed by user during break
76
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 Variable Windows (1)
− 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
 Displayed values can be changed by user during break
77
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 Variable Windows (2)
− Local View
 The local view shares the tab with e.g. Memory and Watch windows
 Any changes are highlighted in dark blue text backround color
 Displayed values can be changed by user during break
78
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 Callstack
− The Call Stack view shares its tab with the Variable and Memory window
− It shows the current called function and their local environment
− All displayed Call Stack values are not modifyable
79
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 Symbol Window
− The Symbol window shows all
symbols of the user‘s project
− It is sorted in tree form by
dependence
 E.g.
Project→Module→
Function→Symbol
− Peripheral registers can also be
displayed
− Simulator VTREG can be
displayed
− Mouse-over a symbol shows
its contents as a tool tip
 E.g.:
80
© 2013 Spansion Inc.
AD_dbg = 0x01EB
Debugging (Keil µVision)
Debug Windows
 Terminal Windows
− Up to 3 UART channels can be displayed
− One direct printf view is supported (via ITM Viewer)
81
© 2013 Spansion Inc.
Debugging (Keil µVision)
Debug Windows
 Logic Analyzer
− The IDE allows to display graphically the value of a variable
− Adding a signal is as easy as adding to a Watch window
− The Logic Analyzer is a tabbed window together with the Disassembly
window
82
© 2013 Spansion Inc.
Debugging (Keil µVision)
Core Peripherals
 Nested Vectored Interrupt Controller
− The NVIC settings for the Core Interrupts can be adjusted in a dialog window
− Adjustments for:
 Enable/Pending
 Priority
 Interrupt Control & State
 Application Interrupt & Reset Control
(PRIGROUP, ENDIANESS, ...)
 Vector Table Offset
 Software Interrupt Trigger
83
© 2013 Spansion Inc.
Debugging (Keil µVision)
Core Peripherals
 System Control Register (0xE000ED10)
− Dialog window for setting bits for:
 SEVONPEND
 SLEEPDEEP
 SLEEPONEXIT
 Configuration Control Register (0xE000ED14)
− Dialog window for setting bits for:
 NONBASETHRDENA
 USERSETMPEND
 UNALIGN_TRP
 DIV_0_TRP
 BFHFNMIGN
84
© 2013 Spansion Inc.
Debugging (Keil µVision)
Core Peripherals
 System Tick Timer (0xE000E010)
− Dialog window for setting/watching:
 Control & Status
 Reload & Current value
 Calibration
85
© 2013 Spansion Inc.
Debugging (Keil µVision)
Core Peripherals
 Fault Reports
− Dialog window for setting/watching:
 Memory Manage Faults
 Bus Faults
 Usage Faults
 Hard Faults
 Debug Faults
86
© 2013 Spansion Inc.
Debugging (Keil µVision)
Trace (ULINK ME)
 Trace via ITM
− Simple Trace views via Instrumentation Trace Macro is supported by µLINK
ME
 Records
 Exceptions
 Counters
87
© 2013 Spansion Inc.
Debugging (Keil µVision)
ULINK Pro
 Trace via ETM
− Check settings in menu:
Flash→Configure Flash Tools... Tab:Debug
enables ETM pins
88
© 2013 Spansion Inc.
Debugging (Keil µVision)
ULINK Pro
 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
89
© 2013 Spansion Inc.
Debugging (Keil µVision)
Trace Exceptions
 Exception Trace
− Exception Trace has an own window, which can‘t be docked
− Exception Types:
 System Exceptions
 User Exceptions (Interrupts)
− Exception Trace:
 Count
 Total Time
 Several Points in Time: Min., Max., First, Last, etc.
− Must be configured in: Debug→Debug Settings... Tab: Trace/Trace Events
90
© 2013 Spansion Inc.
Debugging (Keil µVision)
Event Counters
 Following counters are available:
− Extra cycles per Instruction
− Exception overhead cycles
− Sleep cycles
− Load store unit cycles
− Folded instructions
 Counters count from 0 to 255
− Continue counting on overflow
starting over from 0
 Must be configured in:
Debug→Debug Settings...
Tab: Trace/Trace Events
(Checkboxes)
91
© 2013 Spansion Inc.
Debugging (Keil µVision)
Performance Analyzer (ULINK Pro)
 Shows the execution of any function of an application in:
− Number of calls
− Execution time (absolute)
− Execution time (percentage)
 It shares with a tab the Instruction Trace window and Code Coverage
 Module or function view is
supported
92
© 2013 Spansion Inc.
Debugging (Keil µVision)
Code Coverage
 The Code Coverage shows the function execution by percentage of the
function code
 It shares with a tab the Instruction Trace window and Performance view
 All or only a specific module can be chosen for display
93
© 2013 Spansion Inc.
Debugging (Keil µVision)
Simulator
 The Core Simulator can be selected by the menu:
Flash→Configure Flash Tools... and then choosing Use Simulator
 Look & feel is like using ULINK debugger
 Controlable also with *.ini files
94
© 2013 Spansion Inc.
Support / Contact
95
© 2013 Spansion Inc.
Contact
 eMail:
[email protected]
 Website: http://www.spansion.com
96
© 2013 Spansion Inc.
Seminars in EMEA Region
Register at http://news.spansion.com/seminars
FM Family Seminar
Motion Control
Workshop
USB Workshop
Ethernet Workshop
1 day – once per month
1 day
2 days
1 day
• Overview FM3 processor family
o Memory
o Peripheral resources
o Packages
1. Introduction of Fujitsu MCU
a. Line-Up of microcontrollers with motion
control features
b. Performance
Introduction
Fundamentals of the Ethernet technology
USB vs. RS232
Historical Background
Ethernet on Fujitsu FM3 microcontrollers
• Processor architecture
o Bus structure
o Flash memory
o Flash programming methods
2. Introduction of motors types
a. ACIM
b. BLDC
c. PMSM
Electrical Layer
free of charge
• Peripheral resources
o Clock distribution
o Timer
o Interfaces
o FM3 features
97
3. Introduction of common control types
a. Sinusoidal commutation
b. Field Orientated Control
c. Space Vector Modulation
• Development tool chains
o IAR workbench, J-Link adapters
o KEIL uVision, uLink adapters
o Starter Kits
4. Peripherals for motion control based on
FM3 devices
a. Base Timer
b. Multifunction Timer
c. 12-bit A/D Converter
d. Quad Position & Revolution Counter
e. Interrupt Controller
• Practical exercises
o Flash programming
o Project setup and modification
o Debugging
o External interrupts
5. Hands-on exercise
a. Software example for a BLDC motor with
hall effect sensor
b. Software example for a field orientated
control of a PMSM motor
© 2013 Spansion Inc.
Hardware and software design
considerations
USB Protocol
Enumeration Process (Descriptors &
USB Settings)
Transfer Types & Data Transfers
USB Class Concept
Communication layer models
Software Driver Concepts
USB Host in Embedded Systems
Developing Ethernet applications: Tools and
methods
USB Examples: Start with Virtual COM
Port
Using Fujitsu USB Descriptor Manager
to create Template Classes &
Descriptors
Practical hints and advice on FM3 Ethernet
solutions
PC Software programming using
LibUSB with Windows
Special Use Cases (e.g. boot loader)
The Internet Protocol suite
Web technology in embedded systems
Hands-on training
Appendix
98
© 2013 Spansion Inc.
EU-Konformitätserklärung /
EU declaration of conformity
Hiermit erklären wir, Spansion International Inc., Germany Branch, Pittlerstrasse 47, 63225 Langen, Germany,
dass dieses Board aufgrund seiner Konzipierung und Bauart sowie in den von uns in Verkehr gebrachten Ausführung(en)
den grundlegenden Anforderungen der EU-Richtlinie 2004/108/EC „Elektromagnetische Verträglichkeit“ entspricht.
Durch eine Veränderung des Boards (Hard- und/ oder Software) verliert diese Erklärung ihre Gültigkeit!
We, Spansion International Inc., Germany Branch, Pittlerstrasse 47, 63225 Langen, Germany
hereby declare that the design, construction and description circulated by us of this board complies with the appropriate
basic safety and health requirements according to the EU Guideline 2004/108/EC entitled ’Electro-Magnetic Compatibility’.
Any changes to the equipment (hardware and/ or software) will render this declaration invalid!
Note:
This evaluation board is a Class A product according to EN61326-1.
It is intended to be used only in a laboratory environment and might cause radio interference when used in residential
areas. In this case, the user must take appropriate measures to control and limit electromagnetic interference.
All data and power supply lines connected to this starter kit should be kept as short as possible, with a maximum allowable
length of 3m. Shielded cables should be used for data lines. As a rule of thumb, the cable length used when connecting
external circuitry to the MCU pin header connectors for example should be less than 20cm.
Longer cables may affect EMC performance and cause radio interference.
99
99
© 2013 Spansion Inc.
Recycling
 Gültig für EU-Länder:
− Gemäß der Europäischen WEEE-Richtlinie und deren Umsetzung in
landesspezifische Gesetze nehmen wir dieses Gerät wieder zurück.
− Zur Entsorgung schicken Sie das Gerät bitte an die folgende Adresse:
 Valid for European Union Countries:
− 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:
Spansion International Inc., Germany Branch
c/o Fujitsu Semiconductor
Warehouse/Disposal
Monzastraße 4a
D-63225 Langen
 This board is compliant with China RoHS
100
© 2013 Spansion Inc.
www.spansion.com
Spansion®, the Spansion logo, MirrorBit®, MirrorBit® Eclipse™ and combinations thereof are trademarks and registered
trademarks of Spansion LLC in the United States and other countries. Other names used are for informational purposes
only and may be trademarks of their respective owners.
This document is for informational purposes only and subject to change without notice. Spansion does not represent that
it is complete, accurate or up-to-date; it is provided “AS IS.” To the maximum extent permitted by law, Spansion disclaims
any liability for loss or damages arising from use of or reliance on this document.
101
© 2013 Spansion Inc.