2018-04-12 08:10 AM
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 : STMicroelectronicsProduct ID : STM32 BOOTLOADERSerial number : 2076339B5636Firmware version : 0x011aDevice ID : 0x0435 AREA NAME SECT.NBR ADDRESS SIZE TYPE Option Bytes 0000 0x1fff7800 0040 B RWOTP Memory 0000 0x1fff7000 0001 KB RW
Device Feature 0000 0xffff0000 0004 B RW
Device name: STM32L43xxx/STM32L44xxx
Device type: MCUDevice CPU : Cortex_M4MASS 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 : 0x08000000Erasing memory corresponding to segment 0:Erasing internal memory sectors [0 33]sector 0000 does not existsector 0001 does not existsector 0002 does not existsector 0003 does not existsector 0004 does not existsector 0005 does not existsector 0006 does not existsector 0007 does not existsector 0008 does not existsector 0009 does not existsector 0010 does not existsector 0011 does not existsector 0012 does not existsector 0013 does not existsector 0014 does not existsector 0015 does not existsector 0016 does not existsector 0017 does not existsector 0018 does not existsector 0019 does not existsector 0020 does not existsector 0021 does not existsector 0022 does not existsector 0023 does not existsector 0024 does not existsector 0025 does not existsector 0026 does not existsector 0027 does not existsector 0028 does not existsector 0029 does not existsector 0030 does not existsector 0031 does not existsector 0032 does not existsector 0033 does not existDownload 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.896VERIFYING ...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: : 0x8000000Start operation achieved successfullyEven 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-programmer2018-04-13 04:00 AM
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.
2018-04-13 06:43 AM
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