Home
Flash loader demonstrator
Contents
1. G All Selection Download to device m Download from file B CASTM32F1 Ox_Demo bin E Erase necessary pages Erase all pages faster c thi 8000000 Jump to the user program Optimize Remove some FFs IV Verify after download Apply option bytes E Upload from device Upload to file CASTM32F1 Ox_Demo bin Ei Enable Disable Flash protection ENABLE v WRITE PROTECTION fel Edit option bytes Nest Cancel Finish Step 5 Note This step applies to STM32 devices only There is no step 5 for STM8 devices The last Wizard page depends on the operation selected in Step 4 a Case of an Edit option bytes operation The Option byte edition page is displayed It contains the current option byte values loaded from the device RDP USER DataO Data1 WRPO WRP1 WRP2 and WRP3 For more details please refer to the Option byte loader section in the STM32F10xxx Flash programming manual PM0042 available from www st com This step gives the possibility of applying the edited option byte values loading them from the device and saving them to a file 14 21 Doc ID 13916 Rev 6 ky UM0462 User interface description STMicroelectronics r Read protection option byte RDP fh a5 Read out protection enabled User option byte USER hj FF M nRST STDBY M nRST STOP M WDG_SW Bytes for user data storage Data
2. ky Doc ID 13916 Rev 6 19 21 Revision history UM0462 4 20 21 Revision history Table 1 Document revision history Date Revision Changes 25 Oct 2007 1 Initial release Flash loader demonstrator version upgraded to V1 1 Small text changes Section 1 1 1 Software contents updated Section 1 2 System requirements modified 05 Jun 2008 2 Welcome step removed Flash status page and Option byte edition page added Section 3 Command line usage added Step 2 on page 11 added Step 5 on page 14 modified 17 Jun 2008 3 Software revision updated in Section 1 3 1 Software installation on page 7 Flash loader demonstrator version upgraded to V1 2 It can also be 31 Oct 2008 4 used with STM32F102xx devices Figure 3 to Figure 8 updated accordingly 04 Mar 2009 5 Flash loader demonstrator version upgraded to V1 3 Figure 3 to Figure 8 updated accordingly Flash loader demonstrator version upgraded to V2 0 This version applies not only to the STM32 family but also to the STM8 family Section 1 1 1 Software contents updated STUARTBLLib dll and STCANBLLib dll added 02 Jul 2009 6 Section 1 2 System requirements modified Figure 2 Device Manager window changed Section 1 3 1 Software installation and Section 1 3 2 Hardware installation updated Step 1 and Figure 3 Connection settings page updated Small text changes 4 Doc ID 13916 Rev 6 UM0462 Please Read Carefully
3. ky UM0462 Yy User manual STM32 and STM8 Flash loader demonstrator Introduction The purpose of this document is to describe the STMicroelectronics STM32 and STM8 Flash loader demonstrator application that was developed to illustrate the System memory boot loader capabilities This document details the prerequested hardware and software environments as well as the use cases of the demonstrator software July 2009 Doc ID 13916 Rev 6 1 21 www st com Contents UM0462 Contents 1 Gettingstarted 5 1 1 Packagecontents 5 1 1 1 Software contents 5 1 1 2 Hardwarecontents 5 1 2 System requirements 5 1 3 Flash loader demonstrator installation 7 1 3 1 Software installation 7 1 3 2 Hardware installation 8 2 User interface description 9 3 Command line usage 17 4 REVISION history 20 2 21 Doc ID 13916 Rev 6 ky UM0462 List of tables List of tables Table 1 Document revision history IKWA 20 ky Doc ID 13916 Rev 6 3 21 List of figures UM0462 List of figures
4. 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
5. 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 2009 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 Philippines Singapore Spain Sweden Switzerland United Kingdom United State
6. and you can return to Step 4 and select a new operation Doc ID 13916 Rev 6 15 21 User interface description UM0462 16 21 Figure 8 Operation progress page STMicroelectronics STM32F1 OxxE xx STM32F1OxxExx ST map DOWNLOAD C STM32F10 _Demo bin 512 00 KB 524288 bytes 286 67 KB 293552 bytes of 512 00 KB 524288 bytes 00 01 12 Doc ID 13916 Rev 6 UM0462 Command line usage 3 Command line usage The command line version STMFlashLoader exe provides the same functionality as the GUI It supports several options in order to run a sequence of operations The following paragraphs describe the available command line options STMFlashLoader exe option Arguments option Arguments Shows help C Defines the COM port The c option allows you to select the COM port that the command uses to communicate with the target MCU By default the command uses COM1 To select different COM port and connection settings use the c option in the form c pn port number e g 1 2 default 1 c br baud rate e g 115200 57600 default 57600 c db data bits value in 5 6 7 8 default 8 c pr parity value in NONE ODD EVEN default EVEN c sb stop bits value in 1 1 5 2 default 1 c totime out ms e g 1000 2000 3000 default 5000 The c option supports multiple arguments This means that you can set more than one argument in the sam
7. provides the high level operations that can be performed by the user 6 STMFlashLoader exe a command line version of the STMicroelectronics Flash loader exe that provides the same features over several options 7 The Map directory is located in the installation directory It contains the mapping description files of the supported devices 8 The Src directory is located in the installation directory It contains the header and Lib files of the two DLLs and the complete source of the command line version 9 The Doc directory is located in the installation directory it contains the UM0462 and UM0516 Windows API for STMicroelectronics microcontroller boot loaders user manuals 1 1 2 Hardware contents The Flash loader demonstrator is designed to work with all STMicroelectronics devices that support the system memory boot mode protocols For more details please visit the STMicroelectronics website http vww st com 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 right clicking 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 Fi
8. 0 h FF Data1 h FF Flash memory write protection option bytes Name Start address Size wia Ox 8000000 0x800 2K Ox 8000800 0x800 2K WRPO h F5 ly Page2 0x 8001000 0x800 2K v Pace 08001800 Dx800 2K FF m W D Page4 0 8002000 0x800 2K WRP2 h FF C Pages 0 8002800 0x800 2K wRP3 hy EF MA Pace6 0 8003000 0x800 2K 1S Paoe7 08003800 0x800 2k D Pages 0 8004000 0x800 2K Tae C Pace Ox 8004800 0x800 2k 1290255889 uJ Load from device Apply to device Save to file Back Cancel Einish b Case of any other operation The operation page is shown 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 8 If the operation is successful 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 Jump to the user program check box was checked in the previous step Step 4 and the user program was successfully downloaded communication with the system memory boot loader is lost Consequently the Back button is redirected to the Connection settings page Step 1 to avoid the launch of a new operation If the Jump to the user program check box was not checked in Step 4 the Back button is still active
9. 8000FFF 0x800 2K pPace2 0x8001000 0x80017FF 0x800 2K S Page3 Ox8001800 Ox8001FFF 0x800 2K fM Pages Ox8002000 Ox 80027FF 0x800 2K S Pag5 0x8002800 0x 8002FFF 0x800 2K fl Page6 Ox8003000 Ox 80037FF 0x800 2K Page7 Ox8003800 0x 8003FFF 0x800 2K pPece8 Ox8004000 Ox 80047FF 0x800 2K M pPace Ox8004800 Ox 8004FFF 0x800 2K fb Pace 0x 8005000 0 80057FF 0x800 2K Pagel Ox8005800 0x8005FFF 0x800 2K amp onin Ne onncann Ne onnc7cc n onn rev Legend Protected GB UnProtected W IOOOOGO00G000 pooooG0000000 BJ Next Cancel Einish Doc ID 13916 Rev 6 4 UM0462 User interface description Step 4 At this step select the requested operation Erase Download Upload or Disable Enable Flash protection or Edit option bytes and set the related parameters 1 Erase a Choose All to erase the whole memory b Choose Selection to customize the Erase operation Click the button to display the memory mapping dialog window Then check the pages to be erased and click OK 2 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 i
10. Figure 1 System Properties dialogbok 6 Figure 2 Device Manager window 0 cc tees 7 Figure 3 Connection settings page 1 2 6 cette eee 10 Figure 4 Flash status page sse llo Pha n eee ROD bee De ee ee Wa 11 Figure 5 Device information page ec eee ee 12 Figure 6 Operationchoicepage 14 Figure 7 Option byte editionpage 15 Figure 8 Operation progress page 16 4 21 Doc ID 13916 Rev 6 ky UM0462 Getting started 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 boot loader protocol and the communication APIs as virtual functions to be loaded dynamically from the STUARTBLLib dll and STCANBLLib dll files 2 STUARHTBLLib dll a dynamic link library implementing the system memory boot loader protocol and the COM communication APIs 3 STCANBLLib dll a dynamic link library implementing the system memory boot loader protocol and the CAN communication APIs 4 Files dl a dynamic link library implementing the needed file manipulation APIs to load and store binary hexadecimal and motorola S19 files 5 STMicroelectronics Flash loader exe a wizard application that
11. e get to read option bytes from the device and store values to a file get fn file name full path name Use set to write option bytes to the device The option bytes can be read from a file or given as values set fn file name full path name set vals OPB hex value OPB in User RDP DataO Data1 WRPO WRP1 WRP2 WRP3 The o option can accept multiple arguments as shown below 0 get get file name set set file name o get get file name set vals User 01 RDP 5A DataO DE Data1 EA Warning When setting option bytes if RDP is not equal to A5h the read protection is activated and all subsequent operations will fail Doc ID 13916 Rev 6 ky UM0462 Command line usage P Activates or deactivates the protection It is used as shown below p erp Activate read protection p drp Deactivate read protection p ewp number_of_pages_group pages_group_codes activates the write protection on the given page group codes p dwp disables the write protection Warning The erp argument activates the read protection All subsequent operations will fail To avoid this kind of problem use p erp as the last argument r Performs a jump to the specified address It is used as follows r a address hex Note Note that all command line options found are executed IN ORDER Thus with a careful arrangement of the command line options you can perform a complicated sequence of operations
12. e command c pn 1 br 115200 to 7000 i device name Defines the MCU target to be used For example STM32F10xxBxx STM32F10xx8xx STM32F10xx6xx The device name is the name of the map file located in the Map directory e Erase command According to the given arguments the command can be used to erase a specific page of memory or to erase the entire Flash memory This operation can take a second or more to complete depending on the memory size involved e all erase all pages e sec number of pages group pages group codes e sec 3 0 1 2 erases 3 groups of pages coded 0 1 and 2 Doc ID 13916 Rev 6 17 21 Command line usage UM0462 18 21 u Uploads the Flash memory contents to the specified file bin hex or s19 file the file type is recognized by its extension to specify a file use the u option in the form u fn file_name full path name d Downloads the contents of the specified file into the MCU Flash memory at the specified address To specify the file to be downloaded and the download address use the d option in the form d a address hex fn file_name full path name bin hex or s19 file the file type is recognized by its extension The address is mandatory in the case of binary files and ignored in the case of hex and s19 files To verify the downloaded data add the v argument To optimize and remove FF packets use the o argument O Gets or sets option bytes Us
13. gure 1 Doc ID 13916 Rev 6 5 21 Getting started UM0462 6 21 Figure 1 System Properties dialog box System Properties System Restore Automatic Updates l Remote General Computer Name Hardware Advanced System Microsoft Windows XP Professional Version 2002 Service Pack 2 Registered to STMicroelectronics STMicroelectronics 75487 540 4245104 23500 Manufactured and supported by ST UT Excelence Center HP dc 500 Corporate Master Intel R Pentium R 4 CPU 3 20GHz 2 33 GHz 504 MB of RAM Physical Address Extension Support Information For communication purposes you need to verify that you have e anavailable COM port RS232 if the application implements the UART interface e a ComBox bridge plugged and installed on your machine if the application implements the CAN interface To check that you have an available interface COM or ComBox 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 amp LPT node in the hardware tree and the ComBox bridge is under the Universal Serial Bus Controllers node as shown in Figure 2 Doc ID 13916 Rev 6 UM0462 Getting started 1 3 1 3 1 Figure 2 De
14. imeout s s z CAN ComBox Baud Rate fi Mb s Timeout s fi USB DFU Doc ID 13916 Rev 6 UM0462 User interface description Note Step 2 In the second step the connection has been established and communication has started It consists in displaying the Flash memory status This status can be read protected in which case the Next button is disabled until the read protection is removed by clicking on the Remove protection button Clicking on the Remove protection button will not only read unprotect the Flash memory it will also erase all its pages Figure 4 Flash status page STMicroelectronics 3 Target is readable Please click Next to proceed Doc ID 13916 Rev 6 11 21 User interface description UM0462 12 21 Step 3 In this step the Wizard displays the available device information such as the target ID the firmware version the supported device the memory map and the memory protection status Select the target name in the target combobox as shown in Figure 5 then click on Next to continue Figure 5 Device information page STMicroelectronics Please select the target in the targets list box Target PID h 0414 Version 21 Flash mapping Name Start address End address Size fiy Page0 Ox8000000 0x80007FF 0x800 2K S Pagel Ox8000800 Ox
15. n 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 Optimize to filter FFs packets 256 bytes Check Apply option bytes then browse the option byte file created by the Edit option bytes operation The values in the selected file will be applied to the device after download 3 Upload Click the related browse button to select which binary hexadecimal or S19 motorola file will store the uploaded data 4 Disable Enable Flash protection Select the choices from the two drop down menus to make up the desired command Enable Read protection Disable Read protection Enable Write protection Disable Write protection All protection commands will be applied to all the Flash memory pages except for the Enable Write Protection which can be customized This is done by clicking the button to select the pages to be write protected 5 Edit option bytes f you need to set the option bytes check the option then click Next to move to the option byte edition page Step 5 Figure 7 Warning Erase and Download operations can be performed only if the write protection is disabled ky Doc ID 13916 Rev 6 13 21 User interface description UM0462 Figure 6 Operation choice page STMicroelectronics Erase
16. our computer Once the software has been successfully installed click on the Finish button a directory containing the driver install for the ComBox Bridge will automatically open Use the COMBox INF file to install this driver Doc ID 13916 Rev 6 7 21 Getting started UM0462 1 3 2 Hardware installation As the Flash loader demonstrator is able to communicate over the UART and CAN interfaces the device should be connected to a spare PC COM port and to the PC ComBox bridge in the event of a UART or CAN communication respectively 8 21 Doc ID 13916 Rev 6 UM0462 User interface description 2 Note User interface description The Flash loader demonstrator is designed as a wizard application It is structured into six steps the Connection settings page Flash status page Device information page Operation choice page Option byte edition page Operation progress page DaRoN Step 1 Run the Flash loader demonstrator application 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 boot loader code This step consists in selecting the connection interface and its related settings Select the desired interface UART CAN or USB then set the connection settings port name baud rate and timeout etc as shown in Figure 3 For an optimum configuration for the UART interface set Ba
17. s of America www st com ky Doc ID 13916 Rev 6 21 21
18. ud Rate to 57600 bits per second and Timeout s to 5 seconds Ensure that the boot configuration pins are set correctly then 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 Possible errors messages e Cannot open the COM CAN port this message is shown if the selected COM port is not found or if it is already being used by another process e Unrecognized device this message is shown if the received value is different from 79h Resetting the device may solve the problem e No response from the target this message is shown when there is no response from the target It indicates that the System memory boot loader is not functional Verify the boot configuration and check that the used microcontroller contains the boot loader code The Timeout argument is the period of time after which a read request from the serial port is aborted if no data is received The recommended value is 5 seconds but it depends on the used environment like the hardware performance Doc ID 13916 Rev 6 9 21 User interface description UM0462 10 21 Figure 3 Connection settings page STMicroelectronics Select the communication port and set settings then click next to open connection UART Port Name comt 7 731 l Parity Even z BaudRate 115200 v Stop Bits fi Data Bits s T
19. vice Manager window a Device Manager MaX File Action View Help H4 amp mim m TUNOO349 y Computer ye Disk drives 1 Display adapters DVD CD ROM drives 4 Floppy disk controllers gy Human Interface Devices Sy IDE ATA ATAPI controllers Ge Keyboards Mice and other pointing devices 9 Monitors BB Network adapters Ports COM amp LPT Communications Port COM1 a ECP Printer Port LPT1 Processors 9 Sound video and game controllers System devices g Universal Serial Bus controllers COMBox Interfaces COMBox JTAG Intel R 82801GB USB Universal Host Contre Intel R 82801GB USB Universal Host Contre gt Intel R 82801GB USB Universal Host Contro V gt It is interesting to know the capabilities of the COM port To find out right click on the Communication Port COMXx item then click on Properties to display the Properties window Select the Port Settings tab then click on the arrow next to the Bits per second combo box to know the baud rates supported by the port Flash loader demonstrator installation Software installation If an older version is installed on you computer remove it by using the Add or Remove Programs service in the Control Panel Run the Flash Loader Demonstrator V2 0 Setup exe file the InstallShield Wizard will guide you through the installation of the Flash loader demonstrator application on y
Download Pdf Manuals
Related Search
Related Contents
Adobe Fireworks 8. Doc Set 18 anno - piazza affari アンリツ株式会社 MX269017A ベクトル変調解析 ソフトウェア 取扱説明 ILED® Aquarius Illuminated Windsock User Manual manual técnico y practico de refrigeracion y aire acondicionado Manuel d`utilisation Split Type Air Conditioner FTXM-H Series Betriebsanleitung PH15 Copyright © All rights reserved.
Failed to retrieve file