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 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 UM0462 List of figures List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. System Properties dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Device Manager window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Welcome window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Connection settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Device information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Operation choice. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Operation progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3/14 Getting started UM0462 1 Getting started 1.1 Package contents The following items are supplied in the Flash loader demonstrator package: 1.1.1 1.1.2 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. Hardware contents This tool is designed to work with all STMicroelectronics devices that support the system memory bootloader protocols. For more details, please visit the STMicroelectronics website (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 recent 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 rightclicking on the “My Computer” icon on the desktop, then clicking on the “Properties” item in the displayed pop-up menu. The OS type is displayed in the “System Properties” dialog box under the “System” label as shown in Figure 1. 4/14 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 Getting started Figure 2. UM0462 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 UM0462 2 User interface description 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 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. If a connection has been established, the wizard moves to the next step, otherwise a message box is displayed that indicates the error that occurred. Figure 4. 8/14 Connection settings UM0462 User interface description Step 3 In this step the connection has been established and communication has started. The Wizard displays the available 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 User interface description UM0462 Step 4 At this step, select the requested operation –Erase, Download or Upload– and set the related parameters: ● Note: 10/14 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 check 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 downloaded program. – Check the “Optimize download duration” to filter FFs packets (256 bytes). – Check ”Enable read protection 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. 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. UM0462 User interface description Figure 6. Operation choice 11/14 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 completed and the duration of the operation 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 program” check box was not checked in the 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. 12/14 Operation progress UM0462 3 Revision history Revision history Table 1. Document revision history Date Revision 25-Oct-2007 1 Changes Initial release. 13/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 sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating 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 party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services 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 PARTICULAR PURPOSE (AND THEIR EQUIVALENTS 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 INJURY, 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 for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information 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 companies 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