Part Number: AM13E23019
After performing the 64 bit write operation we would like to verify the first programmed byte for containing the correct data, however, when checking said byte, the value that is obtained via read would appear to be 0xFF when the memory shows that the data is there, it's not blank.
This happens with different levels of optimization from O0 to O3. Such sync mechanisms as volatile, data barriers, blocking wait and others did not help with the issue. Could it be that the data cache is here at fault? In the TRM it states that "Following programming of the flash memory, there can be stale data in the processor's cache logic. Before reading programmed locations, TI recommends to first flush the cache in the CPU subsystem. " However, we did try Clear and Invalidate Cache functions and they did not resolve the issue. Could there please be an example provided on how to flush the cache before reading programmed flash?
I have recreated in the flash example code a similar case that fails the check of the first programmed byte. The file is attached as well as the screenshot that shows the memory and the read byte value mismatching each other.
Here is the file: main.c
Thank You and Best Regards!
Viktoriia