User Tools

Site Tools


doc:hw_bootloader

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:hw_bootloader [2014/03/01 10:46] admindoc:hw_bootloader [2014/08/10 12:25] (current) wsauer
Line 1: Line 1:
 ====== How to flash the DXM-Bluetooth with the OOBDBootloader ====== ====== How to flash the DXM-Bluetooth with the OOBDBootloader ======
  
-===== Flash with the stm32flash command line tool ===== 
  
 +===== Flash with the stm32flash command line tool =====
  
  
 Command line tool ''stm32flash'', seen here under Windows 7, 64Bit in the command prompt Command line tool ''stm32flash'', seen here under Windows 7, 64Bit in the command prompt
  
-  - Set the STM32 per Boot0 = High (3V3) into flashmode + 
-  - start the batchfile ''stm32flash.bat'' with the serial port as parameter, where the programming wire is connected to => **continue with 4** \\ {{:interface:oobd_stm32flash_batch_01.jpg?400|}} +    - Set the STM32 per Boot0 = High (3V3) into flashmode 
-  - if the STM32 is not correctly in Boot0-Mode, the following error message will be shown \\ {{:interface:oobd_stm32flash_batch_04.jpg?400|}} +    - start the batchfile ''stm32flash.bat''  with the serial port as parameter, where the programming wire is connected to  **continue with 4** \\ {{:interface:oobd_stm32flash_batch_01.jpg?400}} 
-  - Additionally to some other values the flash process will be shown going from 0 -100% \\ {{:interface:oobd_stm32flash_batch_02.jpg?400|}} +    - if the STM32 is not correctly in Boot0-Mode, the following error message will be shown  \\ {{:interface:oobd_stm32flash_batch_04.jpg?400}} 
-  - Flash process successfully finished, the green LED is now lighten permanently \\ {{:interface:oobd_stm32flash_batch_03.jpg?400|}}+    - Additionally to some other values the flash process will be shown going from 0 -100%  \\ {{:interface:oobd_stm32flash_batch_02.jpg?400}} 
 +    - Flash process successfully finished, the green LED is now lighten permanently  \\ {{:interface:oobd_stm32flash_batch_03.jpg?400}}
  
  
 ===== Pin Out of the OOBD Cup /DXM Flash interface ===== ===== Pin Out of the OOBD Cup /DXM Flash interface =====
-{{:interface:jumper_pinout.png|}} 
-^ Pin Nr. ^ OOBD V5  ^  DXM-BT  ^ 
-|  1  |  **3V3**  |  **GND**  | 
-|  2  |  Boot0    Boot0    | 
-|  3  |  **GND**  |  NC       | 
-|  4  |  Reset    Reset    | 
-|  5  |  BT-RxD  |  BT-RxD   | 
-|  6  |  MC-TxD  |  MC-TxD   | 
-|  7  |  BT-TxD  |  BT-TxD   | 
-|  8  |  MC-RxD  |  MC-RxD   | 
  
-{{:interface:oobd-cupv5_pcb_top.png?400|}} 
  
 +{{:interface:jumper_pinout.png}}
 +
 +
 +^Pin Nr. ^OOBD V5 ^  DXM-BT  |
 +|  1  |  **3V3**    **GND**   |
 +|  2  |  Boot0  |  Boot0  |
 +|  3  |  **GND**    NC  |
 +|  4  |  Reset  |  Reset  |
 +|  5  |  BT-RxD  |  BT-RxD  |
 +|  6  |  MC-TxD  |  MC-TxD  |
 +|  7  |  BT-TxD  |  BT-TxD  |
 +|  8  |  MC-RxD  |  MC-RxD  |
 +
 +
 +{{:interface:oobd-cupv5_pcb_top.png?400}}
  
  
Line 33: Line 38:
  
  
-1. Main Screen=> Next+1. Main Screen Next
  
-{{:interface:bootloader1.png?400|}} 
  
-2Hardware identified => Next+{{:interface:bootloader1.png?400}}
  
-{{:interface:bootloader2.png?400|}} 
  
-3Memorymap => Next+2Hardware identified  Next
  
