Cannot read correct data from STM32 internal FLASH
Hi,
I am using STM32u585 MCU.
It has 2 FLASH banks of 1MB each one.
In initially I read correct data (64 bytes) from page 0 of FLASH bank 2, at address 0x0810.0000
After that I erase the FLASH page.
In CubeIDE Memory Browser window I can see that the page is erased.
When I try to read the same address from FLASH I do not read 0xFF bytes (as expected) but I read the previous bytes before page erase.
When I read the contents of another FLASH page (bank 2 page 1 - the next page) it reads correct data and if after that I read the contents of page 0 I read the correct page contents (0xFF) bytes.
The same happens if I read bytes into the page 0, when I try to read the page I receive the previous bytes.
This happens to every FLASH page.
The MCU behaves like there is a FLASH "cache" memory that holds the last page contents and if I want to read the new data bytes I have to reset the "cache" by reading another page.
Is there an explanation for this? How can I read the page I have just programmed without another FLASH read?
