ram location content shows its own address and doesn't change


Currently i am debugging some code and i have found that when i examine the data in a small array, none of the values change when i assign new data to them. When i pause and step through the code, the debugger consistently gives me the data content as identical to the memory address of the array.

My code snippet:

uint8_t IIC_write_buf[4] = {0x01, 0x33, 0xA5, 0x88};

(in a subroutine...)

IIC_write_buf[0] = 0x84;
IIC_write_buf[1] = TCA6424A_P0_buffer | 0x00; // P0
IIC_write_buf[2] = TCA6424A_P1_buffer | 0x02; // P1 P13-P12-P11 = 001 = dac 0000 0010 = 0x02
IIC_write_buf[3] = TCA6424A_P2_buffer | 0x00; // P2
Write_I2C_Master(TCA6424A, IIC_write_buf, 4);

I set a breakpoint at the beginning of this routine and step through it. As i step through each array variable assignment, the data value doesn't change. Is the memory locked somehow? I'm somehow not looking at it the right way.

The expressions evaluation window shows memory address as 0x146D and value also as 0x146D, consistently . When i step through this code, the value never changes, even when using the inspection window to show content of that variable.

My questions are: 1) am i interpreting the information that i'm seeing wrongly? 2) If this is indeed happening, what could the cause be? Other variables seem to change properly. 

Tools: E2 Studio V7.8; Windows 7 SP1; emulator: E2 Lite

Processor: R5F5630ACDFB#V0

Thanks in advance for any pointers or information.

Parents Reply Children