-{{:interface:bootloader3.png?400|}} 
  
 +{{:interface:bootloader2.png?400}}
  
-4. Seelect Firmware => Next 
  
-{{:interface:bootloader4.png?400|}}+3Memorymap  Next
  
  
-5ongoing Download +{{:interface:bootloader3.png?400}}
  
-{{:interface:bootloader5.png?400|}} 
  
 +4. Select Firmware  Next
  
-6. Verification  
  
-{{:interface:bootloader6.png?400|}}+{{:interface:bootloader4.png?400}} 
 + 
 + 
 +5. ongoing Download 
 + 
 + 
 +{{:interface:bootloader5.png?400}} 
 + 
 + 
 +6. Verification 
 + 
 + 
 +{{:interface:bootloader6.png?400}}
  
  
 7. Download successfully finished. Use Close to end program. 7. Download successfully finished. Use Close to end program.
  
-{{:interface:bootloader7.png?400|}} 
  
 +{{:interface:bootloader7.png?400}}
  
  
------+----
  
-====== Initiales Flashen von Flashloader und Firmware mit stm32flash - All-in-One Package ====== 
  
 +====== Initial flashing of flashloader and firmware with stm32flash - All-in-One Package ======
  
-===== Programmieradapter - Anschluss ===== 
  
 +===== Programmingadapter - lead-out =====
  
-{{:doc:hw_usb-uart.jpg?150|}}{{:doc:hw_usb-uart_conn1.jpg?150|}}{{:doc:hw_usb-uart_conn2.jpg?150|}}{{:doc:hw_uart_pinout.jpg?150|}} 
-  
  
-Im ersten Bild von links ist ein USB-UART Adapter mit CP2102 Chip dargestelltDieser kann direkt mit Hilfe des mitgelieferten Kabels an die Jumperleiste am USB-UART Adapter und OOBD-Cup v5 NG angeschlossen werden.+{{:doc:hw_usb-uart.jpg?150}}{{:doc:hw_usb-uart_conn1.jpg?150}}{{:doc:hw_usb-uart_conn2.jpg?150}}{{:doc:hw_uart_pinout.jpg?150}}
  
-Hierzu müssen folgende Verbindungen hergestellt werden (USB-UART <=> Dongle): 
  
-^  Jumper Pin  ^  USB-UART 1 (MC)  ^  USB-UART 2 (BT)  ^  Reset Switch  ^  Boot0 Switch +In first picture from left you can see an USB-UART Adapter with CP2102 Chip. This can be connected with the aid  of the cable to the jumper on the USB-UART adapter and OOBD-Cup v5 NG.
-|  1 (3V3)                                                        |        3V3     | +
-|  2 (Boot0)                                                      |        Boot0   | +
-|  3 (GND)       GND                GND            |   GND         |                | +
-|  4 (Reset)                                         Reset        |                | +
-|  5 (RxD BT)  |                      TxD            |                |                | +
-|  6 (TxD MC)  |   RxD                                              |                | +
-|  7 (TxD BT)  |                      RxD            |                |                | +
-|  8 (RxD MC)  |   TxD                                              |                | +
-|  9         |                                                    |                |+
  
  
 +Therefore you have to make the following connections (USB-UART < Dongle):
  
  
- + Jumper Pin  ^  USB-UART 1 (MC)  ^  USB-UART 2 (BT)  ^  Reset Switch  ^  Boot0 Switch 
 +|  1 (3V3)  |  |  |  |  3V3  | 
 +|  2 (Boot0)  |  |  |  |  Boot0  | 
 +|  3 (GND)  |  GND  |  GND  |  GND  |  | 
 +|  4 (Reset)  |  |  |  Reset  |  | 
 +|  5 (RxD BT)  |  |  TxD  |  |  | 
 +|  6 (TxD MC)  |  RxD  |  |  |  | 
 +|  7 (TxD BT)  |  |  RxD  |  |  | 
 +|  8 (RxD MC)  |  TxD  |  |  |  | 
 +|  9 -  |  |  |  |  | 
 + 
 + 
 +^  USB-UART  ^  P2102  ^  PL2303HX 
 +|  TxD  |  orange  |  green  | 
 +|  RxD  |  red  |  white  | 
 +|  GND  |  brown  |  black  | 
 +|  +  |  |  red  | 
 + 
 + 
 +and 
  
