2019-12-18 07:46 AM
Hello,
I am trying to get data of battery in stm32cubeIDE,I have taken voltage and temperature of battery successfully but when i was trying to get current of battery, it shows value like 65535 or 65473....like a garbage value.I am reading current in milli ampere.I also checked value on bqstudio as shown below image and it is (-1103mA),negative sign because it is discharging current.
But when i send the register address of current in this same bqstudio,it shows garbage value FBB2 i.e.64434 same as showing in stm32cubeIDE. I have connected load of 5ohm and battery voltage is 3.5v .Please give me any suggestion.
Solved! Go to Solution.
2019-12-21 11:53 PM
TRM in section 14.11 clearly states Min = –32767 mA, Max = 32768 mA, Word protocol and I2 data type, which is explained in section 15.1.2.
2019-12-18 02:37 PM
2019-12-18 07:37 PM
Thanks for your response sir,means i am getting current data in 2's complement form .Am i right sir?
2019-12-20 04:02 AM
Please reply sir.
2019-12-21 10:10 AM
How about reading the Technical Reference Manual instead of asking questions, which have already been answered?
2019-12-21 10:41 AM
Yes, the device returns signed 16-bit number.
Sorry, I haven't noticed your reply earlier.
-- pa
2019-12-21 07:21 PM
Thank you so much sir.
2019-12-21 07:45 PM
@Piranha Thanks for your reply sir. I already read technical reference manual,in technical reference manual,value of discharge current is given like - Min= -32768mA and max=0mA.
2019-12-21 11:53 PM
TRM in section 14.11 clearly states Min = –32767 mA, Max = 32768 mA, Word protocol and I2 data type, which is explained in section 15.1.2.
2019-12-22 01:30 AM
@Piranha Thanks for your reply sir, and negative sign for discharge current ?