szemzoandras wrote:
> Hi,
>
> First, sorry for long mail.
>
> Thanks everybody for reply.
>
> Yes, I know I can address fixed address like:
> unsigned int *a = (void * )0x81000000;
> *a = 0x11223344;
>
> or
> #define something (*((volatile unsigned long *) 0x81000000))
>
> Ok, I have 2 problems.
> I would like to convert my 320x240 GLCD routines to work with
> framebuffer, because sed1335 not a fast IC.
> I need 2 buffer 9600byte each, in the external space of Lpc2292.
> One buffer where I write lines, pix etc, other that store the actual
> picture, what is on the GLCD. Then I only copy the CHANGED bytes.
> Is this ok?
> So, how may I declare and use that 2 9600byte arrays in external ram?
>
> My second problem. Here is a little prog:
> unsigned int *a = (void * )0x81000000;
>
> *a = 0x11223344;
> unsigned int *b = (void * )0x81000004;
> *b = 0x55667788;
> printf("Memory0.4: %x\r\n",*a);
> printf("Memory4.4: %x\r\n",*b);
> unsigned char *ss = (void*)0x81000001;
> printf("Memory1.1: %x\r\n",*ss);
> printf("Memory0.4: %x\r\n",*a);
> ss = (void*)0x81000002;
> printf("Memory2.1: %x\r\n",*ss);
> ss = (void*)0x81000003;
> printf("Memory3.1: %x\r\n",*ss);
> *ss = 0x99;
> printf("Memory3.1ch: %x\r\n",*ss);
> printf("Memory0.4: %x\r\n",*a);
> ss = (void*)0x81000003;
> *ss = 0x77;
> printf("Memory0.4: %x\r\n",*a);
> ss = (void*)0x81000000;
> *ss = 0x88;
> printf("Memory0.1ch: %x\r\n",*ss);
> printf("Memory0.4: %x\r\n",*a);
>
> And here is the output:
>
> Memory0.4: 11223344
> Memory4.4: 55667788
> Memory1.1: 33
> Memory0.4: 11223344
> Memory2.1: 22
> Memory3.1: 11
> Memory3.1ch: 99
> Memory0.4: 99223344
> Memory0.4: 77223344
> Memory0.1ch: 88
> Memory0.4: 77223344
>
> Why can I change the 1-3 byte of a 32bit location, but not the 0.?
>
> Thanks.
> Andrew
>
Mmmmh... It looks strange. What kind of hardware or memory is located at
0x81000000?
Sten
--
/************************************************
Do you need a tiny and efficient real time
operating system (RTOS) with a preemtive
multitasking for LPC2000 or AT91SAM7?
http://nanortos.net-attack.de/
Or some open-source tools and code for LPC2000?
http://www.net-attack.de/
************************************************/Message
Re: [lpc2000] Re: fixed address variable
2005-11-10 by Sten
Attachments
- No local attachments were found for this message.