-^  USB-UART  ^  P2102    PL2303HX  ^ 
-|  TxD        orange |  green     | 
-|  RxD        red |  white     | 
-|  GND        brown |  black     | 
-|          |     red      | 
-  
-und  
 ===== Download All-in-One Package ===== ===== Download All-in-One Package =====
  
  
-Das All-in-One Package (Flashloader_Package.zip) ist in aktueller Version immer hier zu finden +You can find  the All-in-One Package (Flashloader_Package.zip) everytime in an actual version here[[http://code.google.com/p/oobd/downloads/list|http://code.google.com/p/oobd/downloads/list]]
-http://code.google.com/p/oobd/downloads/list+
  
-In diesem Paket sind neben dem aktuellen Flashloader- und Firmwarefile das eigentliche Flashtool stm32flash sowie drei Batchdateien für Windows enthalten. Das Flashtool stm32flash gibt es neben der hier gezeigten und vorgestellten Version für Windows auch als Binary für Linux. 
  
-Die drei Batchdateien sind an den jeweiligen Anwendungsfällen "Flashen Flashloader only" (stm32flash_bootloader_only.bat), "Flashen Firmware only" (stm32flash_firmware_only.bat) und "Flashen Flashloader und Firmware - All-in-One" (stm32flash_all.bat) orientiert.+Contained in the package you will find the actual flashloaderand firmwarefile the flashtool stm32flash and thre batchfiles for windowsThe flashtool stm32flash is available for a windows surrounding an as an binary for linux.
  
-Für den initialen Flashvorgang nach Hardwarebestückung und/oder Kauf eines DXM-BT Moduls wird die "stm32flash_all.bat COMx" Variante empfohlen, da mit diesem Batchaufruf gleich der Bootloader und die Firmware auf den OOBD-Cup v5 NG oder DXM-BT geflasht werden. 
-  
-Hinweis: \\ 
-Bei der obigen Hardwarebeschreibung für ein mögliches USB-UART Interface ist nur die notwendige Jumperleiste des OOBD-Cup v5 NG zur Kontaktierungsübersicht dargestellt. 
  
-===== Flashen von Flashloader und Firmware mit dem Batchaufruf stm32flash_all.bat =====+Three batchfiles are in regards of the purpose as "flash flashloader only" (stm32flash_bootloader_only.bat), "flashen firmware only" (stm32flash_firmware_only.bat) and "flash flashloader und firmware - All-in-One" (stm32flash_all.bat).
  
  
-Nachdem im ersten Schritt das All-in-One Package besorgt und abgelegt wurde, wird im nächsten Schritt der Flashvorgang durch Aufruf von...+For the initial flashprocess after hardware assembly and / or buying of an DXM-BT module we advise to use "stm32flash_all.bat COMx" variant, because with the call of the batchfile the bootloader and the firmware will be flashed in one go on the OOBD-Cup v5 NG or DXM-BT. 
 + 
 + 
 +Note: In regards of the hardwaredescription for a possible USB-UART interface you can only see the necessary jumper bridge of the OOBD-Cup v5 NG as an overview. 
 + 
 + 
 +===== Flashing of flashloader and firmware with calling the batchfile stm32flash_all.bat ===== 
 + 
 + 
 +After as an first you got the all-in-one package and this has been saved,the next step is to call the … 
  
 stm32flash_all.bat COMx stm32flash_all.bat COMx
  
-...gestartet. Wobei x hier als Platzhalter für den jeweiligen COM-Port des USB-UART Interfaces darstellt. In unserem Beispiel ist dies COM5 
  
-Hinweis:+batch. x is standing for the number of the COM-port of the USB-UART interface. Here in the example it is COM5 
 + 
 + 
 +Note: 
 + 
 + 
 +Before the flashprocess can be started you have to assure that the USB-UART interface is on the one hand connected with the PC/Laptop that is used for the flashprocess and on the other hand the connections to the RxD/TxD/GND wires between USB-UART and DXM-module of the OOBD-Cup v5 have been established. Furthermore the Boot0-Jumper (Pin 1/2) of the jumper block JP2 has to fit. 
 + 
 + 
 +{{  :doc:hw_flash_cmd1.png?300  }} 
 + 
 + 
 +===== Readout of the hardwarerecognition - Step1 ===== 
 + 
 + 
 +After processing the stm32flash_all.bat in a first step the batch tries to readout the hardwarerecognition of the STM32F103C8. If this was successfull you should see an output with the following informations. 
 + 
 + 
 +**Important:**  
 + 
 + 
 +The first rows of the output show the result on an not succesfull flash attempt, were the connection between the USB-UART and the DXM-module could not be established. 
 + 
 + 
 +After the first third of the output you can see the information given out in regards of an succesfull  connection from the stm32flash_all.bat on COM5 with the DXM-module. 
 + 
 + 
 +{{  :doc:hw_flash_cmd2.png?300  }} 
 + 
 + 
 +===== Flashing of the flashloader/bootloader - Step2 ===== 
 + 
 + 
 +After pressing any key the flashprocess will be started. 
 + 
 + 
 +{{  :doc:hw_flash_cmd3.png?300  }} 
  
-Bevor der Flashvorgang gestartet werden kann ist sicherzustellen, dass das USB-UART Interface einerseits mit dem PC/Laptop, der für den Flashvorgang genutzt wird, verbunden ist und andererseits die Verbindungen der RxD/TxD/GND-Leitungen zwischen USB-UART und DXM-Modul des OOBD-Cup v5 hergestellt sind. Weiterhin muss der Boot0-Jumper (Pin 1/2) des Jumperblocks JP2 gesteckt sein.+{{  :doc:hw_flash_cmd4.png?300  }}
  
-{{ :doc:hw_flash_cmd1.png?300 |}} 
  
-===== Auslesen der Hardwarekennung Step1 =====+===== Flashing of the firmware Step 3 =====
  
  
-Nachdem die stm32flash_all.bat ausgeführt wurde wird im ersten Step versucht die Hardwarekennung des STM32F103C8 auszulesen. Wenn dies erfolgreich geschehen ist, sollte sich ein Bild mit den folgenden Informationen zeigen.+After successful completion of the flashprocess with the flashloader (100% Done) the next step is in regards pressing any key to start the flashprocess of the firmware.
  
-**Wichtig:** 
  
-Die ersten Zeilen des Bildes zeigen einen Flash-Versuch, wenn die Verbindung zwischen USB-UART und DXM-Modul nicht erfolgreich hergestellt werden konnte.+{{  :doc:hw_flash_cmd5.png?300  }}
  
-Nach dem ersten Drittel des Bildschirmes wird mit erneutem Aufruf von stm32flash_all.bat COM5 dargestellt, welche Informationen bei erfolgreicher Verbindung mit dem DXM-Modul ausgegeben werden. 
  
-{{ :doc:hw_flash_cmd2.png?300 |}}+{{  :doc:hw_flash_cmd6.png?300  }}
  
-===== Flashen des Flashloader/Bootloader - Step2 ===== 
-  
  
-Nach Bestätigung der Eingabeaufforderung mit einer beliebigen Taste wird der Flashvorgang mit dem Flashloader gestartet.+{{  :doc:hw_flash_cmd7.png?300  }}
  
  
-{{ :doc:hw_flash_cmd3.png?300 |}}+===== End of the flashprocess =====
  
-{{ :doc:hw_flash_cmd4.png?300 |}} 
  
-===== Flashen der Firmware Step 3 =====+After the sucessfull flashing of the firmware (100% Done) the firmware will be started automatically (Starting execution…). Hereby you should hear a double beep of the buzzer. If this is not the case and the device is an OOBD-Cup v5 NG, then the mounting of the buzzer (SG1) and the correct junctions has to be varified.
  
  
-Nachdem der Flashvorgang mit dem Flashloader  erfolgreich beendet wurde (100% Done) wird nun im nächsten Schritt nach Bestätigung der Eingabeaufforderung mit beliebiger Taste der Flashvorgang mit der Firmware fortgeführt.+===== Flashing of the firmware with integrated bootloader via Hyperterm =====
  
  
-  +…ToDo…
-{{ :doc:hw_flash_cmd5.png?300 |}}+
  
-{{ :doc:hw_flash_cmd6.png?300 |}} 
  
-{{ :doc:hw_flash_cmd7.png?300 |}} +====== Change of UART-Interfacespeed of the  BTM182 / BTM222 ======
- +
  
-===== Ende des Flashvorgangs ===== 
  
 +This step is only for completeness to the change of UART-Interfacespeed of the  BTM182 / BTM222. After the initial flashprocess (see chapter 1) the interfacespeed si set automatically, so that this is not needed for the first bringing into service.
  
-Nachdem der Flashvorgang der Firmware erfolgreich abgeschlossen wurde (100% Done) wird die Firmware automatisch gestartet (Starting execution...). Hierbei sollte nach wenigen Sekunden ein doppelter "Beep" des Buzzer wahrnehmbar sein. Falls dies nicht der Fall ist und es sich um einen OOBD-Cup v5 NG handelt, muss in einem nächsten Schritt die Bestückung des Signalgebers/Buzzer (SG1) überprüft werden. 
  
-===== Flashen der Firmware mit dem integrierten Bootloader via Hyperterm =====+To program the BT- chip you need to connect the USB-serial Adapter as shown above to the **BT-PINS!!**.
  
  
-...ToDo...+In delivery status the BTM182/BTM222 is set to the default-baudrate of 19200 bit/sThis will be changed on firmwarestart automatically to 115200 bit/s, because the OOBD-Cup v5 NG is working with 115200 bit/s to the UART-interface of the BTM182/BT222 DXM-moduleAs you can see in the picture it can be handled optional or manual with giving the command "atl5" and pressing return afterwards on an terminalprogram (eghypertherm or Putty)atl?  shows the actual UART-interfacespeed
  
-====== Änderung UART-Schnittstellengeschwindigkeit BTM182 / BTM222 ====== 
  
 +    -  9600 bit/s
 +    -  19200 bit/s
 +    -  38400 bit/s
 +    -  57600 bit/s
 +    -  115200 bit/s
  
-Dieser Schritt wird nur für die Vollständigkeit und zur Darstellung der UART-Schnittstellengeschwindigkeits-Umstellung des BTM182/BTM222 aufgezeigt. 
-Nachdem im Kapitel 1 beschriebenen initialen Flashvorgang wird der BTM182/BTM222 automatisch beim Starten der Firmware auf die neue Schnittstellengeschwindigkeit umgestellt, sodass dieser Schritt für die Erst-Inbetriebnahme nicht erforderlich ist. 
  
 +{{  :doc:hw_flash_baudrate.png?300  }}
  
-Zum Programmieren des BT- Chips muß der USB-Seriell Adapter wie oben gezeigt an die **BT-PINS!!** angeschlossen werden. 
  
-Im Auslieferzustand ist der BTM182/BTM222 auf der Default-Baudrate von 19200 bit/s eingestellt. Diese wird beim Firmwarestart automatisch auf 115200 bit/s umgestellt, da der OOBD-Cup v5 NG mit 115200 bit/s auf der UART-Schnittstelle des BTM182/BT;222 <=> DXM-Modul arbeitet. +\\
-Wie im Bild dargestellt kann dies optional bzw. bei Bedarf auch manuell erfolgen durch Eingabe von "atl5" und Bestätigung mit Enter/Return mithilfe eines Terminalprogramss (hier: Hyperterm). +
-atl? => Ausgabe der aktuellen UART-Schnittstellengeschwindigkeit +
-  - => 9600 bit/s +
-  - => 19200 bit/s +
-  - => 38400 bit/s +
-  - => 57600 bit/s +
-  - => 115200 bit/s +
- +
  
-{{ :doc:hw_flash_baudrate.png?300 |}} 
doc/hw_bootloader.1393667201.txt.gz · Last modified: 2014/03/01 10:46 by admin