This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FLASH memory contents change in DEBUG ?

Hi.

We use KEIL uV4 IDE and ULINK2 (and an AT91SAM7X512 MCU).
We observe the following strange behaviour:
The contents of Flash-memory (0x17FEC0) seems to change when we do as follows:
1) Download the code
2) Enter KEIL uV4 Debug mode: addr 17FEC0 shown 0x000000 in Memory Window, not correct contents
3) Push the "RST-icon" (RESET the CPU): addr 17FEC0=0x168968, correct contents !
4) Run (F5): addr 17FEC0=0x168968, Memory Window still shows correct contents
5) Run to Breakpoint (CUP stops): addr 17FEC0=0x000000, not correct contents!
6) When we single-step in Debug: addr 17FEC0=0x000000, not correct contents
7) AND HWEN WE SINGLE-STEP THE PROGRAM, THE PROGRAM READ VALUE 0 FROM addr 17FEC0 !?
But when running the program in KEIL uV4 without single-step, it seems to work OK

We'll appreciate comments on this issue(s).

Best regards
Terje Bøhler

Parents
  • Further investigations shows that this might has something to do with differences in
    accessing the two different planes of the FLASH:
    1) When our (audio-)data is placed in the upper plane of the AT91SAM7X512, we/MCU have problems seeing/reading the data (sees wrong contents).
    2) But when our (audio-)data is placed (re-located) to the lower plane of the AT91SAM7X512, we/MCU can see/read the data OK.

    And, yes, the symbol AT91C_BASE_EFC1 is defined.
    I'll appreciate suggestions to solve the problem.

    Best regards
    Terje Bøhler

Reply
  • Further investigations shows that this might has something to do with differences in
    accessing the two different planes of the FLASH:
    1) When our (audio-)data is placed in the upper plane of the AT91SAM7X512, we/MCU have problems seeing/reading the data (sees wrong contents).
    2) But when our (audio-)data is placed (re-located) to the lower plane of the AT91SAM7X512, we/MCU can see/read the data OK.

    And, yes, the symbol AT91C_BASE_EFC1 is defined.
    I'll appreciate suggestions to solve the problem.

    Best regards
    Terje Bøhler

Children
No data