Writing to RAM on LPC1114

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by mohsin on Thu Dec 16 03:20:39 MST 2010
Hi All,

           I am having some problem while writing to the ram in the LPC1114.

static uint8_t        *ram_ptr        = (uint8_t *)  (0x10000000)

value        = *ram_ptr; // Step1
*ram_ptr    = 0xaa;     // Step2
*ram_ptr    = value;    // Step3

The values before Step1 are
ram_ptr      0x10000000   
*ram_ptr    0   

The value I am getting after Step2 are
ram_ptr      0x10[COLOR=Red]aa[/COLOR]0000   
*ram_ptr    [COLOR=Red]0[/COLOR]   

I should be getting
ram_ptr      0x10[COLOR=Black]00[/COLOR]0000   
*ram_ptr    0xaa   

Any clues why this is happenning?