2021-03-31 02:37 AM
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
2021-04-09 07:20 AM
Can you please provide the binary load address and size.
Also the exact STM32_Programmer_CLI commands used are helpful too.
Houda
2021-04-14 03:05 AM
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
Thank-you for your help
André