Please remember to add a category to the bottom of each page that you create.
See categories help for further details, but most will probably be [[Category:HTC ModelName]].

HTC Raphael/Accerlometers

From XDA-Developers
Jump to: navigation, search

http://www.kionix.com/accelerometers/accelerometer-KXSD9.html connected to i2c

The I2C id is 0x18 (0x30>>1)

The datasheets available from this page, do not always match the wince driver actions:

read reg_0x1e

reg_0xb = reg_0x1e


Enable:

  • wr 30,d,c0
  • var = rd 30,1e
  • wr 30,b, var
  • wr 30,c,e3
  • rd 30,0

Disable:

  • wr 30,d,0

Get sensitivity:

  • ( rd 30,c ) & 0x3

Set sensitivity:

  • var = ( rd 30,c ) & 0xfc
  • var = ( var | in_arg_sensitivity ) & 0xff
  • wr 30,c, var

Log:

005.749 7803dad4: str    r3, ~[r6]       # b2300000 =00000130
005.749 7803db0c: str    r3, ~[r6]       # b2300000 =0000000d
005.749 7803db48: str    r3, ~[r6]       # b2300000 =000002c0

005.754 7803dc18: str    r3, ~[r8]       # b2300000 =00000130
005.754 7803dc5c: str    r3, ~[r8]       # b2300000 =0000021e

005.754 7803dc98: str    r3, ~[r8]       # b2300000 =00000131
005.754 7803dcf8: str    r3, ~[r8]       # b2300000 =00000200
005.754 7803dd40: ldr    r3, ~[sl]       # b230000c==00000060
005.754 7803dd70: ldr    r3, ~[sl]       # b230000c==00000010

005.759 7803dad4: str    r3, ~[r6]       # b2300000 =00000130
005.759 7803db0c: str    r3, ~[r6]       # b2300000 =0000000a
005.759 7803db48: str    r3, ~[r6]       # b2300000 =000002ca

005.787 7803dad4: str    r3, ~[r6]       # b2300000 =00000130
005.787 7803db0c: str    r3, ~[r6]       # b2300000 =0000000b
005.787 7803db48: str    r3, ~[r6]       # b2300000 =00000260

005.790 7803dad4: str    r3, ~[r6]       # b2300000 =00000130
005.790 7803db0c: str    r3, ~[r6]       # b2300000 =0000000c
005.790 7803db48: str    r3, ~[r6]       # b2300000 =000002e3

005.794 7803dc18: str    r3, ~[r8]       # b2300000 =00000130
005.794 7803dc5c: str    r3, ~[r8]       # b2300000 =00000200

005.794 7803dc98: str    r3, ~[r8]       # b2300000 =00000131
005.794 7803dcf8: str    r3, ~[r8]       # b2300000 =00000200
005.794 7803dd40: ldr    r3, ~[sl]       # b230000c==0000007b
005.794 7803dd70: ldr    r3, ~[sl]       # b230000c==00000080

During operation, when enabled:

rd 30,0 <- 6 bytes: xh,xl,yh,yl,zh,zl

000034: mmutrace 7805d510: e5853000(str) b2300000 00000130 (00000000)
000034: mmutrace 7805d554: e5853000(str) b2300000 00000000 (00000000)
000034: mmutrace 7805d5e4: e5853000(str) b2300000 00000131 (00000000)

000034: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007a (00000000)
000034: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007c (00000000)
000126: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007e (00000000)
000126: mmutrace 7805d67c: e5933000(ldr) b230000c 00000000 (00000000)

000126: mmutrace 7805d678: 05852000(str) b2300000 00000200 (00000000)

000126: mmutrace 7805d67c: e5933000(ldr) b230000c 00000051 (00000000)
000126: mmutrace 7805d67c: e5933000(ldr) b230000c 000000fc (00000000)



000126: mmutrace 7805d510: e5853000(str) b2300000 00000130 (00000000)
000126: mmutrace 7805d554: e5853000(str) b2300000 00000000 (00000000)
000126: mmutrace 7805d5e4: e5853000(str) b2300000 00000131 (00000000)

000184: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007a (00000000)
000184: mmutrace 7805d67c: e5933000(ldr) b230000c 0000000c (00000000)
000184: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007e (00000000)
000184: mmutrace 7805d67c: e5933000(ldr) b230000c 00000000 (00000000)

000273: mmutrace 7805d678: 05852000(str) b2300000 00000200 (00000000)

000273: mmutrace 7805d67c: e5933000(ldr) b230000c 00000051 (00000000)
000273: mmutrace 7805d67c: e5933000(ldr) b230000c 000000fc (00000000)



000273: mmutrace 7805d510: e5853000(str) b2300000 00000130 (00000000)
000273: mmutrace 7805d554: e5853000(str) b2300000 00000000 (00000000)
000273: mmutrace 7805d5e4: e5853000(str) b2300000 00000131 (00000000)

000323: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007a (00000000)
000323: mmutrace 7805d67c: e5933000(ldr) b230000c 0000003c (00000000)
000323: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007e (00000000)
000323: mmutrace 7805d67c: e5933000(ldr) b230000c 00000000 (00000000)

000323: mmutrace 7805d678: 05852000(str) b2300000 00000200 (00000000)

000323: mmutrace 7805d67c: e5933000(ldr) b230000c 00000051 (00000000)
000323: mmutrace 7805d67c: e5933000(ldr) b230000c 00000080 (00000000)



000480: mmutrace 7805d510: e5853000(str) b2300000 00000130 (00000000)
000480: mmutrace 7805d554: e5853000(str) b2300000 00000000 (00000000)
000480: mmutrace 7805d5e4: e5853000(str) b2300000 00000131 (00000000)

000480: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007a (00000000)
000480: mmutrace 7805d67c: e5933000(ldr) b230000c 0000003c (00000000)
000480: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007e (00000000)
000604: mmutrace 7805d67c: e5933000(ldr) b230000c 00000000 (00000000)

000604: mmutrace 7805d678: 05852000(str) b2300000 00000200 (00000000)

000604: mmutrace 7805d67c: e5933000(ldr) b230000c 00000052 (00000000)
000604: mmutrace 7805d67c: e5933000(ldr) b230000c 0000007c (00000000)



Back to Raphael Main Page or Back to Raphael Research