2025-02-10 05:23 AM - edited 2025-02-10 05:26 AM
Hi,
I'm facing something strange.
I'm trying to program a STM32U5G9 (disco board).
It was a success, but since I've updated the cubeProgrammer Tool it's not working anymore.
I'm trying to program a 935kB binarie file.
According to the log file, CubeProgrammer erase the 62 first sectors (62 x 8 kB = 496 kB ==> 0x7C000) and start to write.
During the verifying phase, it fails @ 0x0807 C000, corresponding to the start of flash (0x0800 0000) plus the offset previously mentionned.
Checking the memory with the "Device Memory" view in CubeProgrammer, I see that the memory is not the right one.
What is strange, is that it happens after I update the cubeProgrammer (from 2.11 I think to 2.18)
The same happens on CubeIde after an update.
Everything is fine if I do a mass erase before writting, but as I am using a virtual Eeprom on flash (package en.x-cube-eeprom-v7-0-0) I don't want to erase completely the flash, otherwise, I'm loosing datas.
Anyone facing the same behaviour?
Thanks.
Solved! Go to Solution.
2025-02-12 12:37 AM
Hello @Aurel ,
Apologies for the delayed response.
Could you please try running this command on the CLI:
STM32_Programmer_CLI -c port=SWD -w32 0x40022040 0x1FEFF8AA
Then, attempt to program your binary file again and let me know the outcome.
Maryem.
2025-02-12 12:37 AM
Hello @Aurel ,
Apologies for the delayed response.
Could you please try running this command on the CLI:
STM32_Programmer_CLI -c port=SWD -w32 0x40022040 0x1FEFF8AA
Then, attempt to program your binary file again and let me know the outcome.
Maryem.
2025-02-12 01:08 AM
Hello @Maryem and thanks for your answer.
Trying to write to the FLASH_OPTSR_PRG is unsuccessfull.
But with cube programmer, I can see the following register with the value wanted
And now, Programing is working!!
so first, big thanks.
And second, what happens? and what was the purpose of the command (RDP? WRP? )?
2025-02-14 02:33 AM
Hello @Aurel ,
Thank you for your feedback.
I'm glad to know that programming is now working for you.
The issue you encountered is related to a known problem within CubeProgrammer when the DBANK is set to 0 (incorrectly assumes a sector size of 16KB instead of 8KB). That's why, in the command suggested, I recommended changing the DBANK to 1, which fixes the sector size issue and allows your binary file to be programmed correctly.
I confirm that this issue will be fixed in a future release. I'll keep you updated on the progress.
Internal ticket number: 203113 (This is an internal tracking number and is not accessible or usable by customers)
Thank you for your patience.
Maryem.
2025-02-14 02:44 AM
Thank you for the explaination.