Hello,
Sorry to repost, but I am really stuck here.
I have tried a couple of new scenarios that might help figuring out the issue. It should be related with the memory write process:
a. I can read from the bootloader memory section without a problem, so the memory mapping should be ok;
b. If I write exactly what is in memory , there is no issue;
c. If I update one of the values in memory and try to write it back in memory it does break at the function FLASH_Program;
d. If I use the same code in the attachment but without the bootloader it does work fine, but if I change a bit the code in order to add ++1 at the memory value and program it again, it does fail again. And it fails when I reset and try to read the memory that in fact was not correctly written the last time.
It must be a simple fix, but I honestly can't see it right now.
Thank you for the help.
Regards