Hi All,
We have a board running a DM6446 on which we have an ARM application which needs to perform self checks to ensure that the program code loaded into DDR memory is correct.
Thus, we would like to run a checksum over the DDR memory area containing the program code. However, I have found that the checksum calculation over this area fails.
I have used the linker command file to ensure that the data sections is separated from the program code. I have also tested the checksum calculation on the program code contained in flash memory and this calculates correctly. Upon further testing I also loaded the application OUT file using the emulator and also loaded a duplicate of the application to a separate DDR memory area (Thus effectively testing calculation of non executing application code in DDR memory) and this works fine.
Using the emulator I was able to find the exact index in the checksum calculation that continues to fail. This index corresponds to the first instruction in the checksum function used to calculate the actual checksum of the application.
It would seem that accessing memory of an executing instruction returns invalid data? I also tested this by running an application which attempts to copy its own program code to a different DDR memory area. And as suspected it seems that the area of memory containing the copy function returns invalid data during the copy process.
So this might be a very dumb question but, why can't I access executing program memory areas? (Note: Instruction and Data cache is disabled)