2025-10-16 3:39 AM
Hi all,
I a developing a custom product were the partition is like Bootloader + APP1 + Partition 2 , were I Integrated the DFU library into bootloader and which is successfully enumerated in PC without any errors. My goal is do the flashing .bin file into app1 partition using this USB DFU. But I couldn't even connect the the device. Attaching the screenshot and logs for your reference.
the MCU is stm32h563rgt6 with 1mb of flash.
Bootloader size: 128kb //0x08000000
App1 partition size: 384kb and //0x08020000
Partition2: 384KB ////0x08080000
this also asking when trying to connect
and I proceeded with OK
please see the logs from STM32 Cube programmer
15:53:40 : UR connection mode is defined with the HWrst reset mode
15:54:11 : USB speed : Full Speed (12MBit/s)
15:54:11 : Manuf. ID : STMicroelectronics
15:54:11 : Product ID : STM Device in DFU Mode
15:54:11 : SN : 336E36833233
15:54:11 : DFU protocol: 1.1
15:54:11 : Board : --
15:54:11 : Device ID : 0x0484
15:54:14 : Disabling memory Read Protection...
15:54:14 : Memory Read Protection disabled successfully
15:57:41 : UR connection mode is defined with the HWrst reset mode
15:57:41 : USB speed : Full Speed (12MBit/s)
15:57:41 : Manuf. ID :
15:57:41 : Product ID :
15:57:41 : SN :
15:57:41 : DFU protocol: 1.1
15:57:41 : Board : --
15:57:41 : IAP
15:57:41 : UPLOADING ...
15:57:41 : Size : 885760 Bytes
15:57:41 : Address : 0x8000000
15:57:41 : Read progress:
15:57:41 : Error: Data read failed
15:57:42 : Warning: Connection to USB device is lost
15:57:42 : Warning: Connection to USB device is lost
15:57:42 : Disconnected from device.
15:57:42 : Disconnected from device.
2025-10-16 4:10 AM
Hi Aravindpv, I believe that Bootloader + APP1 + Partition 2 partitioning is just your logical presentation of flash memory areas and can not be exposed as D: E: F: drive to host USB (enumeration) because otherwise they should be formatted file systems. I guess that DFU could be exposed as whole drive and allow to write single file and not as file system with partitions. Please Correct me if i am wrong. Also DFU is executing program probably related to Bootloader and I am not sure both Programmer and DFU can be executed same time and for Programmer flash is just plain address space not partitioned.
2025-10-16 10:12 PM
Hi i programmed like the starting flash address as the following
Bootloader size: 128kb //0x08000000
App1 partition size: 384kb and //0x08020000
Partition2: 384KB ////0x08080000
and I have 3 different projects as well. So in my understanding I build app1 and I can do flash the .bin file for particular address using swd (with stlink). My question is that, is it possible with DFU also?
Since I implemented DFU stack in bootloader app, does it capable of expose the memory region which can be programmed using stm32 cube programmer?
2025-10-23 11:55 PM - edited 2025-10-23 11:55 PM
can i have a solution.
This is what i getting While trying to perform a flash into bank2
[INFO] Executing write command: "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" -c port=usb1 -w C:\STM32\APP2\Debug\APP2.bin 0x08080000 -v -rst
[ERROR] APP2 flashing failed :cross_mark:
STDOUT:
-------------------------------------------------------------------
STM32CubeProgrammer v2.19.0
-------------------------------------------------------------------
USB speed : Full Speed (12MBit/s)
Manuf. ID : STMicroelectronics
Product ID : STM32 custom DFU
SN : 336E36833233
DFU protocol: 1.1
Board : --
Device ID : 0x0484
Error: a read Operation failed, please check if any memory protection mechanism is active.
STDERR: