cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6570-DK XSPI flash incorrect data

Artur5
Associate II

Hello,

I use an external flash in memory mapping mode and I have a strange problem. The application is executed from the internal RAM, while the checksum is calculated on the data from the external flash (simple summing of successive bytes in a loop). Interestingly, sometimes I get an incorrect result, i.e. the sum is a bit smaller, e.g. instead of 3233257 it is 3233225 as if one byte had not been counted. Interestingly, later the program jumps to the application that is executed from the external flash and it works normally (does not crash). I tried to turn off D-Cache but it does not help. Since the program from the flash executes correctly, I assume that it is not a problem with the memory configuration. What could it be?

EDIT:

I will add that the memory is configured using the ExternalMemory manager. I added a second identical image in flash memory in a different location and for which I calculate the checksum simultaneously and interestingly for both the same problem occurs alternately, exactly at the same offset byte 0x20 is changed to 0x00 offset 0x2fe0b. When I stop the debugger after some time there is already the correct value 0x20. D-Cache is disabled. I still do not know what the problem is..
 
 
 

 

BR

Artur

0 REPLIES 0