2022-05-15 11:57 PM
I am trying to encrypt part of my code and write back to internal flash. The MCU is STM32F407 and write to flash sector 3 (0x0800C000 - 0x0800FFFF). I customized the sct file to avoid other codes taking the place.
The encrypted data takes 1Kbytes and writing with checking the return code without any errors. But after I restart the MCU, there are 5 bytes become 0x00: 0x0800C08C, 0x0800C090, 0x0800C091, 0x0800C092, 0x0800C093. I have tried to move the address to 0x0800C400, the 5 bytes are still zero at the same offset. I have dumped the memory and confirmed that they should be some non-zero values. Do you have any hint to solve it?
2022-05-17 02:30 AM
Hello @PZhan.1
Try first writing these address with STM32CubeProgrammer to check they can be correctly programmed.
BR,
Bruno
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.