i want to read address 0x72800 from st10 flash memory, how i can do this? i use this code but the result is not correct:
int a = 0; DPP0 = 0x1c; __asm mov a,0x2800
i can read 0x0000 to 0x7fff but other memory location cusses a wrong answer in comparison with the result of read from flash memory with a programmer??
Something like this maybe:
int *p_a = (int *)(0x72800) ; int a = *p_a ;
thank you for your answer. i test this code but the result was not correct. this is my assembly result:
int a = *p_a ; E6F40628 MOV R4,#0x2800 F064 MOV R6,R4 int a = *p_a ; A846 MOV R4,[R6] B840 MOV [R0],R4
it seems that compiler use 2800 instead of 72800 !
Have you spent any time checking in the manual about pointer implementation:
http://www.keil.com/support/man/docs/c166/c166_le_ptrmemtype.htm
http://www.keil.com/forum/58287/