This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Storing data at Specific RAM address

Hi all

I want to store my data used in the code at a particular specific address in RAM of the chip how can i do it .

i tried to this but got data abort error
#define test ((*volatile unsigned int *)(0x00400001)

test = 0x55;

can any one help me to guide me how to go about it .

Parents
  • I tried to this but got data abort error

    #define test ((*volatile unsigned int *)(0x00400001)
    

    That shouldn't be a surprise, really. You did realize that that address is rather unaligned, didn't you?

    Looks like before you go on exploring the "how?", you should spend some more time on thinking about the "why?:", and the "is that a good idea?" aspect of this plan.

Reply
  • I tried to this but got data abort error

    #define test ((*volatile unsigned int *)(0x00400001)
    

    That shouldn't be a surprise, really. You did realize that that address is rather unaligned, didn't you?

    Looks like before you go on exploring the "how?", you should spend some more time on thinking about the "why?:", and the "is that a good idea?" aspect of this plan.

Children
No data