Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
GeorgeGN
Level 1
Level 1
5 questions asked 5 sign-ins First reply posted

Hi all.

I'm writing a code for TC387-QP uC, an use of course  AURIX development studio and face some problems with design environment.  In my code I try to access I2C memory and started with well known test to write 10 bytes and read them back.

uint8 I2C_DataToWrite[10] = {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09};

uint8 I2C_DataReadBack[10] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

After R/W operation compare write and read values - not equal. Searching why, I by mistake

press I2C_DataToWrite values to see in debugger and ... SURPRISE :

I2C_DataToWrite[10] set to {0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x07,0x08,0x09};

Usage of :

 

uint8 temp = 0x00;

for (int k=0; k<10;k++)

{ I2C_DataToWrite[k] = temp;temp++;}

solved the problem.

Do anybody knows how to initiate array with desired values, without write statement

for each element.

 

and one more question :

Some of variables I want to watch in debugger are not accessible e.g.

TempSensor1Value Cannot read variable, no storage assigned.
temp Cannot read variable, no storage assigned.

 

variable are defined in void core0_main(void), so they should be seen without problems.

 

Regards : GeorgeGN

0 Likes
1 Reply
Nambi
Moderator
Moderator
Moderator
5 likes given 100 solutions authored 250 replies posted

Hi,

I don't see this at my end. I tested with Tasking debugger.

Nambi_0-1707453491026.png

Can you try something like this for basic "Blinky_LED" example and let us know the observation?

Best Regards.

0 Likes