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

Manipulate Ram in an LPC4078

Hello together,

I have an LPC4078. I made measurements with it and everything goes into the RAM. Now I want to manipulate the RAM. Is there a pointer for that? Is the any other possibility?

Thank you and greetings

Chris

Parents
  • Pointers are just numbers.

    uint32_t *src = (uint32_t) 0x20000000;
    uint32_t *dst = (uint32_t) 0x20010000;
    uint32_t temp = dest[100];  // save original dest word 100
    memcpy(dst, src, 32768); // copy 32k bytes from start of RAM to later in RAM.
    dest[100] = temp;  // restore that one word to old value

    I believe that all Cortex-M processors have their internal RAM at 0x20000000.

    You must of course be careful not to overwrite RAM that is already in use by other code.

Reply
  • Pointers are just numbers.

    uint32_t *src = (uint32_t) 0x20000000;
    uint32_t *dst = (uint32_t) 0x20010000;
    uint32_t temp = dest[100];  // save original dest word 100
    memcpy(dst, src, 32768); // copy 32k bytes from start of RAM to later in RAM.
    dest[100] = temp;  // restore that one word to old value

    I believe that all Cortex-M processors have their internal RAM at 0x20000000.

    You must of course be careful not to overwrite RAM that is already in use by other code.

Children
No data