Difference between revisions of "AXIOM Alpha"

From apertus wiki
Jump to: navigation, search
(Created page with "=Developer Notes= ==Reading and Writing Sensor Register== This example script: #!/bin/sh cmv_reg() { addr=$(( 0x60000000 + ($1 * 4) )) [ $# -gt 1 ] && devmem $add...")
 
Line 11: Line 11:
     devmem $addr 32
     devmem $addr 32
  }
  }
  //change the registers 69/98/102/107/108/112 and 124                 
  #change the registers 69/98/102/107/108/112 and 124                 
  cmv_reg  69      2
  cmv_reg  69      2
  cmv_reg  98  39705
  cmv_reg  98  39705
Line 19: Line 19:
  cmv_reg 112      5
  cmv_reg 112      5
  cmv_reg 124    15
  cmv_reg 124    15
  //read the register 127
  #read the register 127
  cmv_reg 127
  cmv_reg 127



Revision as of 19:21, 25 September 2013

1 Developer Notes

1.1 Reading and Writing Sensor Register

This example script:

#!/bin/sh
cmv_reg() {
   addr=$(( 0x60000000 + ($1 * 4) ))
   [ $# -gt 1 ] && devmem $addr 32 $2
   devmem $addr 32
}
#change the registers 69/98/102/107/108/112 and 124                 
cmv_reg  69      2
cmv_reg  98  39705
cmv_reg 102   8312
cmv_reg 107   9814
cmv_reg 108  12381
cmv_reg 112      5
cmv_reg 124     15
#read the register 127
cmv_reg 127

basically the registers get mapped to 32bit spaces starting at a specific memory address (0x60000000 in this case), reading from that memory will show the register, writing to that memory will change it

so register '0' is at 0x60000000, register '1' at 0x60000004 ...