thank you for the explanation "I have a question, and I hope you can help me with it. I am utilizing four sectors to store four variables on an STM32F411CEU6. However, I'm encountering an issue where the compiler or debugger is using sector 3 and altering my data. For instance, when I store the temperature value in sector 3, I receive unexpected results like zero or strange numbers. Upon inspecting the memory, I discovered that the compiler uses one of my sectors to write its own data. I researched online and learned that I may need to modify the linker script. Can you assist me with this?" thank yyou
Hi,yes,before writing the whole sector is usually cleared,so you loose all data stored initially,always read and stored the data before writing to the flash