MCBSTM32E
Quick Start Guide
Getting Started and Blinky Example
This
Quick Start Guide
introduces the MCBSTM32E
boards for the STMicroelectronics
STM32F103ZE
device.
It shows how to install the ARM software development tools
and run a variety of example projects.
Connecting to your Target
The target is powered via your PC, through its USB port. The Keil
ULINK family of adapters connect the USB port of your PC to
the JTAG port of your target board allowing you to download and
debug embedded programs running on your target hardware.
ULINK2 and ULINK-ME support JTAG and Serial-Wire Debug
(SWD) for debugging of ARM-based targets.
Installing the Software
To install the evaluation version of the ARM Microcontroler
Development Kit (MDK) from a CD-ROM
n
the CD-ROM into your PC.
Insert
If the opening screen does not appear, run SETUP from the
CD root directory
Install Evaluation Software, then ARM Compiler
(Eval Tools)
n
the setup program instructions
Follow
n
Click
Using ULINK2
The ULINK2 Adapter connects to the MCBSTM32E using the
20-pin ribbon cable.
Using ULINK-ME
The ULINK-ME Adapter connects directly to the 20-pin JTAG
connector on the MCBSTM32E.
Note:
The first MCBSTM32E boards shipped without a
CD-ROM. An evaluation version of MDK is available for
download from http://www.keil.com/demo/.
n
The LEDs
Blinky Example
This example demonstrates the ease of downloading and
debugging an application on a target board.
It can be found at:
C:\Keil\ARM\Boards\Keil\MCBSTM32E\Blinky
To use this example
n
n
Open
on the target are controlled by the potentiometer
setting. As the setting increases, the LEDs scroll faster.
Start debug mode
n
Using the debugger commands, you may:
n
n
n
n
n
n
Single step through code
Set breakpoints
Run the application
Review variables in the watch window
Reset the device to re-run the application
Use the yellow arrow (program counter) to view the
current assembler or C statement
Start
m
Vision
the Blinky.uv2 project file
Project - Open
and link the Blinky application
Project - Build
the application into on-chip Flash ROM
Flash - Download
n
Compile
n
Program
www.keil.com/mcbstm32e
MCBSTM32E Examples
Real-Time Trace using SWV
This example demonstrates the value of Real-Time Trace using the
Serial Wire Viewer (SWV) features of STM32 microcontrollers.
It can be found at:
C:\Keil\ARM\Boards\Keil\MCBSTM32E\STLIB_Blinky
To use this example:
n
target build option - STM32 Trace C
Select
Running Blinky in Simulation
The Simulator Target of the Blinky example demonstrates the
extra debug features of
m
when running in simulation.
Vision
It can be found at:
C:\Keil\ARM\Boards\Keil\MCBSTM32E\Blinky
To use this example in simulation:
n
target build option - Simulator
Select
and download to Flash.
Debug mode.
n
the Serial Wire Viewer and Logic Analyzer
Select
View - Serial Window - Serial Wire Viewer
View - Logic Analyzer
n
Start
n
The A/D
n
Compile
project
n
Start Debug mode
n
the Performance Analyzer and Logic Analyzer Windows
Open
View - Performance Analyzer Window
View - Code Coverage Window
n
Step through the code
Coverage Window shows what percentage of the
instructions of each function have been executed
n
The Performance Analyzer Window shows how much time the
processor has spent in each function
n
The Code
n
Compile
converter output will be displayed in both the Serial
Wire Viewer Window and the Logic Analyzer. These values
change as you move the potentiometer.
Application note 197 provides full information on Real-Time Trace,
http://www.keil.com/appnotes/docs/apnt_197.asp
USB - HID Demo
This USB example project implements a Human Interface Device
(HID), and connects directly to your PC via the USB. No special
USB drivers are required, since the HID support is already built
into Windows 2000 and Windows XP.
It can be found at:
C:\Keil\ARM\Boards\Keil\MCBSTM32E\USBHID
To use this example:
n
m
Start Vision
n
the HID.uv2 project file and download to Flash
Open
Project - Open
Flash - Download
n
power on the target so that your PC recognizes it as an
Cycle
HID device
n
the USB Client application which can be found at:
Install
C:\Keil\ARM\Utilities\HID_client\Release
n
the evaluation board from the drop-down menu
Select
Traffic example with RTX
This example uses interrupts to control a traffic light system
running on the RTX real-time operating system.
It can be found at:
C:\Keil\ARM\Boards\Keil\MCBSTM32E\RTX_Traffic
To use this example:
n
m
Start Vision
n
the Traffic.uv2 project file
Open
Project - Open
n
Compile and link the application, then program it into on-chip
Flash ROM
Project - Build Target
Flash - Download
n
The LEDs will begin to flash in a controlled manner
n
The tasks running in the application may be viewed from the
debugger window
Peripherals - RTX Kernel
or unchecking the boxes in the Output (LEDs) group
turns the MCBSTM32E Board’s LEDs on and off.
n
(Buttons) show the status of the on-board buttons
Inputs
n
Checking
www.keil.com