2024-03-07 02:44 AM
Dear STM Community,
I hope this message finds you well. I am currently facing an issue while attempting to write and read data in the flash memory of an STM32F091RC using STM Cube IDE.
Specifically, while the write operation executes correctly, I encounter difficulties during the read operation. Upon reading the data, I notice that in addition to the expected data I have written, there is also unwanted junk data present (the junk data consistently appears as the number 2). I have confirmed this inconsistency through UART.
To ensure data integrity, I perform a flash memory erase operation before each write operation. However, despite this precaution, the issue persists.
I kindly request your assistance and expertise in resolving this matter. Attached, please find my code and the output for your reference.
Thank you very much for your time and support.
2024-03-07 02:47 AM
Please use this button to properly post source code:
#PostSourceCode
2024-03-07 03:12 AM
Check the minimum write size / width. You're writing a half word, 16 bits, but I think width is 64 bits
How you dump the data is less than helpful. It's obfuscated by a function you don't provide. Show memory dump from debugger or output bytes in hex individually.