AXIOM Alpha

From apertus wiki
Revision as of 19:17, 25 September 2013 by Sebastian (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 ...