Unmanned technologies globally
jDrones documentation wiki

User Tools

Site Tools


can:stm32prg

Differences

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

Link to this comparison view

Next revision
Previous revision
can:stm32prg [2018/11/16 07:42]
admin created
can:stm32prg [2018/11/19 07:24] (current)
admin
Line 1: Line 1:
-Coming right up..+====== jDrones STM32 Programmer ====== 
 + 
 +These instructions are for Windows OS and STM32 ST-Link UtilityjDrones STM32 Programmer works with all ST-Link compatible softwaresIncluding MAC and Linux OSes.  
 + 
 +For MAC and Linux we currently don't have guides but they are easy to find.  
 + 
 +Here are few links to MAC/Linux guides: 
 +  * https://​startingelectronics.org/​tutorials/​STM32-microcontrollers/​programming-STM32-flash-in-Linux/​ 
 +  * https://​www.st.com/​en/​development-tools/​stsw-link007.html 
 + 
 +---- 
 + 
 +==== Board Definitions ==== 
 + 
 +{{:​can:​jdrones-stm32_programmer_genenerig-definition.jpg?​nolink&​600|}} 
 + 
 +This programmer is fully compatible with STM32 ST-Link Utility. You can download ST-Link directly from www.st.com website.  
 + 
 +Download ST-Link [[https://​www.st.com/​content/​st_com/​en/​products/​development-tools/​software-development-tools/​stm32-software-development-tools/​stm32-programmers/​stsw-link004.html|here]] 
 + 
 +---- 
 + 
 +==== What is needed to program ==== 
 + 
 +jDrones STM32 Programmer with 2.54mm and 1.27mm Pogopin programming boards 
 + 
 +{{:​can:​jd-stm32prg-v10.jpg?​nolink&​400|}} 
 + 
 +---- 
 + 
 +==== Connecting to Target Board ==== 
 + 
 +---- 
 + 
 + 
 +==== Using STLink Programmer ==== 
 + 
 +1) After you have downloaded and installed STM32 ST-Link Ulitity to your computer. Open the Application,​ first you need to load bootloader file 
 + 
 +{{:​stm:​stlink_open_bin_file_jdrones.jpg?​nolink&​600|}} 
 + 
 + 
 +2) Download bootloader filer from our wiki, save it to your computer, search the bootloader file from your computer and click OK. 
 + 
 +In this example we are using file: //​uc4h-bootloader-v006-jDrones.bin//​ which is currently default bootloader for all jDrones made UC4H UAVCAN boards.  
 + 
 +**NOTE!!** Always choose correct bootloader for the boards: 
 +  * UC4H Active boards: //​uc4h-bootloader-v006-jDrones.bin//​ 
 +  * SLCAN board: //​uc4h-slcan-v009-jDrones.bin//​ 
 +  * jD-STM Programmer: //​jdstm32_programmer_initial.hex//​ 
 + 
 +Version number may differ. Check latest versions from our [[can:​firmwares|Firmware page]] 
 + 
 +{{:​stm:​stlink_select_bootloader_jdrones.jpg?​nolink&​600|}} 
 + 
 + 
 +3) After successful load. ST-Link software will show loaded BIN file on the main screen.  
 + 
 +{{:​stm:​stlink_load_uc4h_bootloader_jdrones.jpg?​nolink&​600|}} 
 + 
 + 
 +4) Connect to target MCU. Open Target / Connect. On this point you need to have your jD-STM32 Programmer connected via USB and also use pogopin board (or similar) and connect it to target boards SWD connector.  
 + 
 +Using pogopin board, take a look at [[can:​stm32prg#​connecting_to_target_board|Connecting Target Board]] area on this page. 
 + 
 +{{:​stm:​stlink_connect_target_mcu_jdrones.jpg?​nolink&​600|}} 
 + 
 + 
 +5) After succesful connection. ST-Link will show target MCU details, Serial, flash size and other information. Next thing is to program actual MCU. 
 + 
 +If on this point you get any error messages. Take a look at [[can:​stm32prg#​settings_errors|Settings & Errors]] area. Often removing/​inserting USB cable solves all issues. Try to connect again.  
 + 
 +{{:​stm:​stlink_connections_ok_jdrones.jpg?​nolink&​600|}} 
 + 
 +6) When connection is ok. You can proceed to programming the MCU. Open Target / Program & Verify or hit CTRL-P to open programming popup window. 
 + 
 +{{:​stm:​stlink_start_programming_jdrones.jpg?​nolink&​600|}} 
 + 
 +7) Usually default settings are fine. You may activate //Verify after programming//​ as shown in picture below.  
 +{{:​stm:​stlink_start_program_p1_jdrones.jpg?​nolink&​600|}} 
 + 
 +8) Click Start and after 1-2 seconds you will see green status bar to advance rapidly.  
 +{{:​stm:​stlink_programming_jdrones.jpg?​nolink&​600|}} 
 + 
 +9) Check messages after programming. You should see //​Verification... OK// and program checksum messages after successful programming. 
 + 
 +{{:​stm:​stlink_programming_ok_jdrones.jpg?​nolink&​600|}} 
 + 
 +This example was made with Gen.Node v2.1 and with uc4h-bootloader-v006-jDrones.bin bootloader firmware. Process to program SLCAN, jD-STM32 Programmer board or any other STM32 based board is equal to this guide.  
 + 
 +If having any errors or problems. Check that your jD-STM32 programmer has latest firmware in and your computer drivers are updated. Also check SWD settings and error messages from below.  
 + 
 +---- 
 + 
 +===== Settings & Errors ===== 
 + 
 +==== SWD Settings ==== 
 + 
 +{{:​stm:​stlink_correct_settings_jdrones.jpg?​nolink&​600|}} 
 + 
 +---- 
 + 
 +==== Possible Errors ==== 
 + 
 +{{:​stm:​stlink_error_on_connect_1_jdrones.jpg?​nolink&​600|}} 
 + 
 +{{:​stm:​stlink_error_on_connect_2_jdrones.jpg?​nolink&​600|}} 
 + 
 +---- 
can/stm32prg.1542354159.txt.gz · Last modified: 2018/11/16 07:42 by admin