cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer DFU errors with STM32L433VC

Paolo Messina
Associate II
Posted on April 12, 2018 at 17:10

I'm using ROM DFU Bootloader on an STM32L433VC, with the following command:

> STM32_Programmer_CLI.exe -c port=usb1 -e all -d somefile.hex -v -g

In the output, I get erase errors for all sectors, although the programming seems to complete successfully:

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

                       STM32CubeProgrammer v1.0.0                  

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

USB speed              : Full Speed (12MBit/s)

Manufacturer ID        : STMicroelectronics

Product ID             : STM32  BOOTLOADER

Serial number          : 2076339B5636

Firmware version       : 0x011a

Device ID              : 0x0435

 

   AREA NAME          SECT.NBR        ADDRESS         SIZE         TYPE

 

 

   Option Bytes         0000          0x1fff7800      0040 B       RW

   OTP Memory           0000          0x1fff7000      0001 KB      RW

   Device Feature       0000          0xffff0000      0004 B       RW

Device name:  STM32L43xxx/STM32L44xxx

Device type:  MCU

Device CPU :  Cortex_M4

MASS ERASE ...

Mass erase command correctly executed.

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

Memory Programming ...

Openeing and parsing file: somefile.hex

  File          : somefile.hex

  Size          : 68584 Bytes

  Address       : 0x08000000

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 33]

sector 0000 does not exist

sector 0001 does not exist

sector 0002 does not exist

sector 0003 does not exist

sector 0004 does not exist

sector 0005 does not exist

sector 0006 does not exist

sector 0007 does not exist

sector 0008 does not exist

sector 0009 does not exist

sector 0010 does not exist

sector 0011 does not exist

sector 0012 does not exist

sector 0013 does not exist

sector 0014 does not exist

sector 0015 does not exist

sector 0016 does not exist

sector 0017 does not exist

sector 0018 does not exist

sector 0019 does not exist

sector 0020 does not exist

sector 0021 does not exist

sector 0022 does not exist

sector 0023 does not exist

sector 0024 does not exist

sector 0025 does not exist

sector 0026 does not exist

sector 0027 does not exist

sector 0028 does not exist

sector 0029 does not exist

sector 0030 does not exist

sector 0031 does not exist

sector 0032 does not exist

sector 0033 does not exist

Download in Progress:

�������������������������������������������������� 0%

� 2%� 5%�� 8%� 11%�� 14%� 17%�� 20%� 23%�� 26%� 29%�� 32%� 35%�� 38%� 41%�� 44%� 47%�� 50%� 52%� 55%�� 58%� 61%�� 64%� 67%�� 70%� 73%�� 76%� 79%�� 82%� 85%�� 88%� 91%�� 94%� 97%�� 100%

File download complete

Time elapsed during the download operation is: 00:00:00.896

VERIFYING ...

Read progress:

�������������������������������������������������� 50%

� 2%� 5%�� 8%� 11%�� 14%� 17%�� 20%� 23%�� 26%� 29%�� 32%� 35%�� 38%� 41%�� 44%� 47%�� 50%� 52%� 55%�� 58%� 61%�� 64%� 67%�� 70%� 73%�� 76%� 79%�� 82%� 85%�� 88%� 91%�� 94%� 97%�� 100%

Download verified successfully

RUNNING Program ...

  Address:      : 0x8000000

Start operation achieved successfully

Even if I don't specify the command '-e all' (not using Mass Erase) I get the same error messages.

Two different problems here:

1) If I specify Mass Erase ('-e all') I still get an attempt to individually erase each sector used by the firmware image, which is useless

2) Individual sector erase procedure is not handled correctly and reports incorrect error messages, at least on this MCU (STM32L433VC), I did not try other MCUs

#stm32l433 #dfu #stm32cube-programmer
2 REPLIES 2
Amel NASRI
ST Employee
Posted on April 13, 2018 at 13:00

Hi

Messina.Paolo

‌,

I reported this error displayed when performing the mass erase to our STM32CubeProgrammer experts to be investigated and fixed.

When using DFU, a mass erase is performed before downloading code. That is why you see message saying 'Mass erase command correctly executed.' even if you don't add the option '-e all'.

-Amel

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.

Posted on April 13, 2018 at 13:43

Hi Amel,

Actually, if I leave out the option '-e all' the 'MASS ERASE ...' message does not get printed (but the same individual sector erase error messages do appear). I don't know DFU protocol in detail, so I don't know what is the correct behavior.

Apparently the firmware is always programmed correctly, with or without explicit mass erase option.

Thanks,

Paolo