SS702-00002-1v0-E.pdf

FUJITSU SEMICONDUCTOR
SUPPORT SYSTEM
SS702-00002-1v0-E
New 8FX Family
8-bit MICROCONTROLLER
MB95560H/570H/580H Series
STARTER KIT MB2146-510-01-E
SETUP GUIDE
PREFACE
Thank you for purchasing the New 8FX Family Starter Kit: MB2146-510-01-E*1.
This product is a starter kit for New 8FX MB95560H/570H/580H series, which comes with
MB2146-07-E (New 8FX Family All Series MCU BGM Adaptor)*2, MB2146-510-E (New 8FX
Family MB95560H/570H/580H Series Evaluation Board)*3, and F2MC*48L/8FX Family SOFTUNE
Professional Pack Evaluation Version*5.
This manual explains how to use the Starter Kit. Be sure to read this manual before using the product.
For mass production/evaluation MCUs for this product, consult with sales representatives or support
representatives.
*1 :
*2 :
*3 :
*4 :
*5 :
Referred below as the “Starter Kit”.
Referred below as the “BGMA”.
Referred below as the “EV-Board”.
F2MC is the abbreviation of FUJITSU Flexible Microcontroller.
Referred below as the “SOFTUNE”.
SOFTUNE is a trademark of Fujitsu Semiconductor Limited, Japan.
■ Handling and use
Handling and use of this product and notes regarding its safe use are described in the manuals for
products bundled with the Starter Kit.
Follow the instructions in the manuals to use this product.
Keep this manual at hand so that you can refer to it anytime during use of this product.
■ European RoHS compliance
Products with a -E suffix on the part number are European RoHS compliant products.
■ Notice on this document
All information included in this document is current as of the date it is issued. Such information is
subject to change without any prior notice.
Please confirm the latest relevant information with the sales representatives.
i
■ Caution of the products described in this document
The following precautions apply to the product described in this manual.
WARNING
Indicates a potentially hazardous situation which could result in death or serious
injury and/or a fault in the user’s system if the product is not used correctly.
Electric shock,
Damage
Before performing any operation described in this manual, turn off all the power
supplies to the system.
Performing such an operation with the power on may cause an electric shock or
device fault.
Electric shock,
Damage
Once the product has been turned on, do not touch any metal part of it.
Doing so may cause an electric shock or device fault.
CAUTION
Cuts, Damage
Cuts
Damage
Damage
Damage
Damage
Damage
Damage
Damage
Damage
Indicates the presence of a hazard that may cause a minor or moderate injury, damages to this product or devices connected to it, or may cause to loose software resources and other properties such as data, if the device is not used appropriately.
Before moving the product, be sure to turn off all the power supplies and unplug the
cables. Watch your step when carrying the product. Do not use the product in an
unstable location such as a place exposed to strong vibration or a sloping surface.
Doing so may cause the product to fall, resulting in an injury or fault.
The product contains sharp edges that are left unavoidably exposed, such as jumper plugs.
Handle the product with due care not to get injured with such pointed parts.
Do not place anything on the product or expose the product to physical shocks. Do
not carry the product after the power has been turned on.
Doing so may cause a malfunction due to overloading or shock.
Since the product contains many electronic components, keep it away from direct
sunlight, high temperature, and high humidity to prevent condensation. Do not use
or store the product where it is exposed to much dust or a strong magnetic or electric field for an extended period of time.
Inappropriate operating or storage environments may cause a fault.
Use the product within the ranges given in the specifications.
Operation over the specified ranges may cause a fault.
To prevent electrostatic breakdown, do not let your finger or other object come into
contact with the metal parts of any of the connectors. Before handling the product,
touch a metal object (such as a door knob) to discharge any static electricity from
your body.
When turning the power on or off, follow the relevant procedure as described in this
document.
Before turning the power on, in particular, be sure to finish making all the required
connections. Furthermore, be sure to configure and use the product by following the
instructions given in this document.
Using the product incorrectly or inappropriately may cause a fault.
Always turn the power off before connecting or disconnecting any cables from the
product. When unplugging a cable, unplug the cable by holding the connector part
without pulling on the cable itself. Pulling the cable itself or bending it may expose
or disconnect the cable core, resulting in a fault.
Because the structure of the MCU socket does not allow an evaluation MCU to be
mounted in the incorrect orientation, be very careful of the orientation of the evaluation MCU when mounting it.
Inserting the evaluation MCU in the wrong orientation may damage the MCU, causing the MCU to become faulty.
Because the product has no casing, it is recommended that it be stored in the original packaging. Transporting the product may cause a damage or fault. Therefore,
keep the packaging materials and use them when re-shipping the product.
ii
• The contents of this document are subject to change without notice.
Customers are advised to consult with sales representatives before ordering.
• The information, such as descriptions of function and application circuit examples, in this document are presented solely for the purpose of reference to show examples of operations and uses of FUJITSU SEMICONDUCTOR semiconductor device; FUJITSU SEMICONDUCTOR does not warrant proper operation of the device with respect to use
based on such information. When you develop equipment incorporating the device based on such information, you
must assume any responsibility arising out of such use of the information. FUJITSU SEMICONDUCTOR assumes no
liability for any damages whatsoever arising out of the use of the information.
• Any information in this document, including descriptions of function and schematic diagrams, shall not be construed
as license of the use or exercise of any intellectual property right, such as patent right or copyright, or any other right
of FUJITSU SEMICONDUCTOR or any third party or does FUJITSU SEMICONDUCTOR warrant non-infringement of any third-party's intellectual property right or other right by using such information. FUJITSU SEMICONDUCTOR assumes no liability for any infringement of the intellectual property rights or other rights of third parties
which would result from the use of information contained herein.
• The products described in this document are designed, developed and manufactured as contemplated for general use,
including without limitation, ordinary industrial use, general office use, personal use, and household use, but are not
designed, developed and manufactured as contemplated (1) for use accompanying fatal risks or dangers that, unless
extremely high safety is secured, could have a serious effect to the public, and could lead directly to death, personal
injury, severe physical damage or other loss (i.e., nuclear reaction control in nuclear facility, aircraft flight control, air
traffic control, mass transport control, medical life support system, missile launch control in weapon system), or (2)
for use requiring extremely high reliability (i.e., submersible repeater and artificial satellite).
Please note that FUJITSU SEMICONDUCTOR will not be liable against you and/or any third party for any claims or
damages arising in connection with above-mentioned uses of the products.
• Any semiconductor devices have an inherent chance of failure. You must protect against injury, damage or loss from
such failures by incorporating safety design measures into your facility and equipment such as redundancy, fire protection, and prevention of over-current levels and other abnormal operating conditions.
• Exportation/release of any products described in this document may require necessary procedures in accordance with
the regulations of the Foreign Exchange and Foreign Trade Control Law of Japan and/or US export control laws.
• The company names and brand names herein are the trademarks or registered trademarks of their respective owners.
Copyright ©2011 FUJITSU SEMICONDUCTOR LIMITED All rights reserved
iii
1. Product Overview
This product is a set of Starter Kit of MB95560H/570H/580H series. It is composed of a BGMA and
an EV-board. Combining the SOFTUNE Workbench on PC, the Starter kit enables the quick start of development before the user system is ready.
1.1 Objective and Deliverable
The Starter kit provides users a complete development platform. Before start using the Starter Kit,
make sure that the following devices are placed in the package:
•
•
•
•
•
BGMA
EV-board
USB cable
CD-ROM (SOFTUNE, user manuals, sample code)
Hardcopy (China RoHS report, quick start guide)
:1
:1
:1
:1
:1
1.2 System Block
To setup a debugging system, connect a PC, a BGMA and an EV-board together as shown below:
Easy design and study MB95560/
570H/580H MCU with BGMA and
SOFTUNE
Sample
code
Host PC
SOFTUNE
IDE
BGMA
MB95560H/570H/580H
MCU
USB
Target Board
Figure 1 BGMA overview
1.3 Handling Precautions
The Starter Kit can be used in connection with its bundled products. To ensure correct use
of this product in a proper environment, observe the following guideline:
Follow the instructions described in each manual for the bundled product to use this product.
1
1.4 Feature
The MB95560H/570H/580H Series starter kit is the best for a performance and functional
evaluation, and a check of operation before including MB95560H/570H/580H Series in a
user's system.
Below, the feature of the BGM debugger for MB95560H/570H/580H Series is shown.
• Microcomputer operation voltage. It corresponds to +2.4V to +5.5V.
(The maximum and minimum of microcomputer operation voltage and frequency of operation
differs with each MCU. refer to the documents (a data sheet, hardware manual, etc.) of each
device relation for the operation voltage and frequency of MCU of operation.)
• Compact development environment, a light and small BGM Adaptor.
• Since a monitor program is performed in exclusive memory space, it does not consume user
memory space.
• Continuation execution, step execution and break correspondence.
• It connects with a host computer by the USB interface.
1.5 Hardware Setup
In the hardware setup procedure, you configure and connect the hardware products. This
chapter includes the configuring and connecting procedure for each product in order. Check
the contents and complete the hardware setup.
• Configuring EV-Board
• Connection of each product
- Connecting BGMA and EV-board
- Connecting EV-Board power supply
2
2. BGMA Manual
2.1 BGMA Overview
Below is the close look of the BGMA.
It provides a debug platform for the New 8FX MCU (except MB95200H/210H/220H) in a small size
(58mm (W) × 90mm (D) × 20mm (H)) .
BGM Adaptor: MB2146-07-E
BGM Adaptor
BGM Adaptor Power LED
BGM Adaptor status LED
Figure 2 BGMA overview
2.2 Function List
Function description
Remarks
Support MB95560 Series MCU
MCU MAX machine clock: 16.25 MHz
MCU power voltage: 2.4V*2 to 5.5V*1
Break pointer
256 software breakpoints
3 hardware breakpoints
USB interface to PC/SOFTUNE
Compatible to USB protocol version 2.0
1-Line UART interface to the MB95560
Series MCU
The Baud rate is 62,500 bps, and can be up to 500kbps
(set in SOFTUNE)
Support the MCU flash programming for
engineering development
The MAX program and read speed can be arrived to
4000B/s | 5000B/s roughly.
*1 : The value varies depending on the operating frequency, the machine clock or the analog guaranteed range.
*2 : The value is 2.88 V when the low-voltage detection reset is used.
3
2.3 IDC10 Interface Description
Pin Number
Pin Name
Description
1
UVCC
Target MCU Vcc
2
GND
Target MCU Vss
3
RSTIN
Target MCU reset input
4
RSTOUT
Target MCU reset output
5
RSV
Reserved
6
POUT3V
Supply 3V power out, when this function enabled
7
RSV
Reserved
8
DBG
Target MCU debug pin
9
RSV
Reserved
10
RSV
Reserved
2.4 BGM Adapter USB Configuration
The BGMA is provided with a USB cable. Connect the BGMA to a PC with a USB cable. If the connection is right, the following window will pop up. Follow the instructions displayed, and then click
“Next”,
Figure 3 Install BGMA in Windows (1)
4
Select “Install from a list or specific location (Advanced)", then click “Next",
Figure 4 Install BGMA in Windows (2)
Select “…\Drivers” from the folder where SOFTUNE is installed, click “Next”,
Figure5 Install BGMA in Windows (3)
5
Select BGMA (MB2146-07) as displayed below, and then click “Next”,
Figure 6 Install BGMA in Windows (4)
Windows will install the driver automatically. Click “Finish” after the driver has completed the
installation normally. Then users can find the BGMA is recognized as MB2146-07 in Windows
system.
Figure 7 BGMA is installed in Windows
6
2.5 LED Description
First, only plug USB cable to PC, checking the Power LED on BGMA turns Green. Refer to Figure 8.
USB Plugged to PC
Green
Figure 8 BGMA Power LED (1)
Second, plug IDC10 cable to the EV-board (target MCU board), then turn on EV-board. After that
check Power LED on the BGMA turns Orange. Refer to Figure 9.
5V Power Supplied
IDC Cable
Orange
Figure 9 BGMA Power LED (2)
7
3. EV board Introduction
3.1 EV board Overview
MB95560 MCU EV-board is provided as a user-friendly introductory and evaluation platform for
the MB95560H/570H/580H MCU Family microcontrollers. Figure 10 below is a close look of EVboard.
Jumpers left open when debug
Debug Interface to BGMA
Buzzer circuit
Power supply either
from batteries (below
the PCB) or from
2-pin header
Potentiometer to
MCU AD pin
Circuit for
LIN-UART Peripheral
Communication
MB95560H/570H/580H
MCU
LEDs to MCU
I/O port pins
Jumpers to set MCU pins connected
to external circuits or not
Switch circuit to MCU External Interrupt pins
Figure 10 EV-board Overview
8
3.2 Function List
The EV-board consists of a board and a sample firmware. The board provides a useful platform for
using the MCU and its peripherals. It is a useful development platform together with a BGMA and
a SOFTUNE. It features the following functions,
•
•
•
•
•
•
•
•
•
•
•
•
•
Clock and sub-clock
USB 5V power IF, external 5V power IF and the battery
Reset circuit and reset key
Provide IDC10 debug interface
LEDs for general use, LED1 indicates DBG pin work status
Provide one buzzer to demonstrate timer output
2 keys for general use
Potentiometer and temperature sensor
RS-232 level converter and DB9 interface (MAX232)
LIN circuit reserved
SIO 4 pins reserved
All MCU ports are easy accessible through test pins
Optional Starter kit to support each available MCU packages
9
1
2
Y1
22pF/25V
3
1
SHELL
J?
2
D3
1
C15
10uF/25V
1n4004
1M
R24
BL M21PG600
+5V
VI N
IC4
0.01uF/25V
0.1uF/25V
C8
C
C11+5V
PF0
PF1
PG2
PG1
J2
PF2
JUMPER2X4
SW3
2
4
6
8
1
3
C7
5
22pF/25V
22p
F/25V 7
22pF/25V
4MHz
C5
22pF/25V
BLM21PG600
L3
22pF/25V
C9
Y2
32.768kHz
C10
1
P12
L1
VUSB
DBL M21PG600
D+
ID
L2
USBGND
BT1
AA*4
2
3
DC Socket
CN6
1
2
3
4
5
6
7
8
9
5V
DBG
3.3V
UVCC_EV
GND
RSTIN
RSTOUT
PF0
PF1
GND
PG2
PG1
+5V
C
PF2
P62
P63
CN7
USB MINI
TEST PIN
1
2
3
4
5
6
7
8
9
10
CN3
IIDC10
1
2
3
4
5
6
7
8
9
10
2
5
PG1
P
+5V
7
8
9
10
C
PF2
P62
P63
6
4
PG2
3
1
PF1
MB95560- SOP
TP2
TP1
+5V
R23
3
VOUT
+
1K
C12
C22
22u/50V 0.1uF/25V
TO11/P63
TO10/P62
RSTX/PF2
Cpin
VCC
X0A/P G1
X0A/PG1
X1A/P G2G2
X1A/PG2
VSS
X1/PF1
F1
X0/PF0
IC1
C2
0.1uF/25V
R4
10K
PF0
100/1W
R28
S3
SW-PB
+5V
LP38691-5
GND
LED
LED
LED
LED
1K
R9
1K
R8
1K
R5
1K
P06/INT06/TO01
P07/INT07
P12/ECO/DBG
LED4
LED3
LED2
LED1
LED5
LED
Q1
2SC2412K
BUZZER
BUZ1
R20
1K
R18
1K
+5V
4.7K
R26
Buz
P64/EC1
P00/AN00
P01/AN01
P02/I
P02/INT02/AN02/SCK
P03/INT03/AN03/SOT
P04/INT04/AN04/SI N/HCL K1/EC0
P04/INT04/AN04/SIN/HCLK1/EC0
P05/INT05/AN05/TO00/HCL K2
P05/INT05/AN05/TO00/HCLK2
LED4
LED3
LED2
LED1
R1
+5V
+5V
VR1 4.7K
10K
VR3
11 P64
12 P00
13 P01
14 P02
15 P03
16 P04
17 P05
18 P06
19 P07
20 P12
R12
4.7K
+5V
+5V
1
3
5
7
9
11
13
15
17
19
2
4
6
8
10
12
14
16
18
20
R25
R19
1
3
1
3
J3
AN01
AN00
C13
C14
0.1uF/25V 0.1uF/25V
2
S2
2
3
1
4
0.1uF/50V
0.1uF/50V
C18
0.1uF/50V
5
11
10
12
9
3
4
1
C2T1in
T2in
R1out
R2out
C1C2+
6
8
1K
R21
4.7K
R13
IC3
T1out
T2out
R1in
R2in
V-
V+
C20
14
7
13
8
1
2
3
4
5
6
7
8
9
10
CN2
1
6
2
7
3
8
4
9
5
RS232
CN5
LIN
1
2
3
CN4
C23
22u/25V
1n4004
TEST PIN
SLAVE
OFF
Vbat
D2
C19
0.1uF/50V
0.1uF/50V
6
2
J4
+
P12
P07
P06
P05
P04
P03
P02
P01
P00
P64
MASTER
ON
C6
220pF/100V
LIN
INH
MAX232
C16+5V
C1+
0.1uF/50V
TJA1020
EN
WAK E
WAKE
RXD
TXD
1n4148
J17
33K
IC2
C4
0.1uF/25V
+5V
D1
C17
10K
R7
10K
R3
R11
4.7K
R6
S1
4.7K
Vbat
R10
10K
LED1
INT07
J5
INT06
LED2
2
R15
SIN
0
R16
SOT
0
J6
R17
SCK
0
AN01
AN00
LED3
JUMPER 2X10
R27 4.7K
4.7K
4.7K
P12
P07
P06
P05
P04
P03
P02
P01
P00
P64
SW2
R14
4.7K
+5V
0.1uF/25V
I
INT06
C3
0.1uF/25V
I
INT07
C1
R2
7
GND V S
5
16
V CC
GND
10
2
Figure 11 EV-board Schematic
15
CN1
3.3 EV-board Schematic
3.4 HW Module Description and Jumper settings
3.4.1 Power Module
EV-board has 4 kinds of power supply for user to choose. Please read below instructions before using.
• DC Adaptor: 9V DC:
Output voltage: 9V
Connection: Connector (CN6)
• Battery:
QTY: 4PCS;
Model: AA;
Nominal voltage: 1.5V.
Connection: Socket for Battery
• External Power Supply:
There are 2 test points (TP1&2) on EV-board which can supply power to target board (EVboard).
Power on method: short L3 on EV-board; then connect anode of DC power to TP1 (MCU Vcc)
and cathode to TP2 (MCU GND).
• USB cable:
The Mini-B USB receptacle is only for supplying power to EV board by PC USB port. The
current and power of this method is limited in 100mA/0.5W.
Please make sure to supply stable power via the Mini-B USB receptacle while operation.
If any of the power supplies is connected to the EV-board correctly, power LED (LED5) on
the EV-board will be on. Refer to Figure 12.
9V
CN6
J1
BAT.
CN7
LED5
Figure 12 Power Module
The following two power supplies are recommended. Please follow the settings below,
Table 1 Power Supply Selection
Power supply
Header name
Settings
9V
4 AA batteries from BT1 on
J1: BAT.
the back of the EV-board.
J1
BAT.
9V
J1
9V DC from CN6
J1: 9V.
BAT.
11
3.4.2 BGMA Interface
To start the debug using a BGMA, users shall connect IDC10 socket from the BGMA to CN1 on an
EV-board, and J2 shall be closed to enable reset key S3. Refer to Figure 13.
CN1
J2
S3
Figure 13 Debug Interface
Table 2 J2 Setting
MCU Mode
Debug, normal mode
Header name
Settings
J2
J2
This setting is effective just when BGMA (MB2146-07-E) is connecting to STK board (MB2146510-E). The other BGMA circuit is different from MB2146-07-E. When STK board connects to other BGMA that may broke the MCU of STK board, so please use the products in this package. For
the package information please refer to “1.1 Objective and Deliverable”.
3.4.3 Clock Settings
The MB95560H/570H/580H series MCU uses an internal main CR as a clock source by default. Users can select on-board crystal as a main clock and a sub-clock. Follow the settings below:
Table 3 SW3 Setting
Clock
Main clock
Header name
Settings
SW3: X1, X0
SW3
Sub-clock
SW3: X1A, X0A
SW3
3.4.4 Buzzer Module
A buzzer module is provided to demonstrate an 8/16 composite timer output (a continuous mode).
To enable buzzer module, follow the table below:
Table 4 SW1 Setting
Modules
Buzzer:
BUZ1
Header name
SW1: BUZ.
Settings
SW1
LED4 BUZ
12
3.4.5 A/D Module
VR1 and VR3 are to demonstrate a MCU A/D converter usage. Select VR1 or VR3 by the following
table.
VR1 is connected to MCU A/D channel 1, and VR3 is connected to MCU A/D channel 0.
Table 5 SW2 A/D Setting
MCU Mode
Header name
Settings
SW2
A/D:
VR1
SW2: VR1
LED3
VR3
VR1
SCK SOT SIN
ADC
LIN UART
LED2 S2 S1
KEY
SW2
A/D:
VR3
SW2: VR3
LED3
VR3
VR1
SCK SOT SIN
ADC
LIN UART
LED2 S2 S1
KEY
3.4.6 LED Module
There are four LEDs on EV-board to demonstrate the I/O function.
Enable LED2, LED3 and LED4 in the following table,
Table 6 SW2 LED Setting
Modules
Header name
Settings
SW2
SW2:
LED2, LED3
LED3
LED*:
LED2, LED3, LED4
VR3
VR1
SCK SOT SIN
ADC
SW1: LED4
LIN UART
LED2 S2 S1
KEY
SW1
LED4 BUZ
* : LED module has four LEDs in total, but P12 (LED1) is not active in a debug mode using
BGMA.
13
3.4.7 Key Module
Key S1 and key S2 are provided to demonstrate an external interrupt function. Enable these two keys
by the following table.
Key S1 is connected to external Int7, and key S2 is connected to external Int6.
Table 7 SW2 Key Setting
Modules
Header name
Settings
SW2
Key:
S1, S2
SW2: S1, S2
LED3
VR3
VR1
ADC
SCK SOT SIN
LIN UART
LED2 S2 S1
KEY
3.4.8 Lin-UART Module
Lin-UART module can be configured as a LIN or an UART module. Enable each module by the following table.
The UART module features an RS232 transceiver and a standard DB9 interface with PC.
Lin module enables an easy setup of Master/Slave communication by a Lin bus.
Table 8 UART Setting
Modules
Header name
Settings
SW2
SW2: SOT, SIN
LED3
VR3
VR1
ADC
UART
SCK SOT SIN
LIN UART
RX
UART
LED2 S2 S1
KEY
LIN
J5: UART
J6: UART
J5
J6
UART
TX
LIN
SW2
SW2:
SCK, SOT, SIN
LED3
VR3
VR1
ADC
LIN*
SCK SOT SIN
LIN UART
RX
UART
LED2 S2 S1
KEY
LIN
J5: LIN
J6: LIN
J5
J6
UART
TX
LIN
* : LIN module is optional; contact your local distributor for the EV-board with a LIN module.
14
4. Sample Code Manual
4.1 Topic List
The following sample codes are provided with MB95560H/570H/580H MCU Starter Kit,
• IO_LED project
In this example, the LED2 will be twinkle.
• A/D_Potentiometer project
In this example, the 3 LEDs will display “on” or “off” according to the arrow direction of VR3.
• Timer_Buzzer project (Continuous timer)
In this example, Buzzer will be on once by pressing Key S1; Buzzer will be on twice by pressing Key S2.
• ExInt_Key Project
Press Key S1, the 3 LEDs will be on in the following sequence:
...->LED4->LED3->LED2...
Press Key S2, the 3 LEDs will be on in the following sequence:
...->LED2->LED3->LED4...
• UART project
In this example, the MCU works in an asynchronous mode.
(9,600bps, 1 stop bit, no parity)
After a reset, the MCU will send "Welcome to the LIN-UART (asynchronous mode) of
MB95560series (8FX)" to RS232 transceiver.
Then the MCU feedbacks any bytes it received.
• SIO project
This example uses two EV-boards to demonstrate the SIO (synchronous mode) function.
(9600bps)
One MCU keeps sending data while the other keeps receiving. One LED is toggled to indicate
the communication is correct.
• LIN slave
In this example, the MCU is running in a Lin Slave mode. After a reset, the MCU is waiting
for data from the Master. If the data is received correct, LED4 starts twinkling.
• LIN master
In this example, the MCU is running in a Lin Master mode. After a reset, the MCU starts sending data to a Slave. If the Master gets correct data from the Slave, the MCU restarts sending.
While sending data to the Slave, LED2 keeps twinkling.
15
4.2 Project Structure
The Sample code is organized by the following structure in each project. Here take IO_LED project
for example shown in Figure 14.
Figure 14 I/O_LED Project Structure
4.3 Source Code File Description
Six files are available in each sample code source code folder shown below,
Figure 15 Source Code Files
16
4.3.1 Header Files
The MB95560.h and the _f2mc8fx.h are header files, included MB95560H/570H/580H MCU I/O
registers definition;
Here take PDR0 for example. In MB95560.h, PDR0 is defined as below.
/* REGISTER BIT STRUCTURES */
#ifdef __IO_DEFINE
#pragma segment IO=IO_PDR0, locate=0x0
#endif
typedef union {
__BYTE
struct {
byte;
__BYTE
__BYTE
__BYTE
__BYTE
__BYTE
__BYTE
__BYTE
__BYTE
P00:1;
P01:1;
P02:1;
P03:1;
P04:1;
P05:1;
P06:1;
P07:1;
__BYTE
__BYTE
__BYTE
__BYTE
__BYTE
__BYTE
__BYTE
__BYTE
P00:1;
P01:1;
P02:1;
P03:1;
P04:1;
P05:1;
P06:1;
P07:1;
} bit;
struct {
} bitc;
} PDR0STR;
__IO_EXTERN
PDR0STR
IO_PDR0;
#define
_pdr0
(IO_PDR0)
#define
PDR0
(IO_PDR0.byte)
#define
PDR0_P00
(IO_PDR0.bit.P00)
#define
PDR0_P01
(IO_PDR0.bit.P01)
#define
PDR0_P02
(IO_PDR0.bit.P02)
#define
PDR0_P03
(IO_PDR0.bit.P03)
#define
PDR0_P04
(IO_PDR0.bit.P04)
#define
PDR0_P05
(IO_PDR0.bit.P05)
#define
PDR0_P06
(IO_PDR0.bit.P06)
#define
PDR0_P07
(IO_PDR0.bit.P07)
17
4.3.2 Startup.asm File
The Startup.asm is the MB95560H/570H/580H MCU initialization file including stack settings, register bank settings and watchdog settings etc;
4.3.3 Vectors.c File.
The Vectors.c contains the MB95560H/570H/580H MCU Interrupt vectors definition.
User can pre-set all interrupt control registers in function InitIrqLevels(). It can be used to set all interrupt priorities in static applications. For example, to set the external interrupt ch.0 to level 0,
change the following code:
ILR0 = 0xFF; // IRQ0: external interrupt ch.0 | ch.4
// IRQ1: external interrupt ch.1 | ch.5
// IRQ2: external interrupt ch.2 | ch.6
// IRQ3: external interrupt ch.3 | ch.7
To
ILR0 = 0xFC; // IRQ0: external interrupt ch.0 | ch.4
// IRQ1: external interrupt ch.1 | ch.5
// IRQ2: external interrupt ch.2 | ch.6
// IRQ3: external interrupt ch.3 | ch.7
And declare the interrupt function as in Vectors.c below,
... ...
__interrupt void external_int00 (void);
... ...
#pragma intvect external_int00 0 // IRQ0: external interrupt ch.0 | ch.4
Then user can write his own interrupt sub-routine in Main.C shown as below.
/*--------------------- INTERRUPT SERVICE ROUTINE ---------------------------*/
__interrupt void external_int00 (void)
{
//User code
}
4.3.4 Main.c File
Main.c contains the user code.
18
5. Development Platform Quick Start
5.1 Tools Setup Sequence
Start the debugging system in the following sequence:
• Connect a BGMA to the PC using a USB cable, confirm the LED on the BGMA is Green;
• Connect an EV-board to BGMA IDC10 socket;
• Select the EV-board power supply and turn on the EV-board, confirm the power LED on the
BGMA is Orange and the Power LED on the EV-board is on.
5.2 Open Project and Start Debug
Users can start a debug from a PC software SOFTUNE workbench in the following sequence. Here
take IO_LED project for example.
• Start the SOFTUNE from "Startup Menu>Programs> SOFTUNE V3> FFMC-8L Family
SOFTUNE Workbench" in Windows;
• Click "Open workspace" from "File" Menu in SOFTUNE;
• Select "IO_LED.wsp" in "Open Space" window;
• Click "Start debug" from "Debug" Menu.
If the entire procedure goes right, a debug will start normally.
5.3 Operation Precautions
• All pins of MB95560H/570H/580H MCU are connected to Testing Pin on the EV-board. If
the user wants to test separate pin performance, do disconnect the header of related peripheral
modules.
• For the power of STK EV-board, do not use the different power supply (single-3 battery or 9V
DC) at the same time
• Since the device and BGMA may be broken, please use the bundled BGMA with STK EVboard.
19
SS702-00002-1v0-E
FUJITSU SEMICONDUCTOR • SUPPORT SYSYEM
New 8FX Family
8-bit MICROCONTROLLER
MB95560H/570H/580H Series
STARTER KIT MB2146-510-01-E
SETUP GUIDE
November 2011 the first edition
Published FUJITSU SEMICONDUCTOR LIMITED
Edited
Sales Promotion Department