I am having a problem when I try to copy of a memory (flash) for another memory (sdram) in the only one point of the code.
I don't know if this information is important to analise my problem, but I'm using:
- Windows XP (Virutal Machine)
- Visual DSP++ 5.0 (Update 7)
- Emulator ADZS-USB-ICE
This is part of my code (follow down):
R5 = RTS_OPCODE ( Z ) ; /* RTS OPCODE = 0x0010 */
R6 = W [ P5 ++ ] ( Z ) ; /* GET NEW WORD OF OPCODE */
W [ P4 ++ ] = R6 ; /* STORE NEW WORD OF OPCODE IN SCN_DIG_PRG */
CC = R5 == R6 ; /* RTS OPCODE ENDING INSTRUCTION ? */
IF !CC JUMP NWRD_FIX4_TO_REAL ;
P5 = 0x917680 (Address to flash memory) and the contents in the memory are [07 49]
0x917680 = 07
0x917681 = 49
P4 = 0xA40012 (Address to sdram memory)
The code is simple (copy flash memory in the SDRAM memory) until the code find the instruction RTS - code (0x0010).
So, my problem is in instruction R6 = W [ P5 ++ ] ( Z ), when run until the address 0x917680. Before and after this address is correct.
If I read in simulator in step (F11), the register R6 read correct [4907 - CC = BITTST (R7, 0x0)]. If I read in run mode (F5), the register R6 read uncorrect [0025 - EMUEXCPT code]. Is very strange.
I already put in code csync (after the code - R5 = RTS_OPCODE ( Z )) and ssync (after the code - R6 = W [ P5 ++ ] ( Z )) and I have the same result.
Can anyone suggest me anything?
I really don't know what can I do.