cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer 2.2.0 (Linux Mint) DFU mode - flash erase problems

yurybotov
Associate

Tested chips: stm32f405rgt6, stm32f411ceu6 (DFU bootloader - internal, libusb-1.0.0).

Then I try to erase one sector or range of sectors [X Y] - it is failed:

(I remove blank lines)

"./STM32_Programmer.sh -vb 2 -c port=USB1 -e 0

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.2.0          

   -------------------------------------------------------------------

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : STM32 BOOTLOADER

SN     : 385C34733435

FW version : 0x011a

Device ID  : 0x0413

  AREA NAME     SECT.NBR    ADDRESS     SIZE     TYPE

  Internal Flash    0000     0x08000000   0016 KB   REW

            0001     0x08004000   0016 KB   REW

            0002     0x08008000   0016 KB   REW

            0003     0x0800c000   0016 KB   REW

            0004     0x08010000   0064 KB   REW

            0005     0x08020000   0128 KB   REW

            0006     0x08040000   0128 KB   REW

            0007     0x08060000   0128 KB   REW

            0008     0x08080000   0128 KB   REW

            0009     0x080a0000   0128 KB   REW

            0010     0x080c0000   0128 KB   REW

            0011     0x080e0000   0128 KB   REW

  Option Bytes     0000     0x1fffc000   0016 B    RW

  OTP Memory      0000     0x1fff7800   0512 B    RW

            0001     0x1fff7a00   0016 B    RW

  Device Feature    0000     0xffff0000   0004 B    RW

sending an abort request

setting the address pointer to address: 0x08000000

sending an abort request

setting the address pointer to address: 0x08000000

setting the address pointer to address: 0x08000000

Device name : STM32F405xx/F407xx/F415xx/F417xx

Device type : MCU

Device CPU : Cortex-M4

setting the address pointer to address: 0x08000000

Erase sector(s) ... 

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

sending a clear status request

libusb control transfer error: -1

unable to switch the device to dfuIDLE/dfuDNLOAD_IDLE state

erasing sector 0000 @: 0x08000000 failed

Flash page/sector erase command correctly executed.

Note: if flash sector is protected, it will not be erased."

Then I erase all sectors - it is working good:

"./STM32_Programmer.sh -vb 2 -c port=USB1 -e all

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.2.0          

   -------------------------------------------------------------------

USB speed  : Full Speed (12MBit/s)

Manuf. ID  : STMicroelectronics

Product ID : STM32 BOOTLOADER

SN     : 385C34733435

FW version : 0x011a

Device ID  : 0x0413

   AREA NAME     SECT.NBR    ADDRESS     SIZE     TYPE

  Internal Flash    0000     0x08000000   0016 KB   REW

            0001     0x08004000   0016 KB   REW

            0002     0x08008000   0016 KB   REW

            0003     0x0800c000   0016 KB   REW

            0004     0x08010000   0064 KB   REW

            0005     0x08020000   0128 KB   REW

            0006     0x08040000   0128 KB   REW

            0007     0x08060000   0128 KB   REW

            0008     0x08080000   0128 KB   REW

            0009     0x080a0000   0128 KB   REW

            0010     0x080c0000   0128 KB   REW

            0011     0x080e0000   0128 KB   REW

Option Bytes     0000     0x1fffc000   0016 B    RW

  OTP Memory      0000     0x1fff7800   0512 B    RW

            0001     0x1fff7a00   0016 B    RW

  Device Feature    0000     0xffff0000   0004 B    RW

sending an abort request

setting the address pointer to address: 0x08000000

sending an abort request

setting the address pointer to address: 0x08000000

setting the address pointer to address: 0x08000000

Device name : STM32F405xx/F407xx/F415xx/F417xx

Device type : MCU

Device CPU : Cortex-M4

setting the address pointer to address: 0x08000000

Mass erase ... 

sending an abort request

sending a full flash erase request

Mass erase command correctly executed.

Note: if there's any flash protection, it will not be erased."

dfu-util (v0.9) - working correctly.

0 REPLIES 0