View Single Post
Posts: 29 | Thanked: 151 times | Joined on Apr 2010
#44
well, maybe they don't want to open some components just because their code is so bad - at least that's what i'm thinking after my recent discovery - which is BME reading register 0x3b from battery charger ( http://focus.ti.com/lit/ds/symlink/bq24150.pdf ), and according to manual that register doesn't exist and only reason why it doesn't fail is because charger ignores higher 5 bits of address so 0x3b (0b00111011) becames 0x03 (0b00000011)

/usr/sbin/bme_RX-51
.text:000191B4 MOV R0, #0x3B ; ';'
.text:000191B8 BL I2C_ChargerReadWrapper
...
.text:00019188 I2C_ChargerReadWrapper
...
.text:00019190 BL I2C_ChargerRead
...
.text:000160A8 I2C_ChargerRead
.text:000160A8 STMFD SP!, {R4,R5,R11,LR}
.text:000160AC LDR R3, =file_descriptors
.text:000160B0 ADD R11, SP, #0xC
.text:000160B4 SUB SP, SP, #0x30
.text:000160B8 MOV R5, R1
.text:000160BC STRB R0, [R11,#i2c_smbus_data] ; bq24150 register
.text:000160C0 MOV R1, #0x720 ; request
.text:000160C4 LDR R0, [R3,#8] ; fd
.text:000160C8 SUB R2, R11, #-data_addr ; address to data
.text:000160CC MOV R3, #2
.text:000160D0 MOV R4, #1 ; read
.text:000160D4 STR R3, [R11,#var_14] ; ???
.text:000160D8 SUB R12, R11, #-var_3A
.text:000160DC STRB R4, [R11,#data_addr]
.text:000160E0 STR R12, [R11,#oldR4]
.text:000160E4 BL ioctl
 

The Following 2 Users Say Thank You to jacekowski For This Useful Post: