title: How to write a byte to register with specific memory address?
body: <p>I want to write a byte to register with specific memory address (0x1228A432)</p>
  
  <p>But, this register has a following structure:</p>
  
  <pre><code> Bits  |   Access   |   Name   | Reset  | Description |
  [31:8] | Read only  | -------- | ------ |  Reserved   |
  [7:0]  | Read-write | REG[7:0] | 0xXX   | ----------- |
  </code></pre>
  
  <p>Please tell me, how to write a byte to this register without "touching" the Reserved bits?</p>
  
  <p>EDIT1: My target is Cortex A9.
  I could successfully read/write to onboard DDR2 memory using 256-bit values (such as 0xFF)</p>
  
  <p>EDIT2: I used to work with DDR2 memory in the following way :</p>
  
  <pre><code>// First stage
  static unsigned char *p = 0;
  char * argv1="0x60000000";
  unsigned long address=strtoul(argv1, 0, 0);
  p = (unsigned char *) argv1;
  
  // Second stage
  char * argv4="FF";
  int value=strtol(argv4,0,16);
  
  // Third stage
  int offset = 9;
  p[offset]=value;
  </code></pre>
  
  <p>EDIT3: I found out the following information:</p>
  
  <p>All registers are 32 bits wide and do not support byte writes.
  Write operations must be word-wide and bits marked as reserved must be preserved
  using read-modify-write.</p>