ST STM32F101 Series, STM32F103 Series User Manual

Page 1
UM0462
User manual
STM32F101xx and STM32F103xx
Flash loader demonstrator
Introduction
The purpose of this document is to describe the STMicroelectronics STM32F101xx and STM32F103xx Flash loader demonstrator application that was developed to illustrate the System Memory bootloader capabilities. This document details the prerequested hardware and software environments, as well as the use cases of the demonstrator software.
October 2007 Rev 1 1/14
www.st.com
Page 2
Contents UM0462
Contents
1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 Package contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.1 Software contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.2 Hardware contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Flash loader demonstrator installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 Hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 User interface description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2/14
Page 3
UM0462 List of figures
List of figures
Figure 1. System Properties dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Figure 2. Device Manager window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 3. Welcome window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 4. Connection settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 5. Device information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 6. Operation choice. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 7. Operation progress. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3/14
Page 4
Getting started UM0462
1 Getting started
1.1 Package contents
The following items are supplied in the Flash loader demonstrator package:
1.1.1 Software contents
1. STBLLIB.dll: a dynamic link library implementing the system memory bootloader protocol and the COM communication APIs.
2. Files.dll: a dynamic link library implementing the needed file manipulation APIs to load and store binary, hexadecimal and motorola S19 files.
3. STMicroelectronics flash loader.exe: a wizard application that provides the high-level operations that can be performed by the user.
1.1.2 Hardware contents
This tool is designed to work with all STMicroelectronics devices that support the system memory bootloader protocols. F or more deta ils , please visit the STM icroe lectroni cs w ebsite (http://www.st.com) and refer to the application note AN2606: “STM32F101xx and STM32F103xx system memory boot mode”.
1.2 System requirements
In order to use the Flash loader demonstrator with the Windows operating system, a re cent version of Windows, such as Windows 98, Millennium, 2000, XP or Vista, must be installed on the PC.
The version of the Windows OS installed on your computer may be determined by right­clicking on the “My Computer” icon on the desktop, then clicking on the “Properties” item in the display e d pop-u p menu. The OS type is displayed in the “System Prope rties” dialog box under the “System” label as shown in Figure 1.
4/14
Page 5
UM0462 Getting started
Figure 1. System Properties dialog box
For the communication , you need to verify that you have an available COM port(RS232) as one COM port is required for system connection. To check that you have an available communication port, right-click on the “My Computer” icon on the desktop and select “Properties” from the pop-up menu. The “System Properties” dialog box appears. Click on the “Hardware” tab, and then on the “Device manager” button to display the system hardware configuration. Available COM ports are grouped under the ”Ports (COM & LPT)” node in the hardware tree as shown in Figure 2.
5/14
Page 6
Getting started UM0462
Figure 2. Device Manager window
1.3 Flash loader demonstrator installation
1.3.1 Software installation
Run the UM0462.exe file: the InstallShield Wizard will guide you to install Flash loader demonstrator application on your computer. When the software is successfully installed, click on the “Finish” button.
1.3.2 Hardware installation
Connect the device to a spare COM port on your PC.
6/14
Page 7
UM0462 User interface description
2 User interface description
The Flash loader demonstrator is designed as a wizard application. It is structured into five steps, the:
welcome page
connection settings
device information
operation choice
operation progress
Step 1
Run the Flash loader demonstrator from the “Programs” menu (connection to the device has not been made yet) then, make sure that the device is connected to your PC and reset it to restart the system memory bootloader code. The Welcome window shown in Figure 3 appears.
If all is ready click “Next” to continue.
Figure 3. Welcome window
7/14
Page 8
User interface description UM0462
Step 2
The second step consists in selecting the connection settings. Select the desired UART settings (port name, baud rate, data bits, parity and stop bits and timeout) as shown in
Figure 4. The default configuration is automatically set.
Ensure that the boot configuration pins are set correctly, then reset the device and click “Next” to continue . I f a connect ion ha s been esta blished, the wizard mov es to th e next step, otherwise a message box is displayed that indicates the error that occurred.
Figure 4. Connection settings
8/14
Page 9
UM0462 User interface description
Step 3
In this step the connection has been established and communication has started. The Wizard displays the a vailable device information such as the target ID or the number of times the read protection is disabled/enabled.
Select the target name in the target combobox as shown in Figure 5, then click on “Next” to continue.
Figure 5. Device information
9/14
Page 10
User interface description UM0462
Step 4
At this step, select the requested operation –Erase, Download or Upload– and set the related parameters:
Erase
Select the “All” button to erase the whole memory – Select the “Selection” button to customize the Erase operation. Click on the
“Selection” button to display the memory mapping dialog window, then chec k the pages to be erased and click “Ok”.
Download
– Click the related browse button to open a binary, hexadecimal or S19 Motorola file.
If the loaded file is a binary file, the download address is the start address of the first page and the “@” field is still editable to accept changes. If the loaded file is a hexadecimal or an S19 motorola file, the download address is the start address of the first record in the file, and the “@” field is read- only.
– Check the “Verify” check box to launch the verification process when the Download
operation is finished. – Check “Jump to the user program” to launch the downloade d program. – Check the “Optimize download duration” to filter FFs packets (256 bytes). – Check ”Enable read pr otection after download” to activate the Flash memory read
protection.
Upload
– Click the related browse button to select which binary, hexadecimal or S19 motorola
file will store the uploaded data.
Note: Erase and Download operations can be performed only if the write protection is disabled.
Consequently, the software will automatically disable the write protection before launching the operation. For Upload operations, the software will automatically disable the read protection before launching the operation.
10/14
Page 11
UM0462 User interface description
Figure 6. Operation choice
11/14
Page 12
User interface description UM0462
Step 5
The last Wizard page shows the operation progress: it gives the size of the data to be downloaded or uploaded, the percent comp leted and the duration of the operatio n as illustrated in Figure 7.
In case of success, the progress bar is green colored. If an error occurs, the bar turns
red and the error is displayed.
To stop the operation click the “Cancel” button.
If the user program is successfully executed and
the “Jump to the user program” check box was checked in the previous step, the
communication with the system memory bootloader is lost. Consequently, the “Back” button is disabled to avoid the launch of another operation.
If the “Jump to the user prog ra m” chec k box was not chec k ed in th e previous step,
the “Back” button remains active and it is possible to return to the previous step to select the same or a different operation.
Figure 7. Operation progress
12/14
Page 13
UM0462 Revision history
3 Revision history
Table 1. Document revision history
Date Revision Changes
25-Oct-2007 1 Initial release.
13/14
Page 14
UM0462
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sal e. Purchasers are solely res ponsibl e fo r the c hoic e, se lecti on an d use o f the S T prod ucts and s ervi ces d escr ibed he rein , and ST as sumes no
liability whatsoever relati ng to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third pa rty p ro duc ts or se rv ices it sh all n ot be deem ed a lice ns e gr ant by ST fo r t he use of su ch thi r d party products or services, or any intellectua l property c ontained the rein or consi dered as a warr anty coverin g the use in any manner whats oever of suc h third party products or servi ces or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICUL AR PURPOS E (AND THEIR EQUIVALE NTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJ URY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST fo r the ST pro duct or serv ice describe d herein and shall not cr eate or exten d in any manne r whatsoever , any liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document su persedes and replaces all info rmation previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
© 2007 STMicroelectronics - All rights reserved
STMicroelectronics group of compan ie s
Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan -
Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America
www.st.com
14/14
Loading...