cancel
Showing results for 
Search instead for 
Did you mean: 

STR710 read data from Sram

gajeronline
Associate II
Posted on September 07, 2006 at 12:22

STR710 read data from Sram

1 REPLY 1
gajeronline
Associate II
Posted on September 06, 2006 at 16:02

Hi.

I have a small problem with GCC Arm Compiler, below is my test code.

unsigned char buf[50];

unsigned short int w;

memset(buf, 0, 50);

buf[0x0A] = 0x30;

buf[0x0B] = 0x00;

buf[0x0C] = 0x02;

buf[0x0D] = 0x08;

w = *(unsigned short int *)&buf[0x0B];

In this place I expect that ''w'' variable have value 512 (0x0200 hex)

when i

printf(''w = %u\r\n'', w);

on my console is ''w = 805306368'' in hex is 0x30000000

Whera that value in w variable ?

And how I to get correct value in ''w'' variable ?