cancel
Showing results for 
Search instead for 
Did you mean: 

Program update

GauravK
Senior

Hi,

1. is there any tool (GUI) to update program using executable?

2. How to have different modes of programming? (UART/ USB/ sd card)

3. Bootloader mentions: USB OTG FS (PA11/12) in Device mode (DFU: device firmware upgrade). Can external HS phy in FS as a device be used to update program?

 

16 REPLIES 16
SofLit
ST Employee

Hello,


1. is there any tool (GUI) to update program using executable?


Using STM32CubeProgrammer tool

SofLit_0-1718375908892.png

 


2. How to have different modes of programming? (UART/ USB/ sd card)


Read AN2606 STM32 microcontroller system memory boot mode / Read the table " configuration in system memory boot mode" that corresponds to your device. It describes the different resources and which interface is used for bootloader for that device. SD card is not a part of the ST bootloader you need to develop it yourself.


3. Bootloader mentions: USB OTG FS (PA11/12) in Device mode (DFU: device firmware upgrade). Can external HS phy in FS as a device be used to update program?


Same answer as 2.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS: Be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.
GauravK
Senior

Hi, reading on program update is ongoing.

I tried using STM32CubeProgrammer and was able to program using ST-Link. 

but I tried USB FS device with DFU, and STM32CubeProgrammer was able to detect USB and when connect is pressed...the bottom bar keeps on searching and never finishes...this is with STM32F469 discovery kit.

I tried loading "DFU_standalone" also but could see same.

Please any suggestions?

What about boot pin? How you did manage it? & Reset?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS: Be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.
GauravK
Senior

on kit I see boot 0 and boot 1 are to GND through resistors, I was not able to change those.

Also I tried pressing RESET button, nothing happened

I didn't go for having USB FS connected and re-plugging ST-Link cable, since I read board should be powered before connecting USB.

Reading is on-going, if any suggestions from experts, can speed-up our understanding

The features and functions of the ROM will be limited. It's aimed at production programing or debricking in the field. 

For a better, more tailored, user experience you code your own loader with the rich features you want. One that implements DFU, or MSC for a drag-n-drop update, does serial XMODEM from a terminal app, or checks an SD Card for an update image.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
GauravK
Senior

I changed Boot0 to 3.3V and was able to do "Start Program" from CubeProgrammer, USB was detected and download looked complete. But it didn't boot to flash.

So changed again boot0 to GND, but don't see the program updated...

Is anything missed?

I used .elf files, 2 numbers, both having different LEDs to be toggled


So changed again boot0 to GND, but don't see the program updated...


Did you reset the MCU after changing boot0 to GND?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS: Be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help/support.
GauravK
Senior

yes reset press tried, also USB cable re-insertion tried.

 

GauravK
Senior

CubeProg logs for USB DFU, verify program is failing

18:47:37 : UR connection mode is defined with the HWrst reset mode 18:47:37 : USB speed : Full Speed (12MBit/s) 18:47:37 : Manuf. ID : STMicroelectronics 18:47:37 : Product ID : STM32 BOOTLOADER 18:47:37 : SN : 2057355C5231 18:47:37 : DFU protocol: 1.1 18:47:37 : Board : -- 18:47:37 : Device ID : 0x0434 18:47:37 : UPLOADING OPTION BYTES DATA ... 18:47:37 : Bank : 0x00 18:47:37 : Address : 0x1fffc000 18:47:37 : Size : 16 Bytes 18:47:37 : Bank : 0x01 18:47:37 : Address : 0x1ffec008 18:47:37 : Size : 4 Bytes 18:47:37 : UPLOADING ... 18:47:37 : Size : 1024 Bytes 18:47:37 : Address : 0x8000000 18:47:37 : Read progress: 18:47:37 : Data read successfully 18:47:37 : Time elapsed during the read operation is: 00:00:00.003 18:47:58 : Memory Programming ... 18:47:58 : Opening and parsing file: usb_fs_update_test_01 - led1.elf 18:47:58 : File : usb_fs_update_test_01 - led1.elf 18:47:58 : Size : 27.00 KB 18:47:58 : Address : 0x08000000 18:47:58 : Erasing memory corresponding to segment 0: 18:47:58 : Erasing internal memory sectors [0 1] 18:47:58 : sector 0000 does not exist 18:47:58 : sector 0001 does not exist 18:47:58 : Download in Progress: 18:47:58 : File download complete 18:47:58 : Time elapsed during download operation: 00:00:00.240 18:47:58 : Verifying ... 18:47:58 : Read progress: 18:47:58 : Error: Data mismatch found at address 0x08000DD0 (byte = 0x00 instead of 0x40) 18:47:58 : Error: Download verification failed 18:48:13 : Disconnected from device.
View more

 whereas from ST Link its ok

18:45:48 : UR connection mode is defined with the HWrst reset mode 18:45:49 : ST-LINK SN : 066CFF575285514867153350 18:45:49 : ST-LINK FW : V2J44M29 18:45:49 : Board : 32F469IDISCOVERY 18:45:49 : Voltage : 3.25V 18:45:49 : SWD freq : 4000 KHz 18:45:49 : Connect mode: Normal 18:45:49 : Reset mode : Software reset 18:45:49 : Device ID : 0x434 18:45:49 : Revision ID : Rev A 18:45:49 : Debug in Low Power mode is not supported for this device. 18:45:49 : UPLOADING OPTION BYTES DATA ... 18:45:49 : Bank : 0x00 18:45:49 : Address : 0x40023c14 18:45:49 : Size : 8 Bytes 18:45:49 : UPLOADING ... 18:45:49 : Size : 1024 Bytes 18:45:49 : Address : 0x8000000 18:45:49 : Read progress: 18:45:49 : Data read successfully 18:45:49 : Time elapsed during the read operation is: 00:00:00.007 18:45:51 : Memory Programming ... 18:45:51 : Opening and parsing file: usb_fs_update_test_01 - led3.elf 18:45:51 : File : usb_fs_update_test_01 - led3.elf 18:45:51 : Size : 27.00 KB 18:45:51 : Address : 0x08000000 18:45:51 : Erasing memory corresponding to segment 0: 18:45:51 : Erasing internal memory sectors [0 1] 18:45:51 : Download in Progress: 18:45:52 : File download complete 18:45:52 : Time elapsed during download operation: 00:00:00.902 18:45:52 : Verifying ... 18:45:52 : Read progress: 18:45:52 : Download verified successfully 18:46:09 : Disconnected from device.
View more