Skip to main content
andre239955_stm1_stmicro
Associate III
March 31, 2021
Question

Flash corruption after an upgrade and calling '-s' command from STM32_Programmer_CLI

  • March 31, 2021
  • 2 replies
  • 1100 views

Hello,

CPU: ST STM32L151VC

I do the following process:

Starting from a running program I jump into DFU mode

then STM32_Programmer_CLI -c port=USB1 -d "newprogram"

then STM32_Programmer_CLI -c port=USB1 -s

program start, but if I check the two first byte of the flash with J-Flash and I can saw that 2 first bytes are corrupted. AA AA in place of 00 80

When I switch off/on the power the board doesn't restart (that is normal).

If I don't use '-s' command and simply switch off/on the board program start normally

Attached: left normal program (reloaded after -d); right corrupted program (reloaded after -s)

Thank-you for your advice

Alen

This topic has been closed for replies.

2 replies

Houda GHABRI
ST Employee
April 9, 2021

Hi andre239955_stm1_stmicro,

Can you please provide the binary load address and size.

Also the exact STM32_Programmer_CLI commands used are helpful too.

Houda

andre239955_stm1_stmicro
Associate III
April 14, 2021

Hello Houda,

Sorry for late answer;

Here below the file loaded into j-Flash tools

Also attached the Hex file.

I jump into DFU mode by software:

SysMemBootJump = (void (*)(void)) (*((uint32_t *) 0x1FF00004)); // Point the PC to the System Memory reset vector (+4)
SysMemBootJump();
 
 
 
 
 
with void (*SysMemBootJump)(void);

Command that I use for uploading is: bin\STM32_Programmer_CLI -c port=USB1 -d %1

for restarting: bin\STM32_Programmer_CLI -c port=USB1 -s

0693W000008zVdXQAU.jpgThank-you for your help